mb/google/octopus/variants/ampton: Resume from suspend on critical battery

This patch makes Ampton EC wake up AP from s0ix when the state of
charge drops to 2%.

Demonstrated as follows:

1. Boot Ampton.
2. Run powerd_dbus_suspend.
3. On EC, run battfake 2.
4. System resumes.

BUG=b:189540432
BRANCH=Octopus
TEST=Verified on Ampton.

Change-Id: I98d8e6ea185e8782ad675d4668678b341ca5d350
Signed-off-by: James Chao <james_chao@asus.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56341
Reviewed-by: Marco Chen <marcochen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
James Chao 2021-07-15 22:34:05 +08:00 committed by Patrick Georgi
parent 0f88f6ff92
commit 430f0b4455
1 changed files with 5 additions and 0 deletions

View File

@ -8,4 +8,9 @@
/* Enable EC sync interrupt, EC_SYNC_IRQ is defined in variant/gpio.h */
#define EC_ENABLE_SYNC_IRQ
#undef MAINBOARD_EC_S0IX_WAKE_EVENTS
#define MAINBOARD_EC_S0IX_WAKE_EVENTS \
(MAINBOARD_EC_S3_WAKE_EVENTS |\
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN))
#endif