kirby: Pull XPSHOLD low to shut down the AP

On Kirby, the EC has no direct control over several power rails. To shut
down the AP, we need to pull low XPSHOLD from the EC so that PMIC would
turn off AP power.

BUG=chrome-os-partner:22101
TEST=Repeatedly do 'power on' and 'power off'.
TEST=Reboot the EC and see AP booted.
BRANCH=None

Change-Id: I21d04e46a6cfb455ced073389a928f2549d5212d
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167201
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vic Yang
2013-08-28 10:47:57 +08:00
committed by chrome-internal-fetch
parent 04da610528
commit b99f913107

View File

@@ -57,6 +57,9 @@
/* Long power key press to force shutdown */
#define DELAY_FORCE_SHUTDOWN (8 * SECOND)
/* Time necessary for pulling down XPSHOLD to shutdown PMIC power */
#define DELAY_XPSHOLD_PULL (2 * MSEC)
/*
* If the power key is pressed to turn on, then held for this long, we
* power off.
@@ -375,6 +378,12 @@ void chipset_reset(int is_cold)
void chipset_force_shutdown(void)
{
#ifdef BOARD_kirby
gpio_set_flags(GPIO_SOC1V8_XPSHOLD, GPIO_ODR_LOW);
udelay(DELAY_XPSHOLD_PULL);
gpio_set_flags(GPIO_SOC1V8_XPSHOLD, GPIO_INT_RISING | GPIO_INPUT);
#endif
/* Turn off all rails */
gpio_set_level(GPIO_EN_PP3300, 0);
#ifdef CONFIG_CHIPSET_HAS_PP1350