summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl131
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/mainboard.asl55
-rw-r--r--src/mainboard/google/kahlee/variants/grunt/include/variant/acpi/mainboard.asl1
-rw-r--r--src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/audio.asl55
-rw-r--r--src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/mainboard.asl1
5 files changed, 188 insertions, 55 deletions
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
new file mode 100644
index 0000000000..01edce51fd
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/audio.asl
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+
+
+/* Grunt specific I2S machine driver */
+Device (I2S)
+{
+ Name (_ADR, 1)
+ Name (_HID, "AMD7219")
+ Name (_CID, "AMD7219")
+}
+
+/* DA7219 codec */
+Device (DLG7)
+{
+ Name (_HID, "DLGS7219")
+ Name (_UID, 1)
+ Name (_DDN, "Dialog Semiconductor DA7219 Audio Codec")
+ Name (_S0W, 0x04)
+
+ Name(_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (
+ 0x001A,
+ ControllerInitiated,
+ 0x00061A80,
+ AddressingMode7Bit,
+ "\\_SB.I2CA",
+ 0x00,
+ ResourceConsumer,
+ ,
+ )
+
+ /* Jack Detect AGPIO14 */
+ GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
+ "\\_SB.GPIO") { 14 }
+ })
+
+ /* Device-Specific Data */
+ Name (_DSD, Package ()
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package ()
+ {
+ Package () { "dlg,micbias_lvl", 2600 },
+ Package () { "dlg,mic_amp_in_sel", "diff" }
+ },
+
+ ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
+ Package ()
+ {
+ Package () { "da7219_aad", "DAAD" }
+ }
+ })
+
+ /* Device Properties for _DSD */
+ Name (DAAD, Package ()
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package ()
+ {
+ Package () { "dlg,btn-cfg", 50 },
+ Package () { "dlg,mic-det-thr", 500 },
+ Package () { "dlg,jack-ins-deb", 20 },
+ Package () { "dlg,jack-det-rate", "32ms_64ms" },
+ Package () { "dlg,jack-rem-deb", 1 },
+ Package () { "dlg,a-d-btn-thr", 0xa },
+ Package () { "dlg,d-b-btn-thr", 0x16 },
+ Package () { "dlg,b-c-btn-thr", 0x21 },
+ Package () { "dlg,c-mic-btn-thr", 0x3e },
+ Package () { "dlg,btn-avg", 4 },
+ Package () { "dlg,adc-1bit-rpt", 1 },
+ Package () { "dlg,micbias-pulse-lvl", 0 },
+ Package () { "dlg,micbias-pulse-time", 0 }
+ }
+ }) /* DAAD */
+
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+}
+
+/* MAX98357 codec */
+Device (MAXM)
+{
+ Name (_HID, "MX98357A")
+ Name (_UID, 0)
+ Name (_DDN, "Maxim Integrated 98357A Amplifier")
+
+ Name (_CRS, ResourceTemplate ()
+ {
+ GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
+ IoRestrictionOutputOnly,
+ "\\_SB.GPIO", 0x00, ResourceConsumer, ,) { 119 }
+ })
+
+ Name (_DSD, Package ()
+ {
+ ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package ()
+ {
+ Package ()
+ {
+ "sdmode-gpio", Package () { \MAXM, 0, 0, 0 }
+ },
+
+ Package ()
+ {
+ "sdmode-delay", 5
+ }
+ }
+ })
+
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0x0F)
+ }
+}
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/mainboard.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/mainboard.asl
index ddf1211eee..242eb92e6b 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/mainboard.asl
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/mainboard.asl
@@ -55,58 +55,3 @@ Device (ETPA)
/* Allow device to power off in S0 */
Name (_S0W, 3)
}
-
-/* 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/grunt/include/variant/acpi/mainboard.asl b/src/mainboard/google/kahlee/variants/grunt/include/variant/acpi/mainboard.asl
index 7e7c158d88..4f91d72822 100644
--- a/src/mainboard/google/kahlee/variants/grunt/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/kahlee/variants/grunt/include/variant/acpi/mainboard.asl
@@ -14,3 +14,4 @@
*/
#include <baseboard/acpi/mainboard.asl>
+#include <baseboard/acpi/audio.asl>
diff --git a/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/audio.asl b/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/audio.asl
new file mode 100644
index 0000000000..031eafc95e
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/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)
+ }
+}
diff --git a/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/mainboard.asl b/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/mainboard.asl
index 7e7c158d88..ab1fa7a080 100644
--- a/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/kahlee/variants/kahlee/include/variant/acpi/mainboard.asl
@@ -14,3 +14,4 @@
*/
#include <baseboard/acpi/mainboard.asl>
+#include <variant/acpi/audio.asl>