diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-11-25 17:22:16 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-01 02:25:15 +0000 |
commit | 7b761a3a104a24e5d3642e5b9a32668d5b4e7ce5 (patch) | |
tree | b26c0db2dc79f8620d10230eed93f1047c574d5c | |
parent | f98afa502cc6c4c56058b2829a6e6f70aec7caf9 (diff) | |
download | chrome-ec-7b761a3a104a24e5d3642e5b9a32668d5b4e7ce5.tar.gz |
Redrix: Always initialize ioex data structures after sysjump
[Cherry-pick from: https://crrev.com/c/3299277]
BUG=none
BRANCH=none
TEST=1. make BOARD=redrix
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: I8427013fd8768bcd88047b39a4286b172eaf3c2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3302224
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Commit-Queue: Boris Mittelberg <bmbm@google.com>
-rw-r--r-- | board/redrix/usbc_config.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/redrix/usbc_config.c b/board/redrix/usbc_config.c index 00b6589a46..aae3a4493b 100644 --- a/board/redrix/usbc_config.c +++ b/board/redrix/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); |