glados: Clean up mainboard ACPI devices

Clean up the device code for the glados mainboard, using
the defined values for interrupts by the SOC and moving the
various codec i2c addresses to the top of the file.

BUG=chrome-os-partner:40635
BRANCH=none
TEST=build and boot on glados

Original-Change-Id: Iead1aeb54363b15a6176d4f4a9511674195c0505
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/293511
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I083c9ef6140e20a433cb2017e4c3cbc7a41e8fed
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/11277
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Duncan Laurie 2015-08-13 12:18:52 -07:00 committed by Aaron Durbin
parent 5eed3a5518
commit 35a32064f1
1 changed files with 38 additions and 30 deletions

View File

@ -19,8 +19,12 @@
#include <soc/gpio.h> #include <soc/gpio.h>
#define BOARD_TRACKPAD_I2C_ADDR 0x15 #define BOARD_TOUCHPAD_I2C_ADDR 0x15
#define BOARD_TRACKPAD_IRQ GPP_B3_IRQ #define BOARD_TOUCHPAD_IRQ GPP_B3_IRQ
#define BOARD_HP_MIC_CODEC_I2C_ADDR 0x1a
#define BOARD_LEFT_SPEAKER_AMP_I2C_ADDR 0x34
#define BOARD_RIGHT_SPEAKER_AMP_I2C_ADDR 0x35
Scope (\_SB) Scope (\_SB)
{ {
@ -68,30 +72,31 @@ Scope (\_SB.PCI0.LPCB)
#include <drivers/pc80/tpm/acpi/tpm.asl> #include <drivers/pc80/tpm/acpi/tpm.asl>
} }
/* Trackpad */
Scope (\_SB.PCI0.I2C1) Scope (\_SB.PCI0.I2C1)
{ {
Device (ELAN) /* Touchpad */
Device (ELTP)
{ {
Name (_HID, "ELAN0000") Name (_HID, "ELAN0000")
Name (_DDN, "Elan Touchpad") Name (_DDN, "Elan Touchpad")
Name (_UID, 3) Name (_UID, 1)
Name (_S0W, 4) Name (_S0W, 4)
Name (ISTP, 1) /* TouchPad */
Name (_CRS, ResourceTemplate() Name (_CRS, ResourceTemplate()
{ {
I2cSerialBus ( I2cSerialBus (
BOARD_TRACKPAD_I2C_ADDR, /* SlaveAddress */ BOARD_TOUCHPAD_I2C_ADDR,
ControllerInitiated, /* SlaveMode */ ControllerInitiated,
400000, /* ConnectionSpeed */ 400000,
AddressingMode7Bit, /* AddressingMode */ AddressingMode7Bit,
"\\_SB.PCI0.I2C1", /* ResourceSource */ "\\_SB.PCI0.I2C1",
) )
Interrupt (ResourceConsumer, Edge, ActiveLow) Interrupt (ResourceConsumer, Edge, ActiveLow)
{ {
BOARD_TRACKPAD_IRQ BOARD_TOUCHPAD_IRQ
} }
}) })
Method (_STA) Method (_STA)
{ {
Return (0xF) Return (0xF)
@ -101,7 +106,8 @@ Scope (\_SB.PCI0.I2C1)
Scope (\_SB.PCI0.I2C4) Scope (\_SB.PCI0.I2C4)
{ {
Device (CODC) // Codec for headset /* Headphone Codec */
Device (HPMC)
{ {
Name (_HID, "10508825") Name (_HID, "10508825")
Name (_DDN, "NAU88L25 Codec") Name (_DDN, "NAU88L25 Codec")
@ -110,11 +116,11 @@ Scope (\_SB.PCI0.I2C4)
Name (_CRS, ResourceTemplate() Name (_CRS, ResourceTemplate()
{ {
I2cSerialBus ( I2cSerialBus (
0x1A, /* SlaveAddress */ BOARD_HP_MIC_CODEC_I2C_ADDR,
ControllerInitiated, /* SlaveMode */ ControllerInitiated,
400000, /* ConnectionSpeed */ 400000,
AddressingMode7Bit, /* AddressingMode */ AddressingMode7Bit,
"\\_SB.PCI0.I2C4", /* ResourceSource */ "\\_SB.PCI0.I2C4",
) )
}) })
@ -124,7 +130,8 @@ Scope (\_SB.PCI0.I2C4)
} }
} }
Device (SPK0) // Left speaker Amp /* Left Speaker Amp */
Device (SPKL)
{ {
Name (_HID, "INT343B") Name (_HID, "INT343B")
Name (_DDN, "SSM4567 Speaker Amp") Name (_DDN, "SSM4567 Speaker Amp")
@ -133,11 +140,11 @@ Scope (\_SB.PCI0.I2C4)
Name (_CRS, ResourceTemplate() Name (_CRS, ResourceTemplate()
{ {
I2cSerialBus ( I2cSerialBus (
0x34, /* SlaveAddress */ BOARD_LEFT_SPEAKER_AMP_I2C_ADDR,
ControllerInitiated, /* SlaveMode */ ControllerInitiated,
400000, /* ConnectionSpeed */ 400000,
AddressingMode7Bit, /* AddressingMode */ AddressingMode7Bit,
"\\_SB.PCI0.I2C4", /* ResourceSource */ "\\_SB.PCI0.I2C4",
) )
}) })
@ -147,7 +154,8 @@ Scope (\_SB.PCI0.I2C4)
} }
} }
Device (SPK1) // Right speaker Amp /* Right Speaker Amp */
Device (SPKR)
{ {
Name (_HID, "INT343B") Name (_HID, "INT343B")
Name (_DDN, "SSM4567 Speaker Amp") Name (_DDN, "SSM4567 Speaker Amp")
@ -156,11 +164,11 @@ Scope (\_SB.PCI0.I2C4)
Name (_CRS, ResourceTemplate() Name (_CRS, ResourceTemplate()
{ {
I2cSerialBus ( I2cSerialBus (
0x35, /* SlaveAddress */ BOARD_RIGHT_SPEAKER_AMP_I2C_ADDR,
ControllerInitiated, /* SlaveMode */ ControllerInitiated,
400000, /* ConnectionSpeed */ 400000,
AddressingMode7Bit, /* AddressingMode */ AddressingMode7Bit,
"\\_SB.PCI0.I2C4", /* ResourceSource */ "\\_SB.PCI0.I2C4",
) )
}) })