mb/google/rambi: Fix built-in audio under Windows
Move the jack detect GpioInt resources under the codec (where they
belong), but also leave a copy under LPEA for since the Linux drivers
(incorrectly) require them there. Add pin list for Windows' SST driver.
Adapted from the Intel ValleyView edk2 ACPI reference code.
TEST=build/boot Win11, Linux on google/swanky; verify audio functional
OOTB under Linux, under Windows with coolstar's drivers.
Change-Id: I51c07013fc20f07d2fd3639f7fbc2af0e0e490a0
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76795
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: CoolStar <coolstarorganization@gmail.com>
diff --git a/src/mainboard/google/rambi/acpi/mainboard.asl b/src/mainboard/google/rambi/acpi/mainboard.asl
index bfbb66b..5f835e8 100644
--- a/src/mainboard/google/rambi/acpi/mainboard.asl
+++ b/src/mainboard/google/rambi/acpi/mainboard.asl
@@ -89,6 +89,9 @@
{
BOARD_CODEC_IRQ
}
+ GpioIo (Exclusive, PullNone, 0, 0, , "\\_SB.GPSC", 0, ResourceConsumer, ,){ 0x000E }
+
+ GpioIo (Exclusive, PullNone, 0, 0, , "\\_SB.GPSC", 0, ResourceConsumer, ,){ 0x000F }
})
Method (_STA)
@@ -107,13 +110,22 @@
Name (GBUF, ResourceTemplate ()
{
/* Jack Detect (index 0) */
- GpioInt (Level, ActiveHigh, Exclusive, PullNone,,
- "\\_SB.GPSC") { 14 }
+ GpioIo (Exclusive, PullNone, 0, 0, , "\\_SB.GPSC", 0, ResourceConsumer, ,){ 0x000E }
/* Mic Detect (index 1) */
- GpioInt (Level, ActiveHigh, Exclusive, PullNone,,
- "\\_SB.GPSC") { 15 }
+ GpioIo (Exclusive, PullNone, 0, 0, , "\\_SB.GPSC", 0, ResourceConsumer, ,){ 0x000F }
+
+ /* SST Wants This */
+ GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000,
+ "\\_SB.GPSS", 0x00, ResourceConsumer, ,)
+ {
+ 0x001C // Pin list
+ }
})
+ Method (_DIS, 0x0, NotSerialized)
+ {
+ //Add a dummy disable function
+ }
}
#include <variant/acpi/mainboard.asl>