diff options
author | Dylan Lai <dylai@analogixsemi.com> | 2018-03-09 13:54:08 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-03 21:40:51 -0700 |
commit | 82a357a385f9eee75bfbca9911e404d54b0c3217 (patch) | |
tree | 7509a8b541a6541b1d56fce2a5d9008a9c4323c9 /board/pdeval-stm32f072/board.c | |
parent | a9c7d6b0d73eaf0c48438124b40fc054183701aa (diff) | |
download | chrome-ec-82a357a385f9eee75bfbca9911e404d54b0c3217.tar.gz |
TCPM: Add TCPM driver for Analogix anx7447 chip
Driver implements TCPC for ANX7447 chip. Enable Type C
port for USB and DP alt mode.
BUG=b:73793947
BRANCH=NONE
TEST=tested compiled binary for pdeval-stm32f072 board with this patch.
Power contract establishment, port role swap, DP alt mode works fine.
Change-Id: Ic11e499fc5fb4aba7732c75e4cb2fee54828c616
Reviewed-on: https://chromium-review.googlesource.com/956790
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'board/pdeval-stm32f072/board.c')
-rw-r--r-- | board/pdeval-stm32f072/board.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/board/pdeval-stm32f072/board.c b/board/pdeval-stm32f072/board.c index f5aa26d10b..a306d853ac 100644 --- a/board/pdeval-stm32f072/board.c +++ b/board/pdeval-stm32f072/board.c @@ -4,6 +4,7 @@ */ /* STM32F072-discovery board based USB PD evaluation configuration */ +#include "anx7447.h" #include "common.h" #include "ec_version.h" #include "gpio.h" @@ -52,15 +53,12 @@ void board_reset_pd_mcu(void) /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - {"tcpc", I2C_PORT_TCPC, 100 /* kHz */, GPIO_I2C0_SCL, GPIO_I2C0_SDA} + {"tcpc", I2C_PORT_TCPC, 400 /* kHz */, GPIO_I2C0_SCL, GPIO_I2C0_SDA} }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = { - {I2C_PORT_TCPC, TCPC1_I2C_ADDR, &tcpci_tcpm_drv}, -#if CONFIG_USB_PD_PORT_COUNT >= 2 - {I2C_PORT_TCPC, TCPC2_I2C_ADDR, &tcpci_tcpm_drv}, -#endif + {I2C_PORT_TCPC, AN7447_TCPC3_I2C_ADDR, &anx7447_tcpm_drv} }; uint16_t tcpc_get_alert_status(void) @@ -69,9 +67,6 @@ uint16_t tcpc_get_alert_status(void) if (!gpio_get_level(GPIO_PD_MCU_INT)) { status = PD_STATUS_TCPC_ALERT_0; -#if CONFIG_USB_PD_PORT_COUNT >= 2 - status |= PD_STATUS_TCPC_ALERT_1; -#endif } return status; |