summaryrefslogtreecommitdiff
path: root/driver/tcpm/anx74xx.h
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2015-08-03 23:37:54 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-23 15:10:08 -0700
commitf9272713da615e51ea14f70872fec46fbd88e938 (patch)
tree7b12c57a3435a615718c9d3325dfc0671fc297b6 /driver/tcpm/anx74xx.h
parent806aae81f6bed5ab1a26e860eaa2b5b1349a1444 (diff)
downloadchrome-ec-f9272713da615e51ea14f70872fec46fbd88e938.tar.gz
i2c: Add i2ctest console command
Added i2ctest console command to test the reliability of the I2C. By reading/writing to the known registers this tests provides the number of successful read and writes. BUG=chrome-os-partner:57487 TEST=Enabled the i2ctest config on Reef and tested the i2c read/writes. BRANCH=none Change-Id: I9e27ff96f2b85422933bc590d112a083990e2dfb Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/290427 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/tcpm/anx74xx.h')
-rw-r--r--driver/tcpm/anx74xx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/driver/tcpm/anx74xx.h b/driver/tcpm/anx74xx.h
index de8d2b7fab..76bb44067e 100644
--- a/driver/tcpm/anx74xx.h
+++ b/driver/tcpm/anx74xx.h
@@ -13,6 +13,10 @@
#define ANX74XX_REG_IRQ_POL_LOW 0x00
#define ANX74XX_REG_IRQ_POL_HIGH 0x02
+#define ANX74XX_REG_VENDOR_ID_L 0x00
+#define ANX74XX_REG_VENDOR_ID_H 0x01
+#define ANX74XX_VENDOR_ID 0xAAAA
+
/* ANX F/W version:0x50:0x44 which contains otp firmware version */
#define ANX74XX_REG_FW_VERSION 0x44
@@ -162,4 +166,8 @@ void anx74xx_tcpc_update_hpd_status(int port, int hpd_lvl, int hpd_irq);
void anx74xx_tcpc_clear_hpd_status(int port);
int anx74xx_tcpc_get_fw_version(int port, int *version);
+#ifdef CONFIG_CMD_I2C_STRESS_TEST_TCPC
+extern struct i2c_stress_test_dev anx74xx_i2c_stress_test_dev;
+#endif
+
#endif /* __CROS_EC_USB_PD_TCPM_ANX74XX_H */