summaryrefslogtreecommitdiff
path: root/board/trogdor/board.c
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-10-07 17:02:51 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-08 21:58:14 +0000
commit61c3590ddefc3e5119bad6e0a8d3c27921537e00 (patch)
tree487191f43565581ce81278e902d9dbe128044f8c /board/trogdor/board.c
parent255b4be3b644bb75dcacd7d411dbd8acb4f9e9b6 (diff)
downloadchrome-ec-61c3590ddefc3e5119bad6e0a8d3c27921537e00.tar.gz
Trogdor: Enable PPC power sink path before hibernate on old boards
The old boards don't have the hardware fix b/169797080. They need the workaround to make ACOK functional to wake EC up from hibernate. EC enables the PPC power sink path before EC enters hibernate, such that the ACOK won't be blocked by PPC. Otherwise, the PPC keeps the sink path disconnected; ACOK won't go High and can't wake EC up. Do it in board_hibernate() instead of board_hibernate_late(), which has I2C disabled. BRANCH=None BUG=b:170324206 TEST=Tested on Lazor, without the hardware rework. Triggered EC into hibernate; plugging AC can wake EC up. Change-Id: I3a97f59a344aff88b12fb19e2ea3ae126d1a8715 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2461939 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'board/trogdor/board.c')
-rw-r--r--board/trogdor/board.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/trogdor/board.c b/board/trogdor/board.c
index b39e100b56..193ff8f96a 100644
--- a/board/trogdor/board.c
+++ b/board/trogdor/board.c
@@ -313,6 +313,19 @@ void board_tcpc_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C+1);
+void board_hibernate(void)
+{
+ int i;
+
+ /*
+ * Enable the PPC power sink path before EC enters hibernate;
+ * otherwise, ACOK won't go High and can't wake EC up. Check the
+ * bug b/170324206 for details.
+ */
+ for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++)
+ ppc_vbus_sink_enable(i, 1);
+}
+
/* Called on AP S0 -> S3 transition */
static void board_chipset_suspend(void)
{