coreboot/src/drivers
Duncan Laurie 7db15094c2 generic: Add a Maxim 98357A codec driver
The Maxim Integrated 98357A codec is an I2S slave device that has no
control channel for configuration and instead provides a GPIO that is
used for channel selection and power down.  This means it does not fit
into a bus hierarchy easily and is instead represented as a generic
device and found with a static bus scan using the devicetree.

This driver provides configuration options for passing the "sdmode" GPIO
descriptor as well as a second option for "sdmode delay" which can
configure the timing of the sdmode toggling in relation to the I2S
channel output.

In addition an GPIO can be provided to indicate to the driver whether
this device is present or not.  This can be used for board designs that
may have different codec possibilities that are selected by HW strap.

Sample usage for this device driver:

device pci 1f.3 on
  chip drivers/generic/max98357a
    register "sdmode_gpio" = "ACPI_GPIO_OUTPUT(GPP_C6)"
    register "sdmode_delay" = "100"
    device generic 0 on end
  end
end

Will result in the following code in the SSDT:

Scope (\_SB.PCI0.HDAS) {
  Device (MAXM) {
    Name (_HID, "MX98357A")
    Name (_UID, Zero)
    Name (_DDN, "Maxim Integrated 98357A Amplifier")
    Method (_STA) { Return (0xF) }
    Name (_CRS, ResourceTemplate () {
      GpioIo (Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
              "\\_SB.PCI0.GPIO", 0, ResourceConsumer)
    })
    Name (_DSD, Package () {
      ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
      Package () {
        Package () { "maxim,sdmode-gpio", \_SB.PCI0.HDAS.MAXM, 0, 0, 0 }
        Package () { "maxim,sdmode-delay", 100 }
        Package () { "sdmode-delay", 100 }
      }
    })
  }
}

Change-Id: Ia0bafe49bea9bbe4a3cc0f9f9cdb6f6390da57b5
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/15017
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-02 05:37:07 +02:00
..
ams drivers/ams: Set default values in Kconfig 2015-11-22 01:39:44 +01:00
aspeed Fix leaking CONFIG_VGA=y 2016-05-31 17:18:59 +02:00
ati/ragexl drivers/ati: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:37:20 +02:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog elog: fix improper assumption for year values 2015-11-13 00:52:48 +01:00
emulation/qemu drivers/emulation: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:37:08 +02:00
generic generic: Add a Maxim 98357A codec driver 2016-06-02 05:37:07 +02:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c i2c: Add a generic i2c driver 2016-06-02 05:36:41 +02:00
ics/954309 drivers/ics: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:43 +02:00
intel drivers/intel/wifi: Add support for generating SSDT table 2016-06-02 05:36:08 +02:00
ipmi tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
lenovo drivers/lenovo: Add hybrid graphics driver 2016-06-01 23:22:01 +02:00
maxim drivers/aspeed: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:17 +02:00
net drivers/net/r8168: Add driver for realtek nic 2016-05-31 20:03:39 +02:00
parade parade/ps8640: Initialize edid_size 2016-05-08 08:11:26 +02:00
pc80 rtc: Do checksum check for all bytes 2016-05-06 19:03:41 +02:00
ricoh/rce822 drivers/ricoh: Fully switch to src/drivers/[X]/[Y]/ scheme 2016-04-22 20:11:52 +02:00
sil/3114 drivers/sil: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:05 +02:00
spi spi: Add support for Winbond W25Q256 2016-05-09 08:30:22 +02:00
ti drivers/ti: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:36 +02:00
uart drivers/uart: Use uart_platform_refclk for all UART models 2016-05-09 18:45:44 +02:00
usb tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
xgi Fix leaking CONFIG_VGA=y 2016-05-31 17:18:59 +02:00
xpowers/axp209 drivers/xpowers: Switch to src/drivers/[X]/[Y]/ scheme 2016-05-04 22:14:44 +02:00