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>
This commit is contained in:
Kevin K Wong
2016-06-21 19:11:10 -07:00
committed by chrome-bot
parent d8b545b177
commit 4d37fe58bb

View File

@@ -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); */