Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73298 )
Change subject: acpi/ec: Handle new host event EC_HOST_EVENT_BODY_DETECT_CHANGE ......................................................................
acpi/ec: Handle new host event EC_HOST_EVENT_BODY_DETECT_CHANGE
Handle the new host event EC_HOST_EVENT_BODY_DETECT_CHANGE.
Previously, the EC sent the host event EC_HOST_EVENT_MODE_CHANGE when body detection changed between lap/desk mode. However, that event is a wake event, which resulted in spurious AP wake events being triggered when the EC detected lap/desk mode changes while the AP was suspended.
To resolve this, the new host event EC_HOST_EVENT_BODY_DETECT_CHANGE was added, which will not be a wake event. This CL adds handling for the new event to acpi/ec.asl to switch DPTC tables when a change is detected.
BRANCH=none BUG=b:261141172 TEST=bodydetectmode on|off, verify host event is received
Change-Id: Iabeb7891489a209f45504804355f1fa817082976 Signed-off-by: Tim Van Patten timvp@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/73298 Reviewed-by: Caveh Jalali caveh@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Karthik Ramasubramanian kramasub@google.com --- M src/ec/google/chromeec/acpi/ec.asl M src/mainboard/google/skyrim/variants/baseboard/include/baseboard/ec.h 2 files changed, 42 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Caveh Jalali: Looks good to me, but someone else must approve Karthik Ramasubramanian: Looks good to me, approved
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 9ff7b72..8109eb3 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -462,6 +462,17 @@ #endif }
+ // Body Detect Change Event + Method (_Q21, 0, NotSerialized) + { + Printf ("EC: Body Detect Change Event") +#if CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC) + If (CondRefOf (_SB.DPTC)) { + _SB.DPTC() + } +#endif + } + /* * Dynamic Platform Thermal Framework support */ diff --git a/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/ec.h index 1f54046..c04cc5b 100644 --- a/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/ec.h +++ b/src/mainboard/google/skyrim/variants/baseboard/include/baseboard/ec.h @@ -23,7 +23,8 @@ | EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) \ | EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE) \ | EC_HOST_EVENT_MASK(EC_HOST_EVENT_USB_MUX) \ - | EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC)) + | EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC) \ + | EC_HOST_EVENT_MASK(EC_HOST_EVENT_BODY_DETECT_CHANGE))
#define MAINBOARD_EC_SMI_EVENTS (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))