diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-11-25 17:41:03 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-01 02:25:24 +0000 |
commit | 6de382f0b11005d741c01c38b807635e5f5c7768 (patch) | |
tree | 8f87f0ae7b1f9afc2bfa909ac92821aef700c620 | |
parent | 7b761a3a104a24e5d3642e5b9a32668d5b4e7ce5 (diff) | |
download | chrome-ec-6de382f0b11005d741c01c38b807635e5f5c7768.tar.gz |
anahera: Always initialize ioex data structures after sysjump
[Cherry-pick from: https://crrev.com/c/3299277]
BUG=none
BRANCH=none
TEST=1. make BOARD=anahera
2. On console, ioexget to make sure gpio pins on ioex initialized
after sysjump.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I70908409301684cafd9d6409e4f2e1d370abe2b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3302225
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Commit-Queue: Boris Mittelberg <bmbm@google.com>
-rw-r--r-- | board/anahera/usbc_config.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/anahera/usbc_config.c b/board/anahera/usbc_config.c index 00b6589a46..aae3a4493b 100644 --- a/board/anahera/usbc_config.c +++ b/board/anahera/usbc_config.c @@ -208,12 +208,16 @@ static void board_tcpc_init(void) int i; /* Don't reset TCPCs after initial reset */ - if (!system_jumped_late()) { + if (!system_jumped_late()) board_reset_pd_mcu(); - for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; ++i) - ioex_init(i); - } + /* + * These IO expander pins are implemented using the + * C0/C1 TCPCs, so they must be set up after the TCPCs has + * been taken out of reset. + */ + for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; ++i) + ioex_init(i); /* Enable PPC interrupts. */ gpio_enable_interrupt(GPIO_USB_C0_PPC_INT_ODL); |