diff options
author | Scott Chao <scott_chao@wistron.corp-partner.google.com> | 2022-03-14 08:50:53 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-17 02:37:40 +0000 |
commit | c4f19aaf2bb7a33efe58b6c760007baa3539312c (patch) | |
tree | ee7b64ee1fb27aa0999795f7ede0013fe681edd1 | |
parent | 0e73ccb23eb5d8b2c4999f0cb294b90be0785e70 (diff) | |
download | chrome-ec-c4f19aaf2bb7a33efe58b6c760007baa3539312c.tar.gz |
gimble: do not reset PS8815 when AC only during power on
If EC reset PS8815 when AC only, the EN_SINK will not be assert and let SM5360 in dead battery mode. It will result in SM5360's sink power switch keep at close state.
BUG=b:223315425
TEST=make -j BOARD=gimble
TEST=make sure DUT can boot with AC only after EC reset
Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: I98c49e19c1266243c1341732e897f72699ba858a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521001
Reviewed-by: Boris Mittelberg <bmbm@google.com>
-rw-r--r-- | board/gimble/gpio.inc | 2 | ||||
-rw-r--r-- | board/gimble/usbc_config.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/board/gimble/gpio.inc b/board/gimble/gpio.inc index 2aa6267395..2692ab3304 100644 --- a/board/gimble/gpio.inc +++ b/board/gimble/gpio.inc @@ -70,7 +70,7 @@ GPIO(POWER_LED_GATE, PIN(B, 6), GPIO_OUT_LOW) /* Power LED: White */ GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH) GPIO(USB_C0_TCPC_RST_ODL, PIN(A, 7), GPIO_ODR_LOW) GPIO(USB_C1_FRS_EN, PIN(9, 4), GPIO_OUT_LOW) -GPIO(USB_C1_RT_RST_R_ODL, PIN(0, 2), GPIO_ODR_LOW) +GPIO(USB_C1_RT_RST_R_ODL, PIN(0, 2), GPIO_ODR_HIGH) GPIO(VCCST_PWRGD_OD, PIN(A, 4), GPIO_ODR_LOW) /* UART alternate functions */ diff --git a/board/gimble/usbc_config.c b/board/gimble/usbc_config.c index 297d4b5732..fb807299a6 100644 --- a/board/gimble/usbc_config.c +++ b/board/gimble/usbc_config.c @@ -6,6 +6,7 @@ #include <stdint.h> #include <stdbool.h> +#include "battery.h" #include "common.h" #include "compile_time_macros.h" #include "console.h" @@ -173,7 +174,10 @@ void board_reset_pd_mcu(void) { /* Port0 */ gpio_set_level(GPIO_USB_C0_TCPC_RST_ODL, 0); - gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 0); + + if (battery_hw_present()) + gpio_set_level(GPIO_USB_C1_RT_RST_R_ODL, 0); + msleep(GENERIC_MAX(PS8XXX_RESET_DELAY_MS, PS8815_PWR_H_RST_H_DELAY_MS)); |