From 64e6afdefa58008bed34b2fb01ed8895a219a2d5 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 23 Feb 2012 08:58:57 -0800 Subject: [PATCH] stm32l: fix ACOK signal The PMIC_ACOK signal is active-low. Let's drive it correctly. Signed-off-by: Vincent Palatin BUG=None TEST=On ADV board, check that a short key press on the power button is now able to start the board Change-Id: Iea71939aeb532618019a9e7774721703c632976f --- board/adv/board.c | 2 +- board/daisy/board.c | 2 +- common/gaia_power.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/board/adv/board.c b/board/adv/board.c index 58f7cd6c56..67bfc22bcb 100644 --- a/board/adv/board.c +++ b/board/adv/board.c @@ -34,7 +34,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = { {"EN_PP1350", GPIO_A, (1<<9), GPIO_OUT_LOW, NULL}, {"EN_PP5000", GPIO_A, (1<<10), GPIO_OUT_LOW, NULL}, {"EN_PP3300", GPIO_A, (1<<8), GPIO_OUT_LOW, NULL}, - {"PMIC_ACOK", GPIO_A, (1<<12), GPIO_OUT_LOW, NULL}, + {"PMIC_ACOK", GPIO_A, (1<<12), GPIO_OUT_HIGH, NULL}, {"ENTERING_RW", GPIO_B, (1<<1), GPIO_OUT_LOW, NULL}, {"CHARGER_EN", GPIO_B, (1<<2), GPIO_OUT_LOW, NULL}, {"EC_INT", GPIO_B, (1<<9), GPIO_OUT_LOW, NULL}, diff --git a/board/daisy/board.c b/board/daisy/board.c index e98e858ddc..c2a885b01c 100644 --- a/board/daisy/board.c +++ b/board/daisy/board.c @@ -34,7 +34,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = { {"EN_PP1350", GPIO_A, (1<<2), GPIO_OUT_LOW, NULL}, {"EN_PP5000", GPIO_A, (1<<3), GPIO_OUT_LOW, NULL}, {"EN_PP3300", GPIO_A, (1<<8), GPIO_OUT_LOW, NULL}, - {"PMIC_ACOK", GPIO_A, (1<<12), GPIO_OUT_LOW, NULL}, + {"PMIC_ACOK", GPIO_A, (1<<12), GPIO_OUT_HIGH, NULL}, {"ENTERING_RW", GPIO_B, (1<<1), GPIO_OUT_LOW, NULL}, {"CHARGER_EN", GPIO_B, (1<<2), GPIO_OUT_LOW, NULL}, {"EC_INT", GPIO_B, (1<<9), GPIO_OUT_LOW, NULL}, diff --git a/common/gaia_power.c b/common/gaia_power.c index db72efb7fb..502a70eaeb 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -133,7 +133,7 @@ void gaia_power_task(void) usleep(DELAY_5V_SETUP); /* Startup PMIC */ - gpio_set_level(GPIO_PMIC_ACOK, 1); + gpio_set_level(GPIO_PMIC_ACOK, 0); /* wait for all PMIC regulators to be ready */ wait_in_signal(GPIO_PP1800_LDO2, 1, PMIC_TIMEOUT); @@ -149,7 +149,7 @@ void gaia_power_task(void) */ wait_in_signal(GPIO_SOC1V8_XPSHOLD, 1, FAIL_TIMEOUT); /* release PMIC startup signal */ - gpio_set_level(GPIO_PMIC_ACOK, 0); + gpio_set_level(GPIO_PMIC_ACOK, 1); /* Power ON state */ ap_on = 1;