diff options
author | Tim Lin <tim2.lin@ite.corp-partner.google.com> | 2021-09-08 09:31:59 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-10 17:34:57 +0000 |
commit | e0e63689bfd56b13a4b3a368adb766fe55c155fa (patch) | |
tree | 9b930badfe3972caac1a7407b9238defe2b8b278 | |
parent | d32852ee9bbb890dd82e60c36b50a08631c683dd (diff) | |
download | chrome-ec-e0e63689bfd56b13a4b3a368adb766fe55c155fa.tar.gz |
zephyr: hayato: enable hibernate mode on hayato
The GPIO interrupts that can be waked up in hibernate mode
include GPIO_AC_PRESENT, GPIO_LID_OPEN and GPIO_POWER_BUTTON_L.
BUG=b:198305804
BRANCH=none
TEST=test1:
console command: hibernate
Wake-up GPIO interrupt: GPIO_AC_PRESENT, GPIO_LID_OPEN and
GPIO_POWER_BUTTON_L test pass!
test2:
console command: hibernate [seconds] [microseconds]
After the specified seconds, the EC will wake-up from sleep mode.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Change-Id: Ibd19f14b3a5e2bf47f8edd9205761333d7b0318f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3146774
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | zephyr/projects/asurada/hayato/gpio.dts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/zephyr/projects/asurada/hayato/gpio.dts b/zephyr/projects/asurada/hayato/gpio.dts index a09290374d..f04171651f 100644 --- a/zephyr/projects/asurada/hayato/gpio.dts +++ b/zephyr/projects/asurada/hayato/gpio.dts @@ -7,12 +7,12 @@ named-gpios { compatible = "named-gpios"; - power_button_l { + power_button_l: power_button_l { gpios = <&gpioe 4 (GPIO_INPUT | GPIO_PULL_UP)>; enum-name = "GPIO_POWER_BUTTON_L"; label = "POWER_BUTTON_L"; }; - lid_open { + lid_open: lid_open { gpios = <&gpioe 2 GPIO_INPUT>; enum-name = "GPIO_LID_OPEN"; label = "LID_OPEN"; @@ -90,7 +90,7 @@ enum-name = "GPIO_VOLUME_UP_L"; label = "VOLUME_UP_L"; }; - ac_present { + ac_present: ac_present { gpios = <&gpioe 5 GPIO_INPUT>; enum-name = "GPIO_AC_PRESENT"; label = "AC_PRESENT"; @@ -320,6 +320,13 @@ }; }; + hibernate-wake-pins { + compatible = "cros-ec,hibernate-wake-pins"; + wakeup-pins = <&ac_present + &power_button_l + &lid_open>; + }; + unused-pins { compatible = "unused-gpios"; |