summaryrefslogtreecommitdiff
path: root/driver/tcpm/ps8xxx.h
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2019-12-16 21:44:21 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-14 02:53:49 +0000
commitfc6070c975516b8cf8f01e00bda6bf32c74e9809 (patch)
tree39ad16922111ac236c19a9f1b9c02a768cdf6e17 /driver/tcpm/ps8xxx.h
parent329045e9bcd3af6294460fcf0ab9be5fa583c1c7 (diff)
downloadchrome-ec-fc6070c975516b8cf8f01e00bda6bf32c74e9809.tar.gz
ps8xxx: add support for the ps8815
this adds support for the ps8815 variant of the parade TCPC. this chip is very similar to its predecessors like the ps8751 and ps8805 and can be supported by the same driver. at this point, the TCPM can talk to the chip but we don't properly detect chargers - the CC line states seem wrong and CC status changes do not trigger an ALERT in the ps8815. BRANCH=none BUG=b:144397088,b:147459088 TEST=EC detects the chip on boot. Change-Id: If86abd1fa21cf8f33f28c4ce89050b29e9408532 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1969524 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'driver/tcpm/ps8xxx.h')
-rw-r--r--driver/tcpm/ps8xxx.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/driver/tcpm/ps8xxx.h b/driver/tcpm/ps8xxx.h
index e2927c8531..ed5a08115b 100644
--- a/driver/tcpm/ps8xxx.h
+++ b/driver/tcpm/ps8xxx.h
@@ -41,6 +41,10 @@
#define PS8XXX_REG_MUX_USB_DCI_CFG_MODE_MASK 0xC0
#define PS8XXX_REG_MUX_USB_DCI_CFG_MODE_OFF 0x80
+#define MUX_IN_HPD_ASSERTION_REG 0xD0
+#define IN_HPD BIT(0)
+#define HPD_IRQ BIT(1)
+
#if defined(CONFIG_USB_PD_TCPM_PS8751)
/* Vendor defined registers */
#define PS8XXX_PRODUCT_ID 0x8751
@@ -48,9 +52,6 @@
#define FW_VER_REG 0x90
#define PS8XXX_REG_VENDOR_ID_L 0x00
#define PS8XXX_REG_VENDOR_ID_H 0x01
-#define MUX_IN_HPD_ASSERTION_REG 0xD0
-#define IN_HPD BIT(0)
-#define HPD_IRQ BIT(1)
#define PS8XXX_REG_MUX_DP_EQ_CONFIGURATION 0xD3
#define PS8XXX_REG_MUX_DP_OUTPUT_CONFIGURATION 0xD4
#define PS8XXX_REG_MUX_USB_C2SS_EQ 0xE7
@@ -63,9 +64,12 @@
#define PS8805_P1_REG_MUX_USB_DCI_CFG 0x4B
#define FW_VER_REG 0x82
-#define MUX_IN_HPD_ASSERTION_REG 0xD0
-#define IN_HPD BIT(0)
-#define HPD_IRQ BIT(1)
+
+#elif defined(CONFIG_USB_PD_TCPM_PS8815)
+/* Vendor defined registers */
+#define PS8XXX_PRODUCT_ID 0x8815
+
+#define FW_VER_REG 0x82
#endif