From 98a4431b99b77c20b583199b3a587cd5cd05bbd5 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Tue, 4 Aug 2015 22:02:53 -0700 Subject: glados: Provide nau8825 platform data via _DSD BUG=chrome-os-partner:41280 BRANCH=none TEST=Audio jack insert/eject detection and headset buttons work on glados with the nau8825 driver in chromeos-3.18 and the staging kernel skl2. Change-Id: I813a985b4a39249a2cdbe45117acbdb7710bfa29 Signed-off-by: Patrick Georgi Original-Commit-Id: 7a5b3dafd407fea2376dff5c3dcde50dff4704fb Original-Change-Id: Ic24a0c444761d0f3a35c268078e70d9aacca4c80 Original-Signed-off-by: Ben Zhang Original-Reviewed-on: https://chromium-review.googlesource.com/293610 Original-Reviewed-by: Anatol Pomazau Original-Reviewed-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/11720 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- src/mainboard/google/glados/acpi/mainboard.asl | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src') diff --git a/src/mainboard/google/glados/acpi/mainboard.asl b/src/mainboard/google/glados/acpi/mainboard.asl index eba18a7d5e..b449ec40ed 100644 --- a/src/mainboard/google/glados/acpi/mainboard.asl +++ b/src/mainboard/google/glados/acpi/mainboard.asl @@ -143,6 +143,43 @@ Scope (\_SB.PCI0.I2C4) Name (_DDN, "NAU88L25 Codec") Name (_UID, 1) + /* + * Add DT style bindings with _DSD + * Device property values are documented in kernel doc + * Documentation/devicetree/bindings/sound/nau8825.txt + */ + Name (_DSD, Package () { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + /* Enable jack detection via JKDET pin */ + Package () {"nuvoton,jkdet-enable", 1}, + /* + * JKDET pin is pulled up by R389 on board. + * JKDET pin polarity = active low + */ + Package () {"nuvoton,jkdet-polarity", 1}, + /* VREF Impedance = 125 kOhm */ + Package () {"nuvoton,vref-impedance", 2}, + /* VDDA(1.8) * 1.53 = 2.754 */ + Package () {"nuvoton,micbias-voltage", 6}, + /* + * Setup 4 buttons impedance according to + * Android specification + */ + Package () {"nuvoton,sar-threshold-num", 4}, + Package () {"nuvoton,sar-threshold", + Package () {0xc, 0x1e, 0x38, 0x60}}, + Package () {"nuvoton,sar-hysteresis", 1}, + /* VDDA for button impedance measurement */ + Package () {"nuvoton,sar-voltage", 0}, + /* 100ms short key press debounce */ + Package () {"nuvoton,short-key-debounce", 2}, + /* 2^(7+2) = 512 ms insert/eject debounce */ + Package () {"nuvoton,jack-insert-debounce", 7}, + Package () {"nuvoton,jack-eject-debounce", 7}, + } + }) + Name (_CRS, ResourceTemplate() { I2cSerialBus ( -- cgit v1.2.3