summaryrefslogtreecommitdiff
path: root/board/waddledoo
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-01-16 21:41:26 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-22 12:01:36 +0000
commitcb5112309fd345411361029fe8b281501cd1ba1f (patch)
treeed37e8c46cb9255147ccc637bcda74ded78fa224 /board/waddledoo
parent5c95136c7fb3acdeaf182727d7417b2a02cdbdfb (diff)
downloadchrome-ec-cb5112309fd345411361029fe8b281501cd1ba1f.tar.gz
waddledoo: Enable TCPCI Rev2 v1.0 for TCPCs
The RAA489000 TCPCs that waddledoo is using are a TCPCI Rev2 TCPC. Unfortunately, there seems to be some problems with the TCPCI Rev1 mode, so enable TCPCI Rev2 mode instead which seems to work with the newly added TCPCI Rev2 support. BUG=b:147316570 BRANCH=None TEST=Build and flash waddledoo, verify that TCPC can receive and transmit PD messages. Change-Id: If8fb434d865bf5a6f0439707581ca92cb3e7731d Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2006711 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/waddledoo')
-rw-r--r--board/waddledoo/board.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index 6734eec156..711b0dccf3 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -292,6 +292,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
.port = I2C_PORT_USB_C0,
.addr_flags = RAA489000_TCPC0_I2C_FLAGS,
},
+ .flags = TCPC_FLAGS_TCPCI_V2_0,
.drv = &raa489000_tcpm_drv,
},
@@ -301,6 +302,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
.port = I2C_PORT_SUB_USB_C1,
.addr_flags = RAA489000_TCPC0_I2C_FLAGS,
},
+ .flags = TCPC_FLAGS_TCPCI_V2_0,
.drv = &raa489000_tcpm_drv,
},
};
@@ -327,13 +329,10 @@ uint16_t tcpc_get_alert_status(void)
* alert status.
*/
if (!gpio_get_level(GPIO_USB_C0_INT_ODL)) {
- /*
- * TODO(b:147716486) If we decide to handle TCPCIv2.0, we cannot
- * ignore bits 14:12 any longer.
- */
if (!tcpc_read16(0, TCPC_REG_ALERT, &regval)) {
/* The TCPCI v1.0 spec says to ignore bits 14:12. */
- regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
+ if (!(tcpc_config[0].flags & TCPC_FLAGS_TCPCI_V2_0))
+ regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
if (regval)
status |= PD_STATUS_TCPC_ALERT_0;
@@ -341,13 +340,10 @@ uint16_t tcpc_get_alert_status(void)
}
if (!gpio_get_level(GPIO_SUB_USB_C1_INT_ODL)) {
- /*
- * TODO(b:147716486) If we decide to handle TCPCIv2.0, we cannot
- * ignore bits 14:12 any longer.
- */
if (!tcpc_read16(1, TCPC_REG_ALERT, &regval)) {
/* TCPCI spec v1.0 says to ignore bits 14:12. */
- regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
+ if (!(tcpc_config[1].flags & TCPC_FLAGS_TCPCI_V2_0))
+ regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
if (regval)
status |= PD_STATUS_TCPC_ALERT_1;