From 1ab50fd5d5215a36e652bc798fd574918fcb4475 Mon Sep 17 00:00:00 2001 From: Frank Chu Date: Thu, 24 Feb 2022 10:39:19 +0800 Subject: [PATCH] mb/google/dedede/var/galtic: Add fw_config probe for 2nd touchscreen For galnat platform, support 2nd ELAN touchscreen via SSFC. Define FW_CONFIG bits 39 - 40 (SSFC bits 7-8) for touchscreen controller switch. BUG=b:221002826 TEST=touch screen is functional. Signed-off-by: Frank Chu Change-Id: Id3501205b147c9dc3c96ce8381a3e7492ae8258e Reviewed-on: https://review.coreboot.org/c/coreboot/+/62315 Tested-by: build bot (Jenkins) Reviewed-by: Frank Chu Reviewed-by: Ivan Chen Reviewed-by: Karthik Ramasubramanian --- .../dedede/variants/galtic/overridetree.cb | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/dedede/variants/galtic/overridetree.cb b/src/mainboard/google/dedede/variants/galtic/overridetree.cb index 8004736d31..73a5f49a37 100644 --- a/src/mainboard/google/dedede/variants/galtic/overridetree.cb +++ b/src/mainboard/google/dedede/variants/galtic/overridetree.cb @@ -1,3 +1,11 @@ +fw_config + field TOUCHSCREEN_SOURCE 39 40 + option TOUCHSCREEN_UNPROVISIONED 0 + option TOUCHSCREEN_ELAN1001 1 + option TOUCHSCREEN_ELAN9008 2 + end +end + fw_config field AUDIO_CODEC_SOURCE 41 43 option AUDIO_CODEC_UNPROVISIONED 0 @@ -165,7 +173,27 @@ chip soc/intel/jasperlake register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" register "enable_delay_ms" = "1" register "has_power_resource" = "1" - device i2c 10 on end + device i2c 10 on + probe TOUCHSCREEN_SOURCE TOUCHSCREEN_ELAN1001 + probe TOUCHSCREEN_SOURCE TOUCHSCREEN_UNPROVISIONED + end + end + chip drivers/i2c/hid + register "generic.hid" = ""ELAN9008"" + register "generic.desc" = ""ELAN Touchscreen"" + register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" + register "generic.probed" = "1" + register "generic.reset_gpio" = + "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D5)" + register "generic.enable_gpio" = + "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" + register "generic.enable_delay_ms" = "7" + register "generic.reset_delay_ms" = "70" + register "generic.has_power_resource" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 10 on + probe TOUCHSCREEN_SOURCE TOUCHSCREEN_ELAN9008 + end end end # I2C 2 device pci 19.0 on