summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2017-03-30 17:08:09 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-09-15 20:34:32 +0000
commitd65d216518dbad495e04f1ff8c614422a09d14ad (patch)
treea49bacc0d8624d49d4eae056e0c6a66591361093
parenta67cb3d8576de25419b803f305eb97bb9d2af3bc (diff)
downloadchrome-ec-d65d216518dbad495e04f1ff8c614422a09d14ad.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> (cherry picked from commit f7f3f249ee14785e0f5164c290521dd7f331859c) Reviewed-on: https://chromium-review.googlesource.com/669500 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Vadim Bendebury <vbendeb@chromium.org> Trybot-Ready: Vadim Bendebury <vbendeb@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);