diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2019-10-07 10:51:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-07 23:42:28 +0000 |
commit | aa668c1508c263091d26300c8f3372dbc3a808f3 (patch) | |
tree | 36d4f98c71f577d6e64fe07ab3682c4bd57e7887 /baseboard/hatch | |
parent | 31428c89c02d4ce4f65006fcaf712bb7de86bc99 (diff) | |
download | chrome-ec-aa668c1508c263091d26300c8f3372dbc3a808f3.tar.gz |
hatch: Reset TCPCs after boot (HOOK_INIT)
For Hatch baseboard, reset all TCPCs in the system after boot (RO only),
to make sure they're in a known-good state.
BUG=b:142215640
BRANCH=none
TEST=Ensure both TCPC ports still work after wake from hibernate
Change-Id: I13104d4698ccb6905742202f86c6d41fe2b49f84
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1845312
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'baseboard/hatch')
-rw-r--r-- | baseboard/hatch/baseboard.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/baseboard/hatch/baseboard.c b/baseboard/hatch/baseboard.c index 003fc6c755..8e34dbb4d7 100644 --- a/baseboard/hatch/baseboard.c +++ b/baseboard/hatch/baseboard.c @@ -23,6 +23,7 @@ #include "keyboard_scan.h" #include "power.h" #include "stdbool.h" +#include "system.h" #include "tcpci.h" #include "timer.h" #include "usbc_ppc.h" @@ -169,6 +170,10 @@ unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips); /* Power Delivery and charging functions */ void baseboard_tcpc_init(void) { + /* Only reset TCPC if not sysjump */ + if (!system_jumped_to_this_image()) + board_reset_pd_mcu(); + /* Enable PPC interrupts. */ gpio_enable_interrupt(GPIO_USB_C0_PPC_INT_ODL); gpio_enable_interrupt(GPIO_USB_C1_PPC_INT_ODL); |