diff options
author | Wai-Hong Tam <waihong@google.com> | 2021-08-23 15:28:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-24 17:40:11 +0000 |
commit | 450b17c6ecfd50c4861824400896baa5b7a85231 (patch) | |
tree | bd9c9ef97c85d243b4c890a59903cda6ec5b9cf9 /zephyr | |
parent | d2c9b677dfaea4f89e6799dddc5f2583fddcfe4a (diff) | |
download | chrome-ec-450b17c6ecfd50c4861824400896baa5b7a85231.tar.gz |
zephyr: herobrine_npcx9: Enable PSL and define psl-in-pads binding
Enable the PSL mode for EC hibernate and define psl-in-pads DT binding.
After EC enters hibernate, the PSL_OUT is off and the PPC chip is
powered off. So the PPC chip can be woken up from the dead battery
mode when the external AC is plugged.
The DT binding is defined in the project DT. It enables the board DT
more shareable, no custom-board configuration.
BRANCH=None
BUG=b:193583152, b:196405396
TEST=Entered EC hibernate, verified the following wake sources:
* plugging AC,
* pressing power button,
* lid open (servo emulated).
Change-Id: Ibe12d6ec45980cd41a306ad01f39e45456f3bcdd
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115437
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/projects/herobrine/herobrine_npcx9/gpio.dts | 26 | ||||
-rw-r--r-- | zephyr/projects/herobrine/herobrine_npcx9/prj.conf | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/zephyr/projects/herobrine/herobrine_npcx9/gpio.dts b/zephyr/projects/herobrine/herobrine_npcx9/gpio.dts index 9373d1fa6c..1c63f3875c 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/gpio.dts +++ b/zephyr/projects/herobrine/herobrine_npcx9/gpio.dts @@ -306,6 +306,11 @@ >; }; + vsby-psl-in-list { + /* Use PSL_IN1/2/3/4 as detection pins from hibernate mode */ + psl-in-pads = <&psl_in1 &psl_in2 &psl_in3 &psl_in4>; + }; + sku { compatible = "cros-ec,gpio-id"; @@ -359,3 +364,24 @@ <&gpio8 1 0>; }; }; + +/* Power switch logic input pads */ +&psl_in1 { + /* ACOK_OD */ + flag = <NPCX_PSL_RISING_EDGE>; +}; + +&psl_in2 { + /* EC_PWR_BTN_ODL */ + flag = <NPCX_PSL_FALLING_EDGE>; +}; + +&psl_in3 { + /* LID_OPEN_EC */ + flag = <NPCX_PSL_RISING_EDGE>; +}; + +&psl_in4 { + /* RTC_EC_WAKE_ODL */ + flag = <NPCX_PSL_FALLING_EDGE>; +}; diff --git a/zephyr/projects/herobrine/herobrine_npcx9/prj.conf b/zephyr/projects/herobrine/herobrine_npcx9/prj.conf index 692e384e2e..bcaa22fad0 100644 --- a/zephyr/projects/herobrine/herobrine_npcx9/prj.conf +++ b/zephyr/projects/herobrine/herobrine_npcx9/prj.conf @@ -19,6 +19,9 @@ CONFIG_SHELL_HISTORY=y CONFIG_SHELL_TAB=y CONFIG_SHELL_TAB_AUTOCOMPLETION=y +# Miscellaneous configs +CONFIG_PLATFORM_EC_HIBERNATE_PSL=y + # LED CONFIG_PLATFORM_EC_LED_COMMON=y |