summaryrefslogtreecommitdiff
path: root/baseboard
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-01-16 15:17:33 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-21 23:55:45 +0000
commit7616354e44fb36d2721bc6bdb6bd8d18697fd60b (patch)
tree0eed47614d1feaf7211825b16fa172d026639103 /baseboard
parent23b0af225ef6cc09d5725343a0b7ae211ad53f86 (diff)
downloadchrome-ec-7616354e44fb36d2721bc6bdb6bd8d18697fd60b.tar.gz
dedede: Add z-state support
Dedede has support for the new low power "Z-state". In this state. the EC and H1 are unpowered, but power will be restored to the EC once one of the wakeup events occurs. These events are ACOK, lid open, and a power button press. This commit simply enables the Z-state when the EC hibernates. BUG=b:147819424 BRANCH=None TEST=build and flash waddledoo, enter `hibernate`, verify that EC power is turned off and can be restored by pressing the power button or plugging in a charger. Change-Id: I4f93efd0632f457354f4bf6bf0274b19a9cd799c Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2006215 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r--baseboard/dedede/baseboard.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/baseboard/dedede/baseboard.c b/baseboard/dedede/baseboard.c
index c5b5f7ae7a..e68b955849 100644
--- a/baseboard/dedede/baseboard.c
+++ b/baseboard/dedede/baseboard.c
@@ -58,3 +58,12 @@ void baseboard_chipset_shutdown(void)
}
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, baseboard_chipset_shutdown,
HOOK_PRIO_DEFAULT);
+
+void board_hibernate_late(void)
+{
+ /*
+ * Turn on the Z state. This will not return as it will cut power to
+ * the EC.
+ */
+ gpio_set_level(GPIO_EN_SLP_Z, 1);
+}