diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-07-14 12:39:51 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-15 02:05:54 +0000 |
commit | 88ef0bc44e1b3296a75e17011ae2ffb11883f8f7 (patch) | |
tree | 0a5946a9cb59c27af293ab0aecf7f813b109b708 /board/glados | |
parent | ac1cba419ab507163dcb6dc9d6be1401f3f1f518 (diff) | |
download | chrome-ec-88ef0bc44e1b3296a75e17011ae2ffb11883f8f7.tar.gz |
skylake: Disable power rails and components when appropriate
- Disable USB, wireless and audio power rail when powering down from S3
- Disable sensor power rail and display backlight when powering down
from S0
BUG=chrome-os-partner:42104
TEST=Manual on Glados. Boot AP, verify that display backlight and USB
are functional.
BRANCH=None
Change-Id: I2879f57db555753b280e785df3d2cc967c152f21
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/285545
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board/glados')
-rw-r--r-- | board/glados/board.c | 27 | ||||
-rw-r--r-- | board/glados/gpio.inc | 12 |
2 files changed, 33 insertions, 6 deletions
diff --git a/board/glados/board.c b/board/glados/board.c index 11d0336990..de404d83ae 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -302,3 +302,30 @@ void board_set_charge_limit(int charge_ma) CONFIG_CHARGER_INPUT_CURRENT)); } +/* Called on AP S5 -> S3 transition */ +void board_chipset_startup(void) +{ + gpio_set_level(GPIO_PP1800_DX_AUDIO_EN, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT); + +/* Called on AP S3 -> S5 transition */ +void board_chipset_shutdown(void) +{ + gpio_set_level(GPIO_PP1800_DX_AUDIO_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT); + +/* Called on AP S3 -> S0 transition */ +void board_chipset_resume(void) +{ + gpio_set_level(GPIO_PP1800_DX_SENSOR_EN, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + +/* Called on AP S0 -> S3 transition */ +void board_chipset_suspend(void) +{ + gpio_set_level(GPIO_PP1800_DX_SENSOR_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); diff --git a/board/glados/gpio.inc b/board/glados/gpio.inc index fb91de3300..ef38331675 100644 --- a/board/glados/gpio.inc +++ b/board/glados/gpio.inc @@ -43,8 +43,8 @@ GPIO(I2C3_SDA, PIN(25), GPIO_INPUT) GPIO(PCH_SCI_L, PIN(26), GPIO_ODR_HIGH) /* KB BL PWM, only connected to TP */ GPIO(PWM_KBLIGHT, PIN(34), GPIO_OUT_LOW) -GPIO(USB1_ENABLE, PIN(36), GPIO_OUT_HIGH) -GPIO(USB2_ENABLE, PIN(67), GPIO_OUT_HIGH) +GPIO(USB1_ENABLE, PIN(36), GPIO_OUT_LOW) +GPIO(USB2_ENABLE, PIN(67), GPIO_OUT_LOW) GPIO(ENTERING_RW, PIN(41), GPIO_OUT_LOW) GPIO(PCH_SMI_L, PIN(44), GPIO_ODR_HIGH) GPIO(PCH_PWRBTN_L, PIN(45), GPIO_OUTPUT) @@ -79,13 +79,13 @@ GPIO(USB_C0_5V_EN, PIN(154), GPIO_OUT_LOW) GPIO(USB_C1_5V_EN, PIN(204), GPIO_OUT_LOW) GPIO(USB_C0_CHARGE_EN_L, PIN(64), GPIO_OUT_LOW) GPIO(USB_C1_CHARGE_EN_L, PIN(157), GPIO_OUT_LOW) -GPIO(PP1800_DX_SENSOR_EN, PIN(11), GPIO_OUT_HIGH) -GPIO(PP1800_DX_AUDIO_EN, PIN(160), GPIO_OUT_HIGH) +GPIO(PP1800_DX_SENSOR_EN, PIN(11), GPIO_OUT_LOW) +GPIO(PP1800_DX_AUDIO_EN, PIN(160), GPIO_OUT_LOW) GPIO(PCH_RTCRST, PIN(163), GPIO_OUT_LOW) /* From lid sensor */ GPIO(TABLET_MODE, PIN(201), GPIO_INPUT | GPIO_PULL_UP) -GPIO(ENABLE_BACKLIGHT, PIN(202), GPIO_OUT_HIGH) -GPIO(PP3300_WLAN_EN, PIN(203), GPIO_OUT_HIGH) +GPIO(ENABLE_BACKLIGHT, PIN(202), GPIO_OUT_LOW) +GPIO(PP3300_WLAN_EN, PIN(203), GPIO_OUT_LOW) GPIO(EC_WAKE_CLK, PIN(210), GPIO_INPUT) GPIO(BOARD_ID0, PIN(6), GPIO_INPUT) GPIO(BOARD_ID1, PIN(7), GPIO_INPUT) |