diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-08-10 18:07:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-12 05:23:53 +0000 |
commit | 920ed56368dd0387be1f30a3048e5cc746556abd (patch) | |
tree | 986bb20ec3066b11292f02bc2dba6a8db03d2f43 | |
parent | e6956209119d2b2c1f45401855019e3a0a2f7dd5 (diff) | |
download | chrome-ec-920ed56368dd0387be1f30a3048e5cc746556abd.tar.gz |
trogdor: Add the allow list of the S3 wake sources
Add the allow list of the host events and MKBP events. Without this
allow list, any event will wake the AP up from suspend, that we don't
want.
The "AC plug/unplug" is new to the CrOS requirements.
BRANCH=None
BUG=b:163375086
TEST=Tested the positive wake sources:
* Press a key on the internal keyboard
* Plug AC
* Unplug AC
* Press the power button
* Switch the lid open
* suspend_stress_test which uses RTC host event
and tested the negative wake sources:
* Press the VolUp/VolDown button
Change-Id: If146aa82b66440160ea670554c0510a49ad00e6e
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2348194
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
-rw-r--r-- | baseboard/trogdor/baseboard.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/baseboard/trogdor/baseboard.h b/baseboard/trogdor/baseboard.h index bfc8ed95b6..dffc674acd 100644 --- a/baseboard/trogdor/baseboard.h +++ b/baseboard/trogdor/baseboard.h @@ -181,6 +181,21 @@ #define I2C_PORT_EEPROM NPCX_I2C_PORT5_0 #define I2C_PORT_SENSOR NPCX_I2C_PORT7_0 +/* Define the host events which are allowed to wake AP up from S3 */ +#define CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK \ + (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_RTC) | \ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE)) + +/* And the MKBP events */ +#define CONFIG_MKBP_EVENT_WAKEUP_MASK \ + (BIT(EC_MKBP_EVENT_KEY_MATRIX) | \ + BIT(EC_MKBP_EVENT_HOST_EVENT) | \ + BIT(EC_MKBP_EVENT_SENSOR_FIFO)) + #ifndef __ASSEMBLER__ enum power_signal { |