gaia: Assert PMIC_PWRON_L only if XPSHOLD is low

This is intended to prevent accidental AP reboot when soft rebooting
the EC, e.g. via sysjump during firmware updates. For our platforms,
the PMIC_PWRON_L causes the AP to see a keyboard power button press.

Signed-off-by: David Hendricks <dhendrix@chromium.org>
BRANCH=snow
BUG=chrome-os-partner:12650
TEST=sysjump via "ectool reboot_ec RW" or firmware update no longer
causes AP to reboot,

Change-Id: Ife227285499d5cd52d6a0cb0ebe5df2f51d706d4
Reviewed-on: https://gerrit.chromium.org/gerrit/30291
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
David Hendricks
2012-08-14 12:13:11 -07:00
committed by Gerrit
parent 31d9a1294e
commit 9f32da87b6

View File

@@ -357,8 +357,13 @@ static int power_on(void)
/* wait to have stable power */
usleep(DELAY_5V_SETUP);
/* Startup PMIC */
gpio_set_level(GPIO_PMIC_PWRON_L, 0);
/*
* Initiate PMIC power-on sequence only if cold booting AP to
* avoid accidental reset (crosbug.com/p/12650).
*/
if (gpio_get_level(GPIO_SOC1V8_XPSHOLD) == 0)
gpio_set_level(GPIO_PMIC_PWRON_L, 0);
/* wait for all PMIC regulators to be ready */
wait_in_signal(GPIO_PP1800_LDO2, 1, PMIC_TIMEOUT);