coreboot-kgpe-d16/src/drivers
Duncan Laurie 7522dc3c07 nau8825: Add driver for I2C codec
The Nuvoton NAU8825 audio codec is an I2C device that has a number of
tunable parameters that can be provided to the kernel device driver for
basic configuration and optimal operation.

The configuration options are exposed to devicetree as registers and then
presented as Device Properties via ACPI to the operation system.

This sample configuration in devicetree:

device pci 19.2 on
  chip drivers/i2c/nau8825
    register "irq" = "IRQ_LEVEL_LOW(GPP_F10_IRQ)"
    register "jkdet_enable" = "1"
    register "sar_threshold_num" = "2"
    register "sar_threshold[0]" = "0x0c"
    register "sar_threshold[1]" = "0x1c"
    device i2c 1a on end
  end
end

Will generate the following code in the SSDT, trimmed for this commit
message as there are more properties that can be configured:

Scope (\_SB.PCI0.I2C4)
{
  Name (_HID, "10508825")
  Name (_UID, Zero)
  Name (_DDN, "Nuvoton NAU8825 Codec")
  Method (_STA) { Return (0xF) }
  Name (_CRS, ResourceTemplate () {
    I2cSerialBus (0x1A, ControllerInitiated, 0x61A80, AddressingMode7Bit,
                  "\_SB.PCI0.I2C4", 0, ResourceConsumer)
    Interrupt (ResourceConsumer, Level, ActiveLow) { 0x3A }
  })
  Name (_DSD, Package () {
    ToUUID ("daffd814-6eba-4d8c-8a91-bc9bff4aa301"),
    Package () {
      Package () { "nuvoton,jkdet-enable", 1 },
      Package () { "nuvoton,sar-threshold-num", 2 },
      Package () { "nuvoton,sar-threshold", Package () { 0x0c, 0x1c } }
    }
  })
}

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Change-Id: I480d72daf5ac3dded9b1cbb5fbc737b9dfde3834
Reviewed-on: https://review.coreboot.org/15015
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-06-01 22:28:29 +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 drivers/generic: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:38:06 +02:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c nau8825: Add driver for I2C codec 2016-06-01 22:28:29 +02:00
ics/954309 drivers/ics: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:43 +02:00
intel intel/fsp2.0: Add END_OF_FIRMWARE in enum fsp_notify_phase 2016-06-01 22:27:54 +02:00
ipmi tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
lenovo tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01: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