summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-10-04 16:48:17 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-10-17 17:40:47 -0700
commitd9b7d25b86f0529ee6ae9d3da02b60ff6903bc6d (patch)
tree991540c98cc7b670765f6ef9e945b3692068be86 /power
parentaec1eb35e7648d5ac1acc8af1c6e703d5c9135c0 (diff)
downloadchrome-ec-d9b7d25b86f0529ee6ae9d3da02b60ff6903bc6d.tar.gz
power: rk3399: Debounce PGOOD_SYS signal
PGOOD_SYS may glitch for a period not to exceed 1ms. When PGOOD_SYS or PGOOD_AP are deasserted, wait for up to 100ms for both signals return before transitioning out of S0. BUG=chrome-os-partner:56822 BRANCH=gru TEST=Manual on kevin, boot device and verify it remains in S0 without spurious transitions to S3. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I95ccae54fc5939c835f00dc9b7cf88b9d0553c11 Reviewed-on: https://chromium-review.googlesource.com/393148 Reviewed-by: David Schneider <dnschneid@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit b867d3fc9dea04ac65f5288fb99d3ed65c127644) Reviewed-on: https://chromium-review.googlesource.com/396139 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/rk3399.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/power/rk3399.c b/power/rk3399.c
index 3c35b6e3fb..29d5b51051 100644
--- a/power/rk3399.c
+++ b/power/rk3399.c
@@ -144,9 +144,11 @@ enum power_state power_handle_state(enum power_state state)
/*
* Wait up to PGOOD_AP_DEBOUNCE_TIMEOUT for IN_PGOOD_AP to
- * come back before transitioning back to S3.
+ * come back before transitioning back to S3. PGOOD_SYS can
+ * also glitch, with a glitch duration < 1ms, so debounce
+ * it here as well.
*/
- if (power_wait_signals_timeout(IN_PGOOD_AP,
+ if (power_wait_signals_timeout(IN_PGOOD_AP | IN_PGOOD_SYS,
PGOOD_AP_DEBOUNCE_TIMEOUT)
== EC_ERROR_TIMEOUT)
return POWER_S0S3;