From 2e0df8b6c66c2150dbac853a1abe67d41e46acf9 Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 2 Feb 2017 19:42:32 -0800 Subject: cr50: Have INAs and I2Cm enabled when rdd is attached The INAs are only used for development and testing purposes. Therefore, the 3.3V rail to the INAs is off by default and the I2Cm module is not enabled. Enabling INA power and connecting the I2Cm module was done at the beginning of each USB to I2C request. The problem with this approach is that INA measurments didn't always succeed due to not enough time for the INAs to initialize. Rather than add some arbitrary delay, it is better to tie the INAs to when rdd is attached/detached. It is only when rdd is attached that the INAs will be accessed, so there is no need to enable/disable for each individual I2C transaction. This CL ties the enabling/disabling of the INA and I2Cm module to the rdd state. This change makes the previous use of usb_i2c_board_enable() and usb_i2c_board_disable() obslete. BRANCH=none BUG=chrome-os-partner:62375 TEST=manual Connect servo with suzyq connected: sudo servod -p 0x5014 -b eve -c eve_r0_inas.xml Then execute single INA reads dut-control pp3300_dx_edp_mv and verify that it returns meaningful numbers. Without this CL single reads via dut-control would always return 0. Change-Id: I799552bfd0701efd1828a0d720ac2a6cedee5ca1 Signed-off-by: Scott Reviewed-on: https://chromium-review.googlesource.com/436864 Commit-Ready: Scott Collyer Tested-by: Scott Collyer Reviewed-by: Mary Ruthven --- board/servo_micro/board.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'board/servo_micro') diff --git a/board/servo_micro/board.c b/board/servo_micro/board.c index 853de87746..478501fda9 100644 --- a/board/servo_micro/board.c +++ b/board/servo_micro/board.c @@ -199,9 +199,6 @@ const struct i2c_port_t i2c_ports[] = { }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -int usb_i2c_board_enable(void) {return EC_SUCCESS; } -void usb_i2c_board_disable(int debounce) {} - /****************************************************************************** * Support firmware upgrade over USB. We can update whichever section is not -- cgit v1.2.1