Ivan Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/67320 )
Change subject: mb/google/dedede: Resume from suspend on critical battery ......................................................................
mb/google/dedede: Resume from suspend on critical battery
This patch makes dedede EC wake up AP from s0ix when the state of charge drops to low_battery_shutdown_percent.
Demonstrated as follows:
1. Boot OS. 2. Run powerd_dbus_suspend. 3. On EC, run battfake 4. 4. System resumes.
BUG=b:244253629 TEST=Verified on dedede
Change-Id: I39234d2b9e739383b5f96be49077f8c9831fa0fa Signed-off-by: Ivan Chen yulunchen@google.com --- M src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h 1 file changed, 28 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/67320/1
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h index aa420f3..6ceaa39 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h @@ -39,6 +39,7 @@ * 3. Key press * 4. Mode change * 5. AC Connect/Disconnect + * 6. Low battery */ #define MAINBOARD_EC_S3_WAKE_EVENTS \ (MAINBOARD_EC_S5_WAKE_EVENTS |\ @@ -47,7 +48,10 @@ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) |\ EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE))
-#define MAINBOARD_EC_S0IX_WAKE_EVENTS (MAINBOARD_EC_S3_WAKE_EVENTS) +#define MAINBOARD_EC_S0IX_WAKE_EVENTS \ + (MAINBOARD_EC_S3_WAKE_EVENTS |\ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |\ + EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN))
/* Log EC wake events plus EC shutdown events */ #define MAINBOARD_EC_LOG_EVENTS \