summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenny TC <jenny.tc@intel.com>2015-06-18 16:06:57 +0530
committerPatrick Georgi <pgeorgi@google.com>2015-07-23 16:33:09 +0200
commit0a754021cf7eecf385bc6e9885ce57c5b9a33c0d (patch)
tree6d1533aae7435ec441466a1f8e0daeab0e6c5f5c
parent5d8ef4c66173095ecad58c5b5734e9f28340d61a (diff)
intel/strago: BCRD2: Enable Realtek Audio codec on I2C4
In BCRD2, RTEK audio codec is connected to I2C4. Create a RTEK device entry on I2C4 to enable Audio on BCRD2. In BCRD1, RTEK device is connected to I2C2. Having two devices with same HID breaks the Audio on BCRD2 even if I2C2.RTEK._STA returns 0. The Audio codec driver in kernel is hard coded to use first instance of the device (:00). When two devices are present with same HID, first device gets an instance number :00 even though _STA returns 0. Second device which is on I2C4 and POR for BCRD2 assigned with instance number :01. The device with :01 is not getting enabled since the Audio codec driver supports only :00. This need a proper fix in kernel which is in the pipeline. Audio on non BCRD2 platforms on Strago build would be disabled since RTEK device is not present on I2C2. BRANCH=None BUG=None TEST=Build and boot the system Change-Id: Ia97d011c951275e6179c8b79a22c496b8169356b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: d71a41ee703e6f60299b9e31a408af2ca06d8e24 Original-Change-Id: I4b032e930e46da77474f8f5969e95f9560b3e905 Original-Signed-off-by: Jenny TC <jenny.tc@intel.com> Original-Reviewed-on: https://chromium-review.googlesource.com/285193 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Divagar Mohandass <divagar.mohandass@intel.com> Reviewed-on: http://review.coreboot.org/11003 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rwxr-xr-xsrc/mainboard/intel/strago/acpi/mainboard.asl85
1 files changed, 43 insertions, 42 deletions
diff --git a/src/mainboard/intel/strago/acpi/mainboard.asl b/src/mainboard/intel/strago/acpi/mainboard.asl
index d5c4b5b9a8..1228a73895 100755
--- a/src/mainboard/intel/strago/acpi/mainboard.asl
+++ b/src/mainboard/intel/strago/acpi/mainboard.asl
@@ -166,48 +166,6 @@ Scope (\_SB.I2C1)
}
}
-Scope (\_SB.I2C2)
-{
- /* Realtek Audio Codec */
- Device (RTEK) /* Audio Codec driver I2C */
- {
- Name (_ADR, 0)
- Name (_HID, AUDIO_CODEC_HID)
- Name (_CID, AUDIO_CODEC_CID)
- Name (_DDN, AUDIO_CODEC_DDN)
- Name (_UID, 1)
-
- Method(_CRS, 0x0, NotSerialized)
- {
- Name(SBUF,ResourceTemplate ()
- {
- I2CSerialBus(
- AUDIO_CODEC_I2C_ADDR, /* SlaveAddress: bus address */
- ControllerInitiated, /* SlaveMode: default to ControllerInitiated */
- 400000, /* ConnectionSpeed: in Hz */
- AddressingMode7Bit, /* Addressing Mode: default to 7 bit */
- "\\_SB.I2C2", /* ResourceSource: I2C bus controller name */
- )
-
-
- /* Jack Detect (index 0) */
- GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
- "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX }
- } )
- Return (SBUF)
- }
-
- Method (_STA)
- {
- If (LEqual (\S2EN, 1)) {
- Return (0xF)
- } Else {
- Return (0x0)
- }
- }
- }
-}
-
Scope (\_SB.I2C5)
{
Device (ALSI)
@@ -239,6 +197,9 @@ Scope (\_SB.I2C5)
Method (_STA)
{
+ If (LEqual (\BDID, BOARD_BCRD2)) {
+ Return (0x0)
+ }
If (LEqual (\S5EN, 1)) {
Return (0xF)
} Else {
@@ -246,6 +207,46 @@ Scope (\_SB.I2C5)
}
}
}
+
+ /* Realtek Audio Codec */
+ Device (RTEK) /* Audio Codec driver I2C */
+ {
+ Name (_ADR, 0)
+ Name (_HID, AUDIO_CODEC_HID)
+ Name (_CID, AUDIO_CODEC_CID)
+ Name (_DDN, AUDIO_CODEC_DDN)
+ Name (_UID, 1)
+
+ Method(_CRS, 0x0, NotSerialized)
+ {
+ Name(SBUF,ResourceTemplate ()
+ {
+ I2CSerialBus(
+ AUDIO_CODEC_I2C_ADDR, /* SlaveAddress: bus address */
+ ControllerInitiated, /* SlaveMode: default to ControllerInitiated */
+ 400000, /* ConnectionSpeed: in Hz */
+ AddressingMode7Bit, /* Addressing Mode: default to 7 bit */
+ "\\_SB.I2C5", /* ResourceSource: I2C bus controller name */
+ )
+
+
+ /* Jack Detect (index 0) */
+ GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
+ "\\_SB.GPSW") { JACK_DETECT_GPIO_INDEX }
+ } )
+ Return (SBUF)
+ }
+
+ Method (_STA)
+ {
+ If (LEqual (\S5EN, 1)) {
+ If (LEqual (\BDID, BOARD_BCRD2)) {
+ Return (0xF)
+ }
+ }
+ Return (0x0)
+ }
+ }
}
Scope (\_SB.I2C6)