summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2017-03-30 17:08:09 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-03-31 12:59:16 -0700
commitf7f3f249ee14785e0f5164c290521dd7f331859c (patch)
tree4c0b6b23d534c9e7dd36d984708c20bfc5371527
parent38aabbbc6ca30e3d00e76778dc43807aadd788f3 (diff)
downloadchrome-ec-f7f3f249ee14785e0f5164c290521dd7f331859c.tar.gz
g: rbox: Let pins stabilize before releasing EC.
When releasing the PINMUX hold, some of the output levels may change. Therefore, it's probably best to let those outputs stabilize before letting the EC out of reset and sample them. BUG=b:36659750 BRANCH=master,cr50 TEST=Flash Cr50. Verify that WP_L is stable before EC is released from reset. Change-Id: Ie2967c5e97f28240e1724b4531655c5dd08a3f29 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/464257 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r--chip/g/rbox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/chip/g/rbox.c b/chip/g/rbox.c
index e7be79538c..2be1e19c11 100644
--- a/chip/g/rbox.c
+++ b/chip/g/rbox.c
@@ -42,11 +42,15 @@ void rbox_powerbtn_press(void)
static void rbox_release_ec_reset(void)
{
+ /* Unfreeze the PINMUX */
+ GREG32(PINMUX, HOLD) = 0;
+
+ /* Allow some time for outputs to stabilize. */
+ usleep(500);
+
/* Let the EC go (the RO bootloader asserts it ASAP after POR) */
GREG32(RBOX, ASSERT_EC_RST) = 0;
- /* And unfreeze the PINMUX */
- GREG32(PINMUX, HOLD) = 0;
}
DECLARE_HOOK(HOOK_INIT, rbox_release_ec_reset, HOOK_PRIO_LAST);