diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2022-04-06 18:02:42 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-13 11:37:30 +0000 |
commit | c0333e1cbc5172d666831d5682a15f2cbd00a9cb (patch) | |
tree | faa5dc8e731c49b52b16678f1070c3588daee256 | |
parent | 61e177e6918e000b634e77837d504890f1960969 (diff) | |
download | chrome-ec-c0333e1cbc5172d666831d5682a15f2cbd00a9cb.tar.gz |
vell: Fix C3 TCPPC i2c address
Changes TCPPC address to 0x40 for board version more than and equal
ID 2. Reason to see the bug.
BUG=b:228410337
BRANCH=none
TEST=On Vell with rework daughterboard, Cut off system, then attach
charger to C3 port. i2cscan to make sure C3 TCPPC address.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: If4ceb35cd3ff6e5ae0d87fdac3eb70938b086db8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577317
Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r-- | board/vell/usbc_config.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/board/vell/usbc_config.c b/board/vell/usbc_config.c index ee61614361..3831b13884 100644 --- a/board/vell/usbc_config.c +++ b/board/vell/usbc_config.c @@ -99,7 +99,7 @@ struct ppc_config_t ppc_chips[] = { }, [USBC_PORT_C3] = { .i2c_port = I2C_PORT_USB_C2_C3_PPC, - .i2c_addr_flags = SYV682X_ADDR3_FLAGS, + .i2c_addr_flags = SYV682X_ADDR0_FLAGS, .drv = &syv682x_drv, }, }; @@ -107,6 +107,12 @@ BUILD_ASSERT(ARRAY_SIZE(ppc_chips) == USBC_PORT_COUNT); unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips); +struct ppc_config_t ppc_chips_old_c3 = { + .i2c_port = I2C_PORT_USB_C2_C3_PPC, + .i2c_addr_flags = SYV682X_ADDR3_FLAGS, + .drv = &syv682x_drv, +}; + /* USBC mux configuration - Alder Lake includes internal mux */ static const struct usb_mux usbc0_tcss_usb_mux = { .usb_port = USBC_PORT_C0, @@ -336,6 +342,9 @@ static void board_tcpc_init(void) for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; ++i) ioex_init(i); + if (get_board_id() < 2) + ppc_chips[USBC_PORT_C3] = ppc_chips_old_c3; + /* Enable PPC interrupts. */ gpio_enable_interrupt(GPIO_USB_C0_PPC_INT_ODL); gpio_enable_interrupt(GPIO_USB_C1_PPC_INT_ODL); |