diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-08-14 12:13:11 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-22 11:50:53 -0700 |
commit | 9f32da87b6cba2df4a448bcb37c7d64a80ac2010 (patch) | |
tree | d2cf4fd8ce6809634fabc98cedde9e7e456e0500 /common | |
parent | 31d9a1294e11e554c704d515b6752b81da934e1c (diff) | |
download | chrome-ec-9f32da87b6cba2df4a448bcb37c7d64a80ac2010.tar.gz |
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>
Diffstat (limited to 'common')
-rw-r--r-- | common/gaia_power.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/gaia_power.c b/common/gaia_power.c index bee1d9e0ed..42b294b234 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -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); |