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 <pgeorgi@chromium.org>
Original-Commit-Id: 76cbc20826c884194a144f6b6bc644900e5d475d
Original-Change-Id: I1156096b6aa367c0b8d8e3952d92f0eb5cf2820f
Original-Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/314543
Original-Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12960
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Subrata Banik 2015-11-27 11:17:35 +05:30 committed by Patrick Georgi
parent 3b43fa9086
commit 4d27c42604
2 changed files with 43 additions and 48 deletions

View File

@ -44,6 +44,46 @@ Scope (\_SB)
{ {
Name (_HID, EisaId ("PNP0C0C")) 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) 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)
}
}
} }

View File

@ -20,6 +20,9 @@
#include <soc/gpe.h> #include <soc/gpe.h>
#include <soc/gpio.h> #include <soc/gpio.h>
/* MAX98357A SD_MODE */
#define GPIO_SPEAKER_MAXIM_AMP_SDMODE GPP_B2
/* EC in RW */ /* EC in RW */
#define GPIO_EC_IN_RW GPP_C6 #define GPIO_EC_IN_RW GPP_C6