summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/brya/variants/uldren/overridetree.cb37
-rw-r--r--src/mainboard/google/brya/variants/uldren/variant.c23
2 files changed, 55 insertions, 5 deletions
diff --git a/src/mainboard/google/brya/variants/uldren/overridetree.cb b/src/mainboard/google/brya/variants/uldren/overridetree.cb
index 9ca61b7c4e..fa20808e78 100644
--- a/src/mainboard/google/brya/variants/uldren/overridetree.cb
+++ b/src/mainboard/google/brya/variants/uldren/overridetree.cb
@@ -1,3 +1,15 @@
+fw_config
+ field TOUCHSCREEN 10 12
+ option TOUCHSCREEN_UNKNOWN 0
+ option TOUCHSCREEN_NONE 1
+ option TOUCHSCREEN_EKTH7D18 2
+ option TOUCHSCREEN_GT7996F 3
+ option TOUCHSCREEN_EKTH5012 4
+ option TOUCHSCREEN_WDT8752A 5
+ option TOUCHSCREEN_GTCH7502 6
+ end
+end
+
chip soc/intel/alderlake
register "sagv" = "SaGv_Enabled"
@@ -159,7 +171,10 @@ chip soc/intel/alderlake
register "generic.enable_delay_ms" = "1"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x20"
- device i2c 2c on end
+ device i2c 2c on
+ probe TOUCHSCREEN TOUCHSCREEN_UNKNOWN
+ probe TOUCHSCREEN TOUCHSCREEN_WDT8752A
+ end
end
chip drivers/i2c/generic
register "hid" = ""ELAN0001""
@@ -175,7 +190,10 @@ chip soc/intel/alderlake
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
register "enable_delay_ms" = "1"
register "has_power_resource" = "1"
- device i2c 10 on end
+ device i2c 10 on
+ probe TOUCHSCREEN TOUCHSCREEN_UNKNOWN
+ probe TOUCHSCREEN TOUCHSCREEN_EKTH5012
+ end
end
chip drivers/i2c/hid
register "generic.hid" = ""ELAN900C""
@@ -191,7 +209,10 @@ chip soc/intel/alderlake
register "generic.enable_delay_ms" = "6"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
- device i2c 16 on end
+ device i2c 16 on
+ probe TOUCHSCREEN TOUCHSCREEN_UNKNOWN
+ probe TOUCHSCREEN TOUCHSCREEN_EKTH7D18
+ end
end
chip drivers/i2c/hid
register "generic.hid" = ""GXTP7996""
@@ -206,7 +227,10 @@ chip soc/intel/alderlake
register "generic.enable_delay_ms" = "10"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
- device i2c 5d on end
+ device i2c 5d on
+ probe TOUCHSCREEN TOUCHSCREEN_UNKNOWN
+ probe TOUCHSCREEN TOUCHSCREEN_GT7996F
+ end
end
chip drivers/i2c/hid
register "generic.hid" = ""GTCH7502""
@@ -221,7 +245,10 @@ chip soc/intel/alderlake
register "generic.enable_delay_ms" = "30"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
- device i2c 40 on end
+ device i2c 40 on
+ probe TOUCHSCREEN TOUCHSCREEN_UNKNOWN
+ probe TOUCHSCREEN TOUCHSCREEN_GTCH7502
+ end
end
end
device ref i2c3 on
diff --git a/src/mainboard/google/brya/variants/uldren/variant.c b/src/mainboard/google/brya/variants/uldren/variant.c
index 6a79780f6e..d9a6565eed 100644
--- a/src/mainboard/google/brya/variants/uldren/variant.c
+++ b/src/mainboard/google/brya/variants/uldren/variant.c
@@ -1,8 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <console/console.h>
#include <sar.h>
+static const struct pad_config touchscreen_disable_pads[] = {
+ /* C0 : SMBCLK ==> EN_PP3300_TCHSCR_X */
+ PAD_NC(GPP_C0, NONE),
+ /* C1 : SMBDATA ==> TCHSCR_RST_L */
+ PAD_NC(GPP_C1, NONE),
+ /* H6 : I2C1_SDA ==> SOC_I2C_TCHSCR_SDA */
+ PAD_NC(GPP_H6, NONE),
+ /* H7 : I2C1_SCL ==> SOC_I2C_TCHSCR_SCL */
+ PAD_NC(GPP_H7, NONE),
+};
+
const char *get_wifi_sar_cbfs_filename(void)
{
return "wifi_sar_0.hex";
}
+
+void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
+{
+ if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_NONE))) {
+ printk(BIOS_INFO, "Disable touchscreen GPIO pins.\n");
+ gpio_padbased_override(padbased_table, touchscreen_disable_pads,
+ ARRAY_SIZE(touchscreen_disable_pads));
+ }
+}