summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/volteer/baseboard.c2
-rw-r--r--baseboard/zork/baseboard.c4
-rw-r--r--board/waddledoo/board.c12
-rw-r--r--driver/tcpm/raa489000.c2
-rw-r--r--driver/tcpm/tcpci.c20
-rw-r--r--include/usb_pd_tcpm.h4
6 files changed, 22 insertions, 22 deletions
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index 69353fabad..84ff2d4e39 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -369,7 +369,7 @@ static const struct tcpc_config_t tcpc_config_p1_usb3 = {
.port = I2C_PORT_USB_C1,
.addr_flags = PS8751_I2C_ADDR1_FLAGS,
},
- .flags = TCPC_FLAGS_TCPCI_V2_0,
+ .flags = TCPC_FLAGS_TCPCI_REV2_0,
.drv = &ps8xxx_tcpm_drv,
.usb23 = USBC_PORT_1_USB2_NUM | (USBC_PORT_1_USB3_NUM << 4),
};
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index 308adf7461..c38429dbc0 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -296,7 +296,7 @@ const struct tcpc_config_t tcpc_config[] = {
.addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
},
.drv = &nct38xx_tcpm_drv,
- .flags = TCPC_FLAGS_TCPCI_V2_0,
+ .flags = TCPC_FLAGS_TCPCI_REV2_0,
},
[USBC_PORT_C1] = {
.bus_type = EC_BUS_TYPE_I2C,
@@ -305,7 +305,7 @@ const struct tcpc_config_t tcpc_config[] = {
.addr_flags = NCT38XX_I2C_ADDR1_1_FLAGS,
},
.drv = &nct38xx_tcpm_drv,
- .flags = TCPC_FLAGS_TCPCI_V2_0,
+ .flags = TCPC_FLAGS_TCPCI_REV2_0,
},
};
BUILD_ASSERT(ARRAY_SIZE(tcpc_config) == USBC_PORT_COUNT);
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index 59b3cc0552..e0cc88d09b 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -309,7 +309,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,
+ .flags = TCPC_FLAGS_TCPCI_REV2_0,
.drv = &raa489000_tcpm_drv,
},
@@ -319,7 +319,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,
+ .flags = TCPC_FLAGS_TCPCI_REV2_0,
.drv = &raa489000_tcpm_drv,
},
};
@@ -358,8 +358,8 @@ uint16_t tcpc_get_alert_status(void)
*/
if (!gpio_get_level(GPIO_USB_C0_INT_ODL)) {
if (!tcpc_read16(0, TCPC_REG_ALERT, &regval)) {
- /* The TCPCI v1.0 spec says to ignore bits 14:12. */
- if (!(tcpc_config[0].flags & TCPC_FLAGS_TCPCI_V2_0))
+ /* The TCPCI Rev 1.0 spec says to ignore bits 14:12. */
+ if (!(tcpc_config[0].flags & TCPC_FLAGS_TCPCI_REV2_0))
regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
if (regval)
@@ -369,8 +369,8 @@ uint16_t tcpc_get_alert_status(void)
if (!gpio_get_level(GPIO_SUB_USB_C1_INT_ODL)) {
if (!tcpc_read16(1, TCPC_REG_ALERT, &regval)) {
- /* TCPCI spec v1.0 says to ignore bits 14:12. */
- if (!(tcpc_config[1].flags & TCPC_FLAGS_TCPCI_V2_0))
+ /* TCPCI spec Rev 1.0 says to ignore bits 14:12. */
+ if (!(tcpc_config[1].flags & TCPC_FLAGS_TCPCI_REV2_0))
regval &= ~((1 << 14) | (1 << 13) | (1 << 12));
if (regval)
diff --git a/driver/tcpm/raa489000.c b/driver/tcpm/raa489000.c
index c6911eb913..5bd72a8e13 100644
--- a/driver/tcpm/raa489000.c
+++ b/driver/tcpm/raa489000.c
@@ -97,7 +97,7 @@ int raa489000_init(int port)
/* Enable the correct TCPCI interface version */
rv = tcpc_read16(port, RAA489000_TCPC_SETTING1, &regval);
- if (!(tcpc_config[port].flags & TCPC_FLAGS_TCPCI_V2_0))
+ if (!(tcpc_config[port].flags & TCPC_FLAGS_TCPCI_REV2_0))
regval |= RAA489000_TCPCV1_0_EN;
else
regval &= ~RAA489000_TCPCV1_0_EN;
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index b4d44e0a31..b4f33187cd 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -538,8 +538,8 @@ struct cached_tcpm_message {
uint32_t payload[7];
};
-static int tcpci_v2_0_tcpm_get_message_raw(int port, uint32_t *payload,
- int *head)
+static int tcpci_rev2_0_tcpm_get_message_raw(int port, uint32_t *payload,
+ int *head)
{
int rv = 0, cnt, reg = TCPC_REG_RX_BUFFER;
int frm;
@@ -586,8 +586,8 @@ clear:
return rv;
}
-static int tcpci_v1_0_tcpm_get_message_raw(int port, uint32_t *payload,
- int *head)
+static int tcpci_rev1_0_tcpm_get_message_raw(int port, uint32_t *payload,
+ int *head)
{
int rv, cnt, reg = TCPC_REG_RX_DATA;
#ifdef CONFIG_USB_PD_DECODE_SOP
@@ -635,10 +635,10 @@ clear:
int tcpci_tcpm_get_message_raw(int port, uint32_t *payload, int *head)
{
- if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_V2_0)
- return tcpci_v2_0_tcpm_get_message_raw(port, payload, head);
+ if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_REV2_0)
+ return tcpci_rev2_0_tcpm_get_message_raw(port, payload, head);
- return tcpci_v1_0_tcpm_get_message_raw(port, payload, head);
+ return tcpci_rev1_0_tcpm_get_message_raw(port, payload, head);
}
/* Cache depth needs to be power of 2 */
@@ -744,9 +744,9 @@ int tcpci_tcpm_transmit(int port, enum tcpm_transmit_type type,
TCPC_REG_TRANSMIT_SET_WITHOUT_RETRY(type));
}
- if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_V2_0) {
+ if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_REV2_0) {
/*
- * In TCPCI v2.0, TX_BYTE_CNT and TX_BUF_BYTE_X are the same
+ * In TCPCI Rev 2.0, TX_BYTE_CNT and TX_BUF_BYTE_X are the same
* register.
*/
reg = TCPC_REG_TX_BUFFER;
@@ -1075,7 +1075,7 @@ int tcpci_tcpm_init(int port)
* TCPC_CONTROL.EnableLooking4ConnectionAlert bit, TCPC by default masks
* Alert assertion when CC_STATUS.Looking4Connection changes state.
*/
- if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_V2_0) {
+ if (tcpc_config[port].flags & TCPC_FLAGS_TCPCI_REV2_0) {
error = tcpc_read(port, TCPC_REG_TCPC_CTRL, &regval);
regval |= TCPC_REG_TCPC_CTRL_EN_LOOK4CONNECTION_ALERT;
error |= tcpc_write(port, TCPC_REG_TCPC_CTRL, regval);
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 20d812d37b..9c9753ad90 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -413,12 +413,12 @@ struct tcpm_drv {
* Bit 0 --> Polarity for TCPC alert. Set to 1 if alert is active high.
* Bit 1 --> Set to 1 if TCPC alert line is open-drain instead of push-pull.
* Bit 2 --> Polarity for TCPC reset. Set to 1 if reset line is active high.
- * Bit 3 --> Set to 1 if TCPC is using TCPCI Version 2.0
+ * Bit 3 --> Set to 1 if TCPC is using TCPCI Revision 2.0
*/
#define TCPC_FLAGS_ALERT_ACTIVE_HIGH BIT(0)
#define TCPC_FLAGS_ALERT_OD BIT(1)
#define TCPC_FLAGS_RESET_ACTIVE_HIGH BIT(2)
-#define TCPC_FLAGS_TCPCI_V2_0 BIT(3)
+#define TCPC_FLAGS_TCPCI_REV2_0 BIT(3)
struct tcpc_config_t {
enum ec_bus_type bus_type; /* enum ec_bus_type */