Duncan Laurie (dlaurie@chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15539
-gerrit
commit a663ca5c9fb300fac895510c0935b34a92640896 Author: Duncan Laurie dlaurie@chromium.org Date: Sat Jul 2 20:05:43 2016 -0700
mainboard/google/reef: Use device driver for DA7219 configuration
Use the device driver for DA7219 device configuration in the SSDT and remove the static copy in the DSDT.
Tested on reef to ensure that the generated SSDT contents are equivalent to the current DSDT contents.
Change-Id: I288eb05d0cb3f5310c4dca4aa1eab5a029f216af Signed-off-by: Duncan Laurie dlaurie@chromium.org --- src/mainboard/google/reef/Kconfig | 3 ++ src/mainboard/google/reef/acpi/mainboard.asl | 60 ---------------------------- src/mainboard/google/reef/devicetree.cb | 20 +++++++++- 3 files changed, 22 insertions(+), 61 deletions(-)
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig index 194a6ba..3ca1af1 100644 --- a/src/mainboard/google/reef/Kconfig +++ b/src/mainboard/google/reef/Kconfig @@ -25,6 +25,9 @@ config CHROMEOS select VBOOT_OPROM_MATTERS select VIRTUAL_DEV_SWITCH
+config DRIVERS_I2C_DA7219 + default y + config DRIVERS_I2C_GENERIC default y
diff --git a/src/mainboard/google/reef/acpi/mainboard.asl b/src/mainboard/google/reef/acpi/mainboard.asl index 6e6d61f..5b6e976 100644 --- a/src/mainboard/google/reef/acpi/mainboard.asl +++ b/src/mainboard/google/reef/acpi/mainboard.asl @@ -38,63 +38,3 @@ Scope (_SB.PCI0.LPCB) /* Chrome OS Embedded Controller */ #include "ec.asl" } - -Scope (_SB.PCI0.I2C0) -{ - /* Headphone Codec */ - Device (HPDA) - { - Name (_HID, "DLGS7219") - Name (_DDN, "Dialog DA7219 Codec") - Name (_UID, 1) - Name (_S0W, 4) - Name (_DSD, Package () { - ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), - Package () { - Package () { "dlg,micbias-lvl", 2600 }, - Package () { "dlg,mic-amp-in-sel", "diff" }, - }, - ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), - Package () { - Package () {"da7219_aad", "DAAD"}, - } - }) - - Name (DAAD, Package () { - ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), - Package () { - Package () { "dlg,btn-cfg", 50 }, - Package () { "dlg,mic-det-thr", 500 }, - Package () { "dlg,jack-ins-deb", 20 }, - Package () { "dlg,jack-det-rate", "32ms_64ms" }, - Package () { "dlg,jack-rem-deb", 1 }, - Package () { "dlg,a-d-btn-thr", 0xa }, - Package () { "dlg,d-b-btn-thr", 0x16 }, - Package () { "dlg,b-c-btn-thr", 0x21 }, - Package () { "dlg,c-mic-btn-thr", 0x3E }, - Package () { "dlg,btn-avg", 4 }, - Package () { "dlg,adc-1bit-rpt", 1 }, - } - }) - - Name (_CRS, ResourceTemplate() - { - I2cSerialBus ( - BOARD_HP_MIC_CODEC_I2C_ADDR, - ControllerInitiated, - 400000, - AddressingMode7Bit, - "\_SB.PCI0.I2C0", - ) - Interrupt (ResourceConsumer, Level, ActiveLow) - { - BOARD_HP_MIC_CODEC_IRQ - } - }) - - Method (_STA) - { - Return (0xF) - } - } -} diff --git a/src/mainboard/google/reef/devicetree.cb b/src/mainboard/google/reef/devicetree.cb index e0831f4..b931a89 100644 --- a/src/mainboard/google/reef/devicetree.cb +++ b/src/mainboard/google/reef/devicetree.cb @@ -57,7 +57,25 @@ chip soc/intel/apollolake device pci 14.1 off end # - Root Port 1 - PCIe-B 1 device pci 15.0 on end # - XHCI device pci 15.1 off end # - XDCI - device pci 16.0 on end # - I2C 0 + device pci 16.0 on # - I2C 0 + chip drivers/i2c/da7219 + register "irq" = "IRQ_LEVEL_LOW(GPIO_116_IRQ)" + register "btn_cfg" = "50" + register "mic_det_thr" = "500" + register "jack_ins_deb" = "20" + register "jack_det_rate" = ""32ms_64ms"" + register "jack_rem_deb" = "1" + register "a_d_btn_thr" = "0xa" + register "d_b_btn_thr" = "0x16" + register "b_c_btn_thr" = "0x21" + register "c_mic_btn_thr" = "0x3e" + register "btn_avg" = "4" + register "adc_1bit_rpt" = "1" + register "micbias_lvl" = "2600" + register "mic_amp_in_sel" = ""diff"" + device i2c 1a on end + end + end device pci 16.1 on end # - I2C 1 device pci 16.2 on end # - I2C 2 device pci 16.3 on end # - I2C 3