summaryrefslogtreecommitdiff
path: root/chip/it83xx/clock.c
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 /chip/it83xx/clock.c
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 'chip/it83xx/clock.c')
-rw-r--r--chip/it83xx/clock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/chip/it83xx/clock.c b/chip/it83xx/clock.c
index 7c679bffbe..0fd7335080 100644
--- a/chip/it83xx/clock.c
+++ b/chip/it83xx/clock.c
@@ -465,7 +465,12 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds)
}
/* bit5: watchdog is disabled. */
IT83XX_ETWD_ETWCTRL |= BIT(5);
- /* Setup GPIOs for hibernate */
+
+ /*
+ * Setup GPIOs for hibernate. On some boards, it's possible that this
+ * may not return at all. On those boards, power to the EC is likely
+ * being turn off entirely.
+ */
if (board_hibernate_late)
board_hibernate_late();