summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin K Wong <kevin.k.wong@intel.com>2016-06-21 19:11:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-23 03:28:26 -0700
commit4d37fe58bbbe3349db3b828ce1a1f7ac282b710a (patch)
tree34e7bb6c6f6642da70405413b840db64c06ebf1d
parentd8b545b17720ebbbefd9518071b8e8441faacc6e (diff)
downloadchrome-ec-4d37fe58bbbe3349db3b828ce1a1f7ac282b710a.tar.gz
reef: force PMIC reset on initial boot
On EC reset where PMIC_EN will be pulled low, PMIC could get into an unknown state and will not sequence properly on sub-sequent boot. This is a temporary workaround for Reef Proto, a hardware change will be implemented on EVT. BUG=chrome-os-partner:53974,chrome-os-partner:54507 BRANCH=none TEST=Reef powers to S0 and starts coreboot after EC reset Tested with servo cold reset button and console reboot command Change-Id: I32aa004b000895da2c97d1014a8ef48c0a98779d Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/354762 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/reef/board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/reef/board.c b/board/reef/board.c
index 226925098f..324ff47941 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -285,6 +285,23 @@ DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT);
/* Initialize board. */
static void board_init(void)
{
+ /*
+ * FIXME: Not required for EVT which PMIC will reset properly
+ *
+ * By removing the power rail while PMIC is enabled,
+ * PMIC will sense a power fault and reset itself.
+ */
+ if (!system_jumped_to_this_image()) {
+ /* Disable all power rail */
+ gpio_set_level(GPIO_EN_PP3300, 0);
+ gpio_set_level(GPIO_EN_PP5000, 0);
+
+ /* Toggle PMIC_EN */
+ gpio_set_level(GPIO_V5A_EN, 1);
+ msleep(500);
+ gpio_set_level(GPIO_V5A_EN, 0);
+ }
+
/* FIXME: Handle tablet mode */
/* gpio_enable_interrupt(GPIO_TABLET_MODE_L); */