[coreboot-gerrit] Change in coreboot[master]: google/kahlee/acpi: populate kahlee and grunt audio codec .asl as var...

Daniel Kurtz (Code Review) gerrit at coreboot.org
Fri Jan 12 03:50:25 CET 2018


Hello Daniel Kurtz,

I'd like you to do a code review. Please visit

    https://review.coreboot.org/23234

to review the following change.


Change subject: google/kahlee/acpi: populate kahlee and grunt audio codec .asl as variants
......................................................................

google/kahlee/acpi: populate kahlee and grunt audio codec .asl as variants

Grunt and Kahlee have different audio codecs.
Describe them in separate .asl variant files.

BUG=b:71772141
TEST=Boot kahlee to kernel, audio works.
TEST=Boot grunt to kernel, no messages like:
  i2c_designware AMD0010:00: controller timed out

Change-Id: I0d1407286ff8d8ba2f533b6bc7b323d38cdf6b23
Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
---
M src/mainboard/google/kahlee/acpi/mainboard.asl
A src/mainboard/google/kahlee/variants/grunt/include/variant/audio.asl
A src/mainboard/google/kahlee/variants/kahlee/include/variant/audio.asl
3 files changed, 125 insertions(+), 41 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/23234/1

diff --git a/src/mainboard/google/kahlee/acpi/mainboard.asl b/src/mainboard/google/kahlee/acpi/mainboard.asl
index 7ed8dd4..1640ef6 100644
--- a/src/mainboard/google/kahlee/acpi/mainboard.asl
+++ b/src/mainboard/google/kahlee/acpi/mainboard.asl
@@ -33,44 +33,4 @@
 Name (PMOD, One)	/* Assume APIC */
 
 #include <variant/touchpad.asl>
-
-/* Realtek Audio Codec */
-Device (RTEK)   /* Audio Codec driver I2CS*/
-{
-	Name (_ADR, 0)
-	Name (_HID, "10EC5650")
-	Name (_CID, "10EC5650")
-	Name (_DDN, "RTEK Codec Controller ")
-	Name (_UID, 1)
-
-	Device (I2S) /* I2S machine driver for RT5650 */
-	{
-		Name (_ADR, 1)
-		Name (_HID, "AMDI1002")
-		Name (_CID, "AMDI1002")
-	}
-
-	Method (_CRS, 0x0, Serialized)
-	{
-		Name (SBUF, ResourceTemplate ()
-		{
-			I2CSerialBus(
-			0x1A,   /* SlaveAddress: bus address */
-			ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
-			400000,                 /* ConnectionSpeed: in Hz */
-			AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
-			"\\_SB.I2CA",           /* ResourceSource: I2C bus controller name */
-			)
-
-			/* Jack Detect AGPIO90 */
-			GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
-				"\\_SB.GPIO") { 90 }
-		})
-		Return (SBUF)
-	}
-
-	Method (_STA)
-	{
-		Return (0xF)
-	}
-}
+#include <variant/audio.asl>
diff --git a/src/mainboard/google/kahlee/variants/grunt/include/variant/audio.asl b/src/mainboard/google/kahlee/variants/grunt/include/variant/audio.asl
new file mode 100644
index 0000000..98c2dc7
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/grunt/include/variant/audio.asl
@@ -0,0 +1,69 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/* DA7219 codec */
+Device (DIAL)  /* audio codec*/
+{
+	Name (_ADR, 0)
+	Name (_HID, "DLGS7219")
+	Name (_CID, "DLGS7219")
+	Name (_DDN, "DA7219 Codec Controller ")
+	Name (_UID, 1)
+
+	Device (I2S) /* I2S machine driver for RT5650 */
+	{
+		Name (_ADR, 1)
+		Name (_HID, "AMDI7219")
+		Name (_CID, "AMDI7219")
+	}
+
+	Method (_CRS, 0x0, Serialized)
+	{
+		Name (SBUF, ResourceTemplate ()
+		{
+			I2CSerialBus(
+			0x1A,   /* SlaveAddress: bus address */
+			ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
+			400000,                 /* ConnectionSpeed: in Hz */
+			AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
+			"\\_SB.I2CA",           /* ResourceSource: I2C bus controller name */
+			)
+
+			/* Jack Detect AGPIO14 */
+			GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
+				"\\_SB.GPIO") { 14 }
+		})
+		Return (SBUF)
+	}
+
+	Method (_STA)
+	{
+		Return (0xF)
+	}
+}
+
+/* MAX98357 codec */
+Device (MAXA)
+{
+	Name (_ADR, 0)
+	Name (_HID, "MX98357A")
+	Name (_CID, "MX98357A")
+	Name (_DDN, "MX98357A Codec Controller ")
+	Name (_UID, 1)
+
+	Method (_STA, 0x0, NotSerialized) {
+			Return (0x0F)
+	}
+}
diff --git a/src/mainboard/google/kahlee/variants/kahlee/include/variant/audio.asl b/src/mainboard/google/kahlee/variants/kahlee/include/variant/audio.asl
new file mode 100644
index 0000000..031eafc
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/kahlee/include/variant/audio.asl
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/* Realtek Audio Codec */
+Device (RTEK)   /* Audio Codec driver I2CS*/
+{
+	Name (_ADR, 0)
+	Name (_HID, "10EC5650")
+	Name (_CID, "10EC5650")
+	Name (_DDN, "RTEK Codec Controller ")
+	Name (_UID, 1)
+
+	Device (I2S) /* I2S machine driver for RT5650 */
+	{
+		Name (_ADR, 1)
+		Name (_HID, "AMDI1002")
+		Name (_CID, "AMDI1002")
+	}
+
+	Method (_CRS, 0x0, Serialized)
+	{
+		Name (SBUF, ResourceTemplate ()
+		{
+			I2CSerialBus(
+			0x1A,   /* SlaveAddress: bus address */
+			ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
+			400000,                 /* ConnectionSpeed: in Hz */
+			AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
+			"\\_SB.I2CA",           /* ResourceSource: I2C bus controller name */
+			)
+
+			/* Jack Detect AGPIO90 */
+			GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
+				"\\_SB.GPIO") { 90 }
+		})
+		Return (SBUF)
+	}
+
+	Method (_STA)
+	{
+		Return (0xF)
+	}
+}

-- 
To view, visit https://review.coreboot.org/23234
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d1407286ff8d8ba2f533b6bc7b323d38cdf6b23
Gerrit-Change-Number: 23234
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Kurtz <djkurtz at google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180112/d457691d/attachment-0001.html>


More information about the coreboot-gerrit mailing list