Yunlong Jia has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80850?usp=email )
Change subject: mb/google/nissa/var/gothrax: Add probe and GPIO config for touchpanel ......................................................................
mb/google/nissa/var/gothrax: Add probe and GPIO config for touchpanel
Add FW_CONFIG probe to separate touch panel settings. TOUCH_PANEL_ENABLE/TOUCH_PANEL_DISABLE Use different gpio tables based on the value of TOUCH_PANEL.
BUG=b:325987249 TEST=emerge-nissa coreboot and run in DUT
Change-Id: I23c62406a932815ff1cfafe05b70468b1f9cca54 Signed-off-by: Yunlong Jia yunlong.jia@ecs.corp-partner.google.com --- M src/mainboard/google/brya/variants/gothrax/gpio.c M src/mainboard/google/brya/variants/gothrax/overridetree.cb 2 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/80850/1
diff --git a/src/mainboard/google/brya/variants/gothrax/gpio.c b/src/mainboard/google/brya/variants/gothrax/gpio.c index 0bf1b52..71a211e 100644 --- a/src/mainboard/google/brya/variants/gothrax/gpio.c +++ b/src/mainboard/google/brya/variants/gothrax/gpio.c @@ -80,6 +80,13 @@ PAD_CFG_GPO(GPP_H20, 1, DEEP), };
+static const struct pad_config romstage_gpio_table_nontp[] = { + /* H12 : UART0_RTS# ==> SD_PERST_L */ + PAD_CFG_GPO(GPP_H12, 1, DEEP), + /* H20 : IMGCLKOUT1 ==> WLAN_PERST_L */ + PAD_CFG_GPO(GPP_H20, 1, DEEP), +}; + const struct pad_config *variant_gpio_override_table(size_t *num) { *num = ARRAY_SIZE(override_gpio_table); @@ -94,6 +101,10 @@
const struct pad_config *variant_romstage_gpio_table(size_t *num) { + if (fw_config_probe(FW_CONFIG(TOUCH_PANEL, TOUCH_PANEL_DISABLE))) { + *num = ARRAY_SIZE(romstage_gpio_table_nontp); + return romstage_gpio_table_nontp; + } *num = ARRAY_SIZE(romstage_gpio_table); return romstage_gpio_table; } diff --git a/src/mainboard/google/brya/variants/gothrax/overridetree.cb b/src/mainboard/google/brya/variants/gothrax/overridetree.cb index b36ff07..77be31c 100644 --- a/src/mainboard/google/brya/variants/gothrax/overridetree.cb +++ b/src/mainboard/google/brya/variants/gothrax/overridetree.cb @@ -24,6 +24,10 @@ option WFC_PRESENT 0 option WFC_ABSENT 1 end + field TOUCH_PANEL 9 + option TOUCH_PANEL_ENABLE 0 + option TOUCH_PANEL_DISABLE 1 + end end
chip soc/intel/alderlake @@ -226,7 +230,9 @@ register "generic.enable_delay_ms" = "6" register "generic.has_power_resource" = "1" register "hid_desc_reg_offset" = "0x01" - device i2c 0x10 on end + device i2c 0x10 on + probe TOUCH_PANEL TOUCH_PANEL_ENABLE + end end end device ref i2c2 on