From 02c1f8621377126c8c9d0514a38f0e4920dd9bd3 Mon Sep 17 00:00:00 2001 From: Rohit Ainapure Date: Fri, 18 Sep 2015 13:40:51 -0700 Subject: 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 Original-Commit-Id: c0a81300e02e917500fa3c0241c95dd795abaf04 Original-Change-Id: I8875c9a55f09b1ec353203cfcb2186dc5fd66542 Original-Signed-off-by: Rohit Ainapure Original-Signed-off-by: Subrata Banik Original-Reviewed-on: https://chromium-review.googlesource.com/309894 Original-Tested-by: Rohit M Ainapure Original-Reviewed-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/12949 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/mainboard/intel/kunimitsu/acpi/mainboard.asl | 39 ++++++++++++++++++++++++ src/mainboard/intel/kunimitsu/gpio.h | 8 +++++ 2 files changed, 47 insertions(+) (limited to 'src/mainboard/intel') diff --git a/src/mainboard/intel/kunimitsu/acpi/mainboard.asl b/src/mainboard/intel/kunimitsu/acpi/mainboard.asl index 73d43bc276..2eaee84d55 100644 --- a/src/mainboard/intel/kunimitsu/acpi/mainboard.asl +++ b/src/mainboard/intel/kunimitsu/acpi/mainboard.asl @@ -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) + } + } } /* diff --git a/src/mainboard/intel/kunimitsu/gpio.h b/src/mainboard/intel/kunimitsu/gpio.h index a06e42d876..cfec92e75a 100755 --- a/src/mainboard/intel/kunimitsu/gpio.h +++ b/src/mainboard/intel/kunimitsu/gpio.h @@ -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[] = { -- cgit v1.2.3