[coreboot-gerrit] Patch set updated for coreboot: intel/strago: BCRD2: Enable Realtek Audio codec on I2C4

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Jul 20 23:45:36 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11003

-gerrit

commit b1cabbe679d9d16fc078c7a4f3c372abcf886da9
Author: Jenny TC <jenny.tc at intel.com>
Date:   Thu Jun 18 16:06:57 2015 +0530

    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 at chromium.org>
    Original-Commit-Id: d71a41ee703e6f60299b9e31a408af2ca06d8e24
    Original-Change-Id: I4b032e930e46da77474f8f5969e95f9560b3e905
    Original-Signed-off-by: Jenny TC <jenny.tc at intel.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/285193
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Commit-Queue: Divagar Mohandass <divagar.mohandass at intel.com>
---
 src/mainboard/intel/strago/acpi/mainboard.asl | 85 ++++++++++++++-------------
 1 file changed, 43 insertions(+), 42 deletions(-)

diff --git a/src/mainboard/intel/strago/acpi/mainboard.asl b/src/mainboard/intel/strago/acpi/mainboard.asl
index d5c4b5b..1228a73 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)



More information about the coreboot-gerrit mailing list