From b7090ee1d0d35be6797234fe464b49f623bb7cc7 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Thu, 14 Jan 2016 13:08:17 -0800 Subject: google/chell: Adjust nuvoton 8825 button thresholds, add properties Set "nuvoton,sar-threshold" property to thresholds based on tuning with the Android Wired Headphone Compatibility Kit and Chell EVT. Also set properties nuvoton,sar-compare-time and nuvoton,sar-sampling-time. The values of compare and sampling time align with the ones from this CL: https://chromium-review.googlesource.com/306372 Signed-off-by: Benson Leung BUG=chrome-os-partner:49333 BRANCH=none TEST=Run evtest, selecting the input event for sklnau8825adi Using the Nominal headphones from the kit, check that the buttons for "KEY_VOLUMEDOWN", "KEY_VOLUMEUP", "KEY_MEDIA", and code 582 (?) (should be voice search, but evtest doesn't understand) All of these buttons should work properly. Change-Id: I43dc1957f7d95744f41039a306d323806e66c56a Signed-off-by: Patrick Georgi Original-Commit-Id: 2bb545500afeb5b4fa0d1cd02dbf6453f19901ab Original-Change-Id: I126aae1e5ed1b9e1a2429e8c94fe08b3ba3ca736 Original-Reviewed-on: https://chromium-review.googlesource.com/322243 Original-Commit-Ready: Benson Leung Original-Tested-by: Benson Leung Original-Reviewed-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/13013 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- src/mainboard/google/chell/acpi/mainboard.asl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/chell/acpi/mainboard.asl b/src/mainboard/google/chell/acpi/mainboard.asl index 319e0b8e02..07145825b6 100644 --- a/src/mainboard/google/chell/acpi/mainboard.asl +++ b/src/mainboard/google/chell/acpi/mainboard.asl @@ -165,11 +165,17 @@ Scope (\_SB.PCI0.I2C4) * Android specification */ Package () {"nuvoton,sar-threshold-num", 4}, + /* + * Thresholds determined using the Wired Headphone + * Compatibility Kit and a Chell EVT + */ Package () {"nuvoton,sar-threshold", - Package () {0xc, 0x1e, 0x38, 0x60}}, + Package () {0x20, 0x32, 0x50, 0x70}}, Package () {"nuvoton,sar-hysteresis", 1}, /* VDDA for button impedance measurement */ Package () {"nuvoton,sar-voltage", 0}, + Package () {"nuvoton,sar-compare-time", 0 }, + Package () {"nuvoton,sar-sampling-time", 0 }, /* 100ms short key press debounce */ Package () {"nuvoton,short-key-debounce", 2}, /* 2^(7+2) = 512 ms insert/eject debounce */ -- cgit v1.2.3