diff options
author | arthur.lin <arthur.lin@lcfc.corp-partner.google.com> | 2021-02-26 17:36:42 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-03 05:01:28 +0000 |
commit | 985116ae9a038e958792accfee864176432effd1 (patch) | |
tree | 402764983e42c5e1fd21ed49749bf76cbfd76f44 /board/lindar | |
parent | 39dce8dd8c9d07277c993ef6ff605f07f1b4007c (diff) | |
download | chrome-ec-985116ae9a038e958792accfee864176432effd1.tar.gz |
lindar: add back the TUSB422 related setting.
For backward compatible with the EVT device,
add back the TUSB422 related setting.
BRANCH=firmware-volteer-13672.B
BUG=b:177980430
TEST=make buildall -j
1. Set cbi board id to 1 and 2 respectively to check the type-c
function.
2. Test Type-C PD function for AC, dock, usb device, etc.
Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com>
Change-Id: I5b9237b40aaf9c464f12a19d8bc61251d649acf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2722012
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/lindar')
-rw-r--r-- | board/lindar/board.c | 10 | ||||
-rw-r--r-- | board/lindar/board.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/board/lindar/board.c b/board/lindar/board.c index f3c549919e..8168b9c51a 100644 --- a/board/lindar/board.c +++ b/board/lindar/board.c @@ -16,6 +16,7 @@ #include "driver/tcpm/ps8xxx.h" #include "driver/tcpm/tcpci.h" #include "driver/tcpm/rt1715.h" +#include "driver/tcpm/tusb422.h" #include "extpower.h" #include "fan.h" #include "fan_chip.h" @@ -487,7 +488,7 @@ BUILD_ASSERT(ARRAY_SIZE(pi3usb9201_bc12_chips) == USBC_PORT_COUNT); /******************************************************************************/ /* USBC TCPC configuration */ -const struct tcpc_config_t tcpc_config[] = { +struct tcpc_config_t tcpc_config[] = { [USBC_PORT_C0] = { .bus_type = EC_BUS_TYPE_I2C, .i2c_info = { @@ -552,6 +553,13 @@ static void board_tcpc_init(void) /* Enable BC1.2 interrupts. */ gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_ODL); gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_ODL); + + if (get_board_id() <= 1) { + tcpc_config[USBC_PORT_C0].i2c_info.addr_flags = + TUSB422_I2C_ADDR_FLAGS; + tcpc_config[USBC_PORT_C0].drv = &tusb422_tcpm_drv; + tcpc_config[USBC_PORT_C0].flags = 0; + } } DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_CHIPSET); diff --git a/board/lindar/board.h b/board/lindar/board.h index a33cf24e1b..c04d137b55 100644 --- a/board/lindar/board.h +++ b/board/lindar/board.h @@ -50,7 +50,6 @@ #define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ #define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ -#undef CONFIG_USB_PD_TCPM_TUSB422 /* * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C @@ -61,7 +60,7 @@ #define PD_MAX_CURRENT_MA 3000 #define PD_MAX_VOLTAGE_MV 20000 -#undef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG + #undef CONFIG_USB_MUX_RUNTIME_CONFIG /* USB Type A Features */ |