diff options
author | Scott <scollyer@chromium.org> | 2016-10-04 12:52:31 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-11 01:47:47 -0700 |
commit | 7bfcb41d2cad36c220eee89576e41dacea870adb (patch) | |
tree | c2d637eba92f351d7530e6e0041716a5f0efb884 /chip | |
parent | 8c370fedba9e94eebe6c66db1e90033574081d2f (diff) | |
download | chrome-ec-7bfcb41d2cad36c220eee89576e41dacea870adb.tar.gz |
Cr50: I2CM: Enable i2c master for accessing INA chips
On both Reef and Gru there are INA (shunt bus voltage monitor) ICs
connected to the Cr50 I2C master bus. The use case for these chips is
in a lab setting using case closed debugging. Power to the INA chips
is controlled by a separate Cr50 gpio signal.
By default, the INAs are powered off and the I2C master bus is not
connected. A function ina_connect() is provided which needs to be
called prior to attempting to access the INAs via I2C.
BRANCH=none
BUG=chrome-os-partner:57059
TEST=manual
Tested both Reef and Gru. Verified that console command 'ccd ina
on|off' works as expected and that can repeatedly read registers on
the INA using the following command "i2cxfer r16 0 0x40 0".
Read 0x2771 [10097] which is the default value. In addition
wrote register 14 (bits 15:1 are writeable) and verified the value was
able to read the value back which was written.
Change-Id: I670f7897555dae29642264531599dc4471c52bbd
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394168
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/rdd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/g/rdd.h b/chip/g/rdd.h index 1f19ee9b3e..45dbb049de 100644 --- a/chip/g/rdd.h +++ b/chip/g/rdd.h @@ -18,4 +18,10 @@ void rdd_attached(void); * cable is detached. */ int is_utmi_wakeup_allowed(void); + +/* Power up INAs and initialize I2C0 interface */ +void ina_connect(void); + +/* Disconnect I2C0 interface and powerdown INAs */ +void ina_disconnect(void); #endif /* __CROS_RDD_H */ |