From aa668c1508c263091d26300c8f3372dbc3a808f3 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 7 Oct 2019 10:51:25 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1845312 Reviewed-by: Paul Fagerburg Reviewed-by: Furquan Shaikh --- baseboard/hatch/baseboard.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'baseboard/hatch') 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); -- cgit v1.2.1