diff options
author | Andrew McRae <amcrae@google.com> | 2020-06-04 11:21:37 +1000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-04 11:15:06 +0000 |
commit | 41a79a40de6b668a68c20463087a124b4e11dcc1 (patch) | |
tree | 9ad3523d1116bc997a8d57dadba84df00332fee1 /board/puff | |
parent | cb2a4b7a3b8ccb123ffb270057228d8635d357a8 (diff) | |
download | chrome-ec-41a79a40de6b668a68c20463087a124b4e11dcc1.tar.gz |
Kaisa: Reset TCPC after system reset.
Reset the TCPC even in RW if there has been a system reset
or after power on.
BUG=b:155145509
TEST=Confirm on Kaisa that type-C power replug works.
BRANCH=none
Change-Id: Ib9fc1298cf165aed2ee386a7f158ee73ba15eb37
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2227788
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Diffstat (limited to 'board/puff')
-rw-r--r-- | board/puff/board.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/board/puff/board.c b/board/puff/board.c index f6f6d8db8e..8a2a89ae62 100644 --- a/board/puff/board.c +++ b/board/puff/board.c @@ -474,8 +474,13 @@ const int usb_port_enable[USB_PORT_COUNT] = { /* Power Delivery and charging functions */ static void board_tcpc_init(void) { - /* Only reset TCPC if not sysjump */ - if (!system_jumped_to_this_image()) + /* + * Reset TCPC if we have had a system reset. + * With EFSv2, it is possible to be in RW without + * having reset the TCPC. + */ + if (system_get_reset_flags() & + (EC_RESET_FLAG_RESET_PIN | EC_RESET_FLAG_POWER_ON)) board_reset_pd_mcu(); /* Enable TCPC interrupts. */ gpio_enable_interrupt(GPIO_USB_C0_TCPPC_INT_ODL); @@ -500,7 +505,6 @@ int64_t get_time_dsw_pwrok(void) void board_reset_pd_mcu(void) { - /* Maybe should only reset if we are powered off barreljack */ int level = !!(tcpc_config[USB_PD_PORT_TCPC_0].flags & TCPC_FLAGS_RESET_ACTIVE_HIGH); |