google/reef: Add DA7219 support in acpi

Add DA7219 support in acpi.
DA7219 has advanced accessory detection functionality.
Also add DA7219's AAD as a ACPI data node.

Change-Id: I979275cb2ab1e593ff1e5d360bea83b843e45032
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Reviewed-on: https://review.coreboot.org/15436
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Sathyanarayana Nujella 2016-06-16 15:05:02 -07:00 committed by Aaron Durbin
parent 29f351e7df
commit ccae9aec53
2 changed files with 63 additions and 0 deletions

View File

@ -38,3 +38,63 @@ 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

@ -21,6 +21,9 @@
/* Input device interrupt configuration */
#define TOUCHPAD_INT GPIO_18_IRQ
#define BOARD_HP_MIC_CODEC_IRQ GPIO_116_IRQ
#define BOARD_HP_MIC_CODEC_I2C_ADDR 0x1a
#ifndef __ACPI__
/*
* Pad configuration in ramstage. The order largely follows the 'GPIO Muxing'