Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76792?usp=email )
Change subject: ec/google/chromeec: move TBMC ACPI device under CREC ......................................................................
ec/google/chromeec: move TBMC ACPI device under CREC
Tablet motion control is a function of the EC, and under Windows, the TBMC device needs to be initialized after CREC, or driver init will fail. The only way to ensure this happens is for TBMC to be a child device under CREC.
TEST=build/boot Win11, Linux on google/eve, verify tablet mode drivers loaded and orientation switching functional under both OSes.
Change-Id: I5e9eab9ae277b5a04dc2666960a727e5680bf6f4 Signed-off-by: Matt DeVillier matt.devillier@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/76792 Reviewed-by: CoolStar coolstarorganization@gmail.com Reviewed-by: Caveh Jalali caveh@chromium.org Reviewed-by: Felix Held felix-coreboot@felixheld.de Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com --- M src/ec/google/chromeec/acpi/cros_ec.asl M src/ec/google/chromeec/acpi/ec.asl M src/ec/google/chromeec/acpi/tbmc.asl 3 files changed, 8 insertions(+), 7 deletions(-)
Approvals: Eric Lai: Looks good to me, but someone else must approve Felix Held: Looks good to me, approved CoolStar: Looks good to me, but someone else must approve build bot (Jenkins): Verified Caveh Jalali: Looks good to me, but someone else must approve
diff --git a/src/ec/google/chromeec/acpi/cros_ec.asl b/src/ec/google/chromeec/acpi/cros_ec.asl index adf8d90..b46c187 100644 --- a/src/ec/google/chromeec/acpi/cros_ec.asl +++ b/src/ec/google/chromeec/acpi/cros_ec.asl @@ -51,6 +51,11 @@ #ifdef EC_ENABLE_PD_MCU_DEVICE #include "pd.asl" #endif + +#ifdef EC_ENABLE_TBMC_DEVICE + #include "tbmc.asl" +#endif + Method(_STA, 0) { Return (0xF) diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 3d5961a..d6d33b2 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -457,7 +457,7 @@ _SB.DPTF.TPET() #endif #ifdef EC_ENABLE_TBMC_DEVICE - Notify (TBMC, 0x80) + Notify (^CREC.TBMC, 0x80) #endif #if CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC) If (CondRefOf (_SB.DPTC)) { @@ -660,8 +660,4 @@ #ifdef EC_ENABLE_KEYBOARD_BACKLIGHT #include "keyboard_backlight.asl" #endif - -#ifdef EC_ENABLE_TBMC_DEVICE - #include "tbmc.asl" -#endif } diff --git a/src/ec/google/chromeec/acpi/tbmc.asl b/src/ec/google/chromeec/acpi/tbmc.asl index 3ecf78e..efc4257 100644 --- a/src/ec/google/chromeec/acpi/tbmc.asl +++ b/src/ec/google/chromeec/acpi/tbmc.asl @@ -7,7 +7,7 @@ Name (_DDN, "Tablet Motion Control") Method (TBMC) { - If (^^RCTM == 1) { + If (RCTM == 1) { Return (0x1) } Else { Return (0x0) @@ -15,7 +15,7 @@ } Method(_STA, 0) { - If (^^MTNS == 1) { + If (MTNS == 1) { Return (0xF) } Else { Return (0x0)