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>
Reviewed-on: https://review.coreboot.org/15539
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Duncan Laurie 2016-07-02 20:05:43 -07:00 committed by Martin Roth
parent dba7e76da1
commit 5edbb0427c
3 changed files with 22 additions and 61 deletions

View File

@ -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

View File

@ -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)
}
}
}

View File

@ -62,7 +62,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