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>
This commit is contained in:
Matt DeVillier 2023-07-28 09:32:07 -05:00
parent 1b67362971
commit 94ad304451
1 changed files with 16 additions and 4 deletions

View File

@ -89,6 +89,9 @@ Scope (\_SB.PCI0.I2C2)
{
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 @@ Scope (\_SB.PCI0.LPEA)
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>