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, ®val)) { /* 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, ®val)) { /* 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;