mb/google/kahlee: Add grunt audio codecs to devicetree
Remove manually written asl entries for grunt's DA7219 and MAX98357A audio codecs, and replace them with equivalent devicetree entries. BUG=b:72121803 TEST=With grunt audio kernel patches, "aplay -l" shows playback devices: **** List of PLAYBACK Hardware Devices **** card 0: acpd7219m98357 [acpd7219m98357], device 0: Playback da7219-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: acpd7219m98357 [acpd7219m98357], device 2: HiFi Playback HiFi-2 [] Subdevices: 1/1 Subdevice #0: subdevice #0 Change-Id: Ia658c54a28a5363aabb4c50478adaca1f46d166a Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-on: https://review.coreboot.org/23658 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Justin TerAvest <teravest@chromium.org>
This commit is contained in:
parent
2bfae02d1d
commit
76e9d6b1ac
|
@ -121,4 +121,10 @@ config DRIVER_TPM_I2C_ADDR
|
|||
depends on KAHLEE_USE_I2C_TPM
|
||||
default 0x50
|
||||
|
||||
config GRUNT_AUDIO
|
||||
bool
|
||||
default y if !BOARD_GOOGLE_KAHLEE
|
||||
select DRIVERS_GENERIC_MAX98357A
|
||||
select DRIVERS_I2C_DA7219
|
||||
|
||||
endif # BOARD_GOOGLE_BASEBOARD_KAHLEE
|
||||
|
|
|
@ -21,111 +21,3 @@ Device (I2S)
|
|||
Name (_HID, "AMD7219")
|
||||
Name (_CID, "AMD7219")
|
||||
}
|
||||
|
||||
/* DA7219 codec */
|
||||
Device (DLG7)
|
||||
{
|
||||
Name (_HID, "DLGS7219")
|
||||
Name (_UID, 1)
|
||||
Name (_DDN, "Dialog Semiconductor DA7219 Audio Codec")
|
||||
Name (_S0W, 0x04)
|
||||
|
||||
Name(_CRS, ResourceTemplate ()
|
||||
{
|
||||
I2cSerialBus (
|
||||
0x001A,
|
||||
ControllerInitiated,
|
||||
0x00061A80,
|
||||
AddressingMode7Bit,
|
||||
"\\_SB.I2CA",
|
||||
0x00,
|
||||
ResourceConsumer,
|
||||
,
|
||||
)
|
||||
|
||||
/* Jack Detect AGPIO14 */
|
||||
GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone,,
|
||||
"\\_SB.GPIO") { 14 }
|
||||
})
|
||||
|
||||
/* Device-Specific Data */
|
||||
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" }
|
||||
}
|
||||
})
|
||||
|
||||
/* Device Properties for _DSD */
|
||||
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 },
|
||||
Package () { "dlg,micbias-pulse-lvl", 0 },
|
||||
Package () { "dlg,micbias-pulse-time", 0 }
|
||||
}
|
||||
}) /* DAAD */
|
||||
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
|
||||
/* MAX98357 codec */
|
||||
Device (MAXM)
|
||||
{
|
||||
Name (_HID, "MX98357A")
|
||||
Name (_UID, 0)
|
||||
Name (_DDN, "Maxim Integrated 98357A Amplifier")
|
||||
|
||||
Name (_CRS, ResourceTemplate ()
|
||||
{
|
||||
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
|
||||
IoRestrictionOutputOnly,
|
||||
"\\_SB.GPIO", 0x00, ResourceConsumer, ,) { 119 }
|
||||
})
|
||||
|
||||
Name (_DSD, Package ()
|
||||
{
|
||||
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
|
||||
Package ()
|
||||
{
|
||||
Package ()
|
||||
{
|
||||
"sdmode-gpio", Package () { \MAXM, 0, 0, 0 }
|
||||
},
|
||||
|
||||
Package ()
|
||||
{
|
||||
"sdmode-delay", 5
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,30 @@ chip soc/amd/stoneyridge
|
|||
device pci 18.4 on end
|
||||
device pci 18.5 on end
|
||||
end #domain
|
||||
device mmio 0xfedc2000 on
|
||||
chip drivers/i2c/da7219
|
||||
register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)"
|
||||
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
|
||||
chip drivers/generic/max98357a
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
end
|
||||
end
|
||||
device mmio 0xfedc3000 on
|
||||
chip drivers/i2c/tpm
|
||||
register "hid" = ""GOOG0005""
|
||||
|
|
Loading…
Reference in New Issue