diff options
author | Mulin Chao <mlchao@nuvoton.com> | 2016-01-13 13:09:38 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-14 22:12:05 -0800 |
commit | 77abb5072e8a674d5908dd2366583148858e56c9 (patch) | |
tree | 60e5ed6c060adf327628d0789e0147b5100c861d /board/npcx_evb | |
parent | a50b12ef9743c911d968e7bf083acc22f691c7c7 (diff) | |
download | chrome-ec-77abb5072e8a674d5908dd2366583148858e56c9.tar.gz |
nuc: Support hibernate_wake_pins on wheatley, npcx_evb and npcx_evb_arm.
Modified hibernate funcs to support hibernate_wake_pins on weatley, npcx_evb
and npcx_evb_arm.
For better power consumption, we disable ADC, tri-state spi pins, all inputs
of wake-ups to prevent leakage current caused by input floating and set
necessary GPIOs' states in hibernate function.
Modified drivers:
1. npcx_evb/board.c: Add hibernate_wake_pins array for hibernate.
2. npcx_evb_arm/board.c: : Add hibernate_wake_pins array for hibernate.
3. wheatley/board.c: Add hibernate_wake_pins array for hibernate.
4. wheatley/board.c: Add board_set_gpio_state_hibernate func for adjusting
GPIOs' status related to board for better power consumption.
5. hwtimer.c: Remove unnecessary interrupt_enable/disable funcs. Interrupt
will disable before it is called.
6. register.h: Add WKINEN definition and declarations used for hibernate.
7. system.c: Add system_set_gpios_and_wakeup_inputs_hibernate to set GPIOs'
state and wake-up inputs before entering hibernate.
8. system_chip.h: Remove unused BBRM_DATA_INDEX_PBUTTON field.
9. gpio.c: Enable WKINEN in gpio_set_flags_by_mask func.
BUG=chrome-os-partner:34346
TEST=make buildall -j; test nuvoton IC specific drivers
BRANCH=none
Change-Id: Ic85814065464095fdcb7a75964c2c528d8f8e62f
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/321466
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/npcx_evb')
-rw-r--r-- | board/npcx_evb/board.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/npcx_evb/board.c b/board/npcx_evb/board.c index aebd379e63..dd30fa8d97 100644 --- a/board/npcx_evb/board.c +++ b/board/npcx_evb/board.c @@ -91,6 +91,13 @@ const struct spi_device_t spi_devices[] = { const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); /******************************************************************************/ +/* Wake-up pins for hibernate */ +const enum gpio_signal hibernate_wake_pins[] = { + GPIO_POWER_BUTTON_L, +}; +const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); + +/******************************************************************************/ /* Keyboard scan setting */ struct keyboard_scan_config keyscan_config = { .output_settle_us = 40, |