From 4d27c42604034acd3f7252e46b0c6d3a8510e3ae Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Fri, 27 Nov 2015 11:17:35 +0530 Subject: google/lars: Add support for MAX98357A audio amplifier Adding support for Maxim 98357A audio amplifier. Removed SSM4567 support from LARs. BUG=chrome-os-partner:44481 BRANCH=None TEST=Build & boot on LARs. Verify audio playback works using MAXIM amplifiers. Change-Id: I2cd8b20e936319b434017b6dd73d4739684d21d3 Signed-off-by: Patrick Georgi Original-Commit-Id: 76cbc20826c884194a144f6b6bc644900e5d475d Original-Change-Id: I1156096b6aa367c0b8d8e3952d92f0eb5cf2820f Original-Signed-off-by: Subrata Banik Original-Reviewed-on: https://chromium-review.googlesource.com/314543 Original-Commit-Ready: Nicolas Boichat Original-Reviewed-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/12960 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/google/lars/acpi/mainboard.asl | 88 +++++++++++++--------------- src/mainboard/google/lars/gpio.h | 3 + 2 files changed, 43 insertions(+), 48 deletions(-) diff --git a/src/mainboard/google/lars/acpi/mainboard.asl b/src/mainboard/google/lars/acpi/mainboard.asl index 73d43bc276..e8397a1f12 100644 --- a/src/mainboard/google/lars/acpi/mainboard.asl +++ b/src/mainboard/google/lars/acpi/mainboard.asl @@ -44,6 +44,46 @@ Scope (\_SB) { Name (_HID, EisaId ("PNP0C0C")) } + + Device (MAXM) + { + Name (_HID, "MX98357A") + Name (_DDN, "Maxim Integrated 98357A Amplifier") + Name (_UID, 1) + Name (_CRS, ResourceTemplate() + { + GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, + IoRestrictionNone, + "\\_SB.PCI0.GPIO", 0x00, ResourceConsumer,,) + { + GPIO_SPEAKER_MAXIM_AMP_SDMODE, + } + }) + Name (_DSD, Package () + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { + /* + * Create a named GPIO + * "sdmode-gpio" for the + * kernel codec driver + * to use. + */ + + "sdmode-gpio", Package () { + ^MAXM, 0, 0, 0 + } + }, + } + }) + + Method (_STA) + { + Return (0xF) + } + } } /* @@ -201,52 +241,4 @@ Scope (\_SB.PCI0.I2C4) Return (0xF) } } - - /* Left Speaker Amp */ - Device (SPKL) - { - Name (_HID, "INT343B") - Name (_DDN, "SSM4567 Speaker Amp") - Name (_UID, 0) - - Name (_CRS, ResourceTemplate() - { - I2cSerialBus ( - BOARD_LEFT_SPEAKER_AMP_I2C_ADDR, - ControllerInitiated, - 400000, - AddressingMode7Bit, - "\\_SB.PCI0.I2C4", - ) - }) - - Method (_STA) - { - Return (0xF) - } - } - - /* Right Speaker Amp */ - Device (SPKR) - { - Name (_HID, "INT343B") - Name (_DDN, "SSM4567 Speaker Amp") - Name (_UID, 1) - - Name (_CRS, ResourceTemplate() - { - I2cSerialBus ( - BOARD_RIGHT_SPEAKER_AMP_I2C_ADDR, - ControllerInitiated, - 400000, - AddressingMode7Bit, - "\\_SB.PCI0.I2C4", - ) - }) - - Method (_STA) - { - Return (0xF) - } - } } diff --git a/src/mainboard/google/lars/gpio.h b/src/mainboard/google/lars/gpio.h index 7ebeb5d7a3..bc11729f74 100755 --- a/src/mainboard/google/lars/gpio.h +++ b/src/mainboard/google/lars/gpio.h @@ -20,6 +20,9 @@ #include #include +/* MAX98357A SD_MODE */ +#define GPIO_SPEAKER_MAXIM_AMP_SDMODE GPP_B2 + /* EC in RW */ #define GPIO_EC_IN_RW GPP_C6 -- cgit v1.2.3