diff options
author | Eric Yilun Lin <yllin@google.com> | 2023-04-25 06:13:37 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-25 07:30:06 +0000 |
commit | 11de52e28ce14620c634653d733180a82ddd2404 (patch) | |
tree | 39451011f5c0c75d5861e03baf2cc38c227d0075 /zephyr/program/corsola/src/npcx_usbc.c | |
parent | 4bd705ffa6b507570c1fbad61aa87addb1c023cd (diff) | |
download | chrome-ec-11de52e28ce14620c634653d733180a82ddd2404.tar.gz |
Revert "kingler: only reset TCPC with power-on reset flag"
This reverts commit 4bd705ffa6b507570c1fbad61aa87addb1c023cd.
Reason for revert: C1 port might malfunction some time.
Original change's description:
> kingler: only reset TCPC with power-on reset flag
>
> Reset the TCPC after a power-on restart, and clear any explicit
> PD contract so that the previous state is not restored. The TCPC
> reset is not needed on starting up with EFS2 enabled since the
> contract will be established after entering RW.
>
> This fixes that while the EC soft-reset is issued, the TCPC
> will be reset on the starting up, and this will cause a brown-out
> if no battery connected.
>
> BUG=b:276661970
> TEST=steelix with AC only, no battery, issue reboot and system boots.
> BRANCH=none
>
> Change-Id: I17f9f3122a51a179996e1a950a18887cb2a5c8be
> Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439429
> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
> Tested-by: Eric Yilun Lin <yllin@google.com>
> Commit-Queue: Eric Yilun Lin <yllin@google.com>
Bug: b:276661970
Change-Id: I795b1449b7feef89737c3110500f34983614c169
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4473847
Tested-by: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Auto-Submit: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'zephyr/program/corsola/src/npcx_usbc.c')
-rw-r--r-- | zephyr/program/corsola/src/npcx_usbc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/zephyr/program/corsola/src/npcx_usbc.c b/zephyr/program/corsola/src/npcx_usbc.c index 16d736338f..0ee6a43dc1 100644 --- a/zephyr/program/corsola/src/npcx_usbc.c +++ b/zephyr/program/corsola/src/npcx_usbc.c @@ -53,11 +53,8 @@ DECLARE_HOOK(HOOK_INIT, board_usb_mux_init, HOOK_PRIO_INIT_I2C + 1); void board_tcpc_init(void) { - /* 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_jumped_late() && - (system_get_reset_flags() & EC_RESET_FLAG_POWER_ON)) { + /* Only reset TCPC if not sysjump */ + if (!system_jumped_late()) { /* TODO(crosbug.com/p/61098): How long do we need to wait? */ board_reset_pd_mcu(); } @@ -85,12 +82,7 @@ __override int board_rt1718s_init(int port) { static bool gpio_initialized; - /* Reset TCPC sink/source control when it's a power-on reset. Do not - * alter the carried GPIO status or this might stop PPC sinking and - * brown-out the system when battery disconnected. - */ - if (!system_jumped_late() && !gpio_initialized && - (system_get_reset_flags() & EC_RESET_FLAG_POWER_ON)) { + if (!system_jumped_late() && !gpio_initialized) { /* set GPIO 1~3 as push pull, as output, output low. */ rt1718s_gpio_set_flags(port, RT1718S_GPIO1, GPIO_OUT_LOW); rt1718s_gpio_set_flags(port, RT1718S_GPIO2, GPIO_OUT_LOW); |