diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-09-14 23:10:02 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-21 01:07:53 -0700 |
commit | d9a7b48d352a654e47e3b9233952ab3337da7bcb (patch) | |
tree | 98bf515b474f0b71fe314d593a707654ff90a3e5 | |
parent | d2e5de8529ea51677409358ada4f5eab210e6232 (diff) | |
download | chrome-ec-d9a7b48d352a654e47e3b9233952ab3337da7bcb.tar.gz |
zoombini: Add Power Switch Logic support.
This commit enables the PSL pins for zoombini. Previously, we were
initializing the PSL_OUT pin to high, but it actually turns out that
setting the output from a 0 to a 1 indicates that the firmware wants to
remove Vcc1. This caused the EC to not boot up. This commit removes
the improper initialization of the GPIO and additionally sets up the
hibernate wake pins accordingly such that they can be used by the PSL
glue logic.
BUG=b:65647213
BRANCH=None
TEST=Flash zoombini without rework. Verify board comes up okay.
TEST=Enter `hibernate` on console; Verify board goes to sleep. Verify
that each hibernate wake pins wakes up the board successfully.
Change-Id: Ife1b82eec7957b44bbe409cdeba9c3972168812f
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/670062
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/zoombini/board.c | 1 | ||||
-rw-r--r-- | board/zoombini/board.h | 1 | ||||
-rw-r--r-- | board/zoombini/gpio.inc | 9 |
3 files changed, 7 insertions, 4 deletions
diff --git a/board/zoombini/board.c b/board/zoombini/board.c index 589b764895..2a3bba6ea0 100644 --- a/board/zoombini/board.c +++ b/board/zoombini/board.c @@ -48,7 +48,6 @@ static void tcpc_alert_event(enum gpio_signal s) #include "gpio_list.h" -/* TODO(aaboagye): Handle PSL? */ const enum gpio_signal hibernate_wake_pins[] = { GPIO_LID_OPEN, GPIO_AC_PRESENT, diff --git a/board/zoombini/board.h b/board/zoombini/board.h index 01b0f53769..ae746d8a6e 100644 --- a/board/zoombini/board.h +++ b/board/zoombini/board.h @@ -9,6 +9,7 @@ #define __CROS_EC_BOARD_H /* Optional features */ +#define CONFIG_HIBERNATE_PSL #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands. */ /* NPCX7 config */ diff --git a/board/zoombini/gpio.inc b/board/zoombini/gpio.inc index 30984da7d1..e0a5dbbd55 100644 --- a/board/zoombini/gpio.inc +++ b/board/zoombini/gpio.inc @@ -14,8 +14,8 @@ GPIO_INT(USB_C2_PD_INT_L, PIN(9, 5), GPIO_INT_FALLING, tcpc_alert_event) GPIO_INT(POWER_BUTTON_L, PIN(0, 1), GPIO_INT_BOTH | GPIO_PULL_UP, power_button_interrupt) GPIO_INT(WP_L, PIN(A, 1), GPIO_INT_BOTH, switch_interrupt) -GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH, lid_interrupt) -GPIO_INT(AC_PRESENT, PIN(0, 0), GPIO_INT_BOTH, extpower_interrupt) +GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, lid_interrupt) +GPIO_INT(AC_PRESENT, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt) /* Power Signals. */ GPIO_INT(PCH_SLP_S0_L, PIN(A, 4), GPIO_INT_BOTH, power_signal_interrupt) @@ -31,7 +31,6 @@ GPIO_INT(PMIC_INT_L, PIN(D, 5), GPIO_INT_FALLING | GPIO_PULL_UP, power_sign /* Power Enables. */ GPIO(EN_PP3300_DSW, PIN(6, 0), GPIO_OUT_HIGH) -GPIO(EN_PP3300_EC_TCPC_DX, PIN(8, 5), GPIO_OUT_HIGH) GPIO(EN_PP3300_TRACKPAD, PIN(B, 7), GPIO_OUT_LOW) GPIO(EN_PP3300_WLAN, PIN(C, 0), GPIO_OUT_LOW) GPIO(EN_PP3300_WWAN, PIN(D, 7), GPIO_OUT_LOW) @@ -116,3 +115,7 @@ ALTERNATE(PIN_MASK(C, 0x18), 1, MODULE_PWM, 0) /* LED 1 & 2 */ ALTERNATE(PIN_MASK(8, 0x01), 1, MODULE_PWM, 0) /* KB Backlight */ /* ADC */ ALTERNATE(PIN_MASK(4, 0x30), 1, MODULE_ADC, 0) /* ADC0-1 */ + +/* Power Switch Logic (PSL) inputs */ +ALTERNATE(PIN_MASK(0, 0x03), 1, MODULE_PMU, 0) /* GPIO00, GPIO01 */ +ALTERNATE(PIN_MASK(D, 0x04), 1, MODULE_PMU, 0) /* GPIOD2 */ |