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 <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83606
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Matt DeVillier 2024-07-21 10:57:37 -05:00
commit f1e4de7fbf

View file

@ -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