summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorIvan Chen <yulunchen@google.com>2022-09-03 11:17:43 +0800
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-09-20 08:07:42 +0000
commita657b1f7ce199b27c187a17438542cdae3569ef4 (patch)
tree5d9d732c2075a6ad4285787095a89144a479fa23 /src/mainboard/google
parent92d38997906be4b1b7b91e2a4d007b09a24419c1 (diff)
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67320 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/include/baseboard/ec.h6
1 files changed, 5 insertions, 1 deletions
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 aa420f30c5..6ceaa391cc 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 \