From d90f8ac741492e436dc1986396b8aabdba642210 Mon Sep 17 00:00:00 2001 From: Kevin Chiu Date: Fri, 19 Mar 2021 19:31:29 +0800 Subject: [PATCH] google/grunt: Add ALC5682 ACPI I2S machine driver The is used for AMD Grunt board which uses ALC5682 and MAX98357 codec. kernel driver will need to retrieve MISC FCH memory resource for CLK enabling per different CID/HID. BUG=b:171755306 BRANCH=master TEST=emerge-grunt coreboot Change-Id: I5f29a2d784a9fc749fff61a9c96c0a487b71a2d7 Signed-off-by: Kevin Chiu Reviewed-on: https://review.coreboot.org/c/coreboot/+/51659 Reviewed-by: Yu-hsuan Hsu Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) --- .../include/baseboard/acpi/audio.asl | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl index 837678a37e..bb92243583 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl +++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl @@ -3,7 +3,7 @@ #include /* Grunt specific I2S machine driver */ -Device (I2S) +Device (I2S0) { Name (_HID, "AMD7219") Name (_CID, "AMD7219") @@ -28,3 +28,29 @@ Device (I2S) Return (RBUF) } } + +Device (I2S1) +{ + Name (_HID, "AMDI5682") + Name (_CID, "AMDI5682") + + /* Device-Specific Data */ + Name (_DSD, Package () + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "bt-pad-enable", 1 }, + } + }) + + Method (_CRS, 0x0, Serialized) { + Name (RBUF, ResourceTemplate () { + // Memory resource is for MISC FCH register set. + // It is needed for enabling the clock. + Memory32Fixed(ReadWrite, ACPIMMIO_MISC_BASE, 0x100) + }) + + Return (RBUF) + } +}