intel/kunimitsu: Add support for MAX98357A audio amplifier

Adding support for Maxim 98357A audio amplifier.

BUG=chrome-os-partner:44481
BRANCH=None
TEST=Build & boot on Skylake kunimitsu Fab4 with MAXIM codec.
Verify audio playback works using MAXIM.

Change-Id: I4f020ccae540b02d5d533704a52cebb7805715fe
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c0a81300e02e917500fa3c0241c95dd795abaf04
Original-Change-Id: I8875c9a55f09b1ec353203cfcb2186dc5fd66542
Original-Signed-off-by: Rohit Ainapure <rohit.m.ainapure@intel.com>
Original-Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/309894
Original-Tested-by: Rohit M Ainapure <rohit.m.ainapure@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/12949
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Rohit Ainapure 2015-09-18 13:40:51 -07:00 committed by Patrick Georgi
parent 3a749710cf
commit 02c1f86213
2 changed files with 47 additions and 0 deletions

View File

@ -44,6 +44,45 @@ 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,
IoRestrictionOutputOnly,
"\\_SB.PCI0.GPIO", 0x00, ResourceConsumer,,)
{
AUDIO_DB_ID
}
})
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)
}
}
}
/*

View File

@ -50,6 +50,14 @@
#define EC_SCI_GPI GPE0_DW2_16
#define EC_SMI_GPI GPP_E15
/*
* GPP_E3 is AUDIO_DB_ID.
* It is a dual purpose GPIO, used for Audio Daughter
* Board Identification & to control the shutdown mode pin
* of the Maxim amp.
*/
#define AUDIO_DB_ID GPP_E3
#ifndef __ACPI__
/* Pad configuration in ramstage. */
static const struct pad_config gpio_table[] = {