From 430f0b44554d1f48faa817b6316c30dca2a4f18e Mon Sep 17 00:00:00 2001 From: James Chao Date: Thu, 15 Jul 2021 22:34:05 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56341 Reviewed-by: Marco Chen Tested-by: build bot (Jenkins) --- src/mainboard/google/octopus/variants/ampton/include/variant/ec.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/octopus/variants/ampton/include/variant/ec.h b/src/mainboard/google/octopus/variants/ampton/include/variant/ec.h index 056eef8379..d75938da72 100644 --- a/src/mainboard/google/octopus/variants/ampton/include/variant/ec.h +++ b/src/mainboard/google/octopus/variants/ampton/include/variant/ec.h @@ -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 -- cgit v1.2.3