From f1e4de7fbfe21a34fb536c12679bd5b5508fb475 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 21 Jul 2024 10:57:37 -0500 Subject: [PATCH] mb/google/dedede/var/galtic: Add fw_config option for touchpad type Galtic has two Elan touchpad options, and since both use the same i2c address, the runtime i2c detection performed during SSDT generation can't distinquish between them, leading to both devices being added to the SSDT. This isn't a problem for Linux, but Windows can't deal with two touchpads being enabled and using the same resources. To mitigate this, add a new fw_config field which allows selection between the two touchpad models, as well as a fallback option for all devices which are not configured. Users who need to can set the touchpad type in the SSFC using ectool, and then coreboot will enable only the selected touchpad at boot. TEST=build/boot google/dedede (galnat) after setting touchpad type in SSFC. Verify correct touchpad selected via fw_config, only one touchpad entry present in SSDT, and touchpad functional under both Linux and Windows 11. Change-Id: I36797eb5c8f262782380f95ff3c2e38443cf00c0 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/83606 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian Reviewed-by: Angel Pons --- .../google/dedede/variants/galtic/overridetree.cb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/dedede/variants/galtic/overridetree.cb b/src/mainboard/google/dedede/variants/galtic/overridetree.cb index 254d291ed8..0ccfbfa519 100644 --- a/src/mainboard/google/dedede/variants/galtic/overridetree.cb +++ b/src/mainboard/google/dedede/variants/galtic/overridetree.cb @@ -9,6 +9,11 @@ fw_config option AUDIO_CODEC_ALC5682 1 option AUDIO_CODEC_ALC5682I_VS 2 end + field TOUCHPAD_SOURCE 62 63 + option TOUCHPAD_UNPROVISIONED 0 + option TOUCHPAD_ELAN0000 1 + option TOUCHPAD_ELAN2702 2 + end end chip soc/intel/jasperlake @@ -151,7 +156,10 @@ chip soc/intel/jasperlake register "irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_B3_IRQ)" register "wake" = "GPE0_DW0_03" register "detect" = "1" - device i2c 15 on end + device i2c 15 on + probe TOUCHPAD_SOURCE TOUCHPAD_UNPROVISIONED + probe TOUCHPAD_SOURCE TOUCHPAD_ELAN0000 + end end chip drivers/i2c/hid register "generic.hid" = ""ELAN2702"" @@ -160,7 +168,10 @@ chip soc/intel/jasperlake register "generic.wake" = "GPE0_DW0_03" register "generic.detect" = "1" register "hid_desc_reg_offset" = "0x01" - device i2c 15 on end + device i2c 15 on + probe TOUCHPAD_SOURCE TOUCHPAD_UNPROVISIONED + probe TOUCHPAD_SOURCE TOUCHPAD_ELAN2702 + end end end device ref i2c2 on