Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85512?usp=email )
Change subject: mb/google/nissa/var/gothrax: Add probe and GPIO config for HDMI and touchpanel ......................................................................
mb/google/nissa/var/gothrax: Add probe and GPIO config for HDMI and touchpanel
1. Reuse DB_A (now DB_A_HDMI_LTE) as the HDMI switch. 2. Turn off the Type-C port C1 when using HDMI because both of them use the same interface in hardware. 3. Use TOUCH_PANEL_I2C_GENERIC (formerly TOUCH_PANEL_DISABLE) to support other screen models as we cannot have different fields to support individual touch screen models.
BUG=b:365445053 TEST=emerge-nissa coreboot and run in DUT
Change-Id: I1900658f7c2e09180287a4e61f02e04be203b6e9 Signed-off-by: Yunlong Jia yunlong.jia@ecs.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85512 Reviewed-by: Kapil Porwal kapilporwal@google.com Reviewed-by: Kyle Lin kylelinck@google.com Reviewed-by: Subrata Banik subratabanik@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/brya/variants/gothrax/fw_config.c M src/mainboard/google/brya/variants/gothrax/gpio.c M src/mainboard/google/brya/variants/gothrax/overridetree.cb M src/mainboard/google/brya/variants/gothrax/variant.c 4 files changed, 35 insertions(+), 23 deletions(-)
Approvals: build bot (Jenkins): Verified Subrata Banik: Looks good to me, approved Kyle Lin: Looks good to me, but someone else must approve Kapil Porwal: Looks good to me, approved
diff --git a/src/mainboard/google/brya/variants/gothrax/fw_config.c b/src/mainboard/google/brya/variants/gothrax/fw_config.c index 54f6095..4eed44c 100644 --- a/src/mainboard/google/brya/variants/gothrax/fw_config.c +++ b/src/mainboard/google/brya/variants/gothrax/fw_config.c @@ -28,7 +28,8 @@
void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { - if (!fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE))) { + if (!(fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE)) || + fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE)))) { printk(BIOS_INFO, "Disable LTE-related GPIO pins on gothrax.\n"); gpio_padbased_override(padbased_table, lte_disable_pads_gothrax, ARRAY_SIZE(lte_disable_pads_gothrax)); diff --git a/src/mainboard/google/brya/variants/gothrax/gpio.c b/src/mainboard/google/brya/variants/gothrax/gpio.c index 077c850..ae236fb 100644 --- a/src/mainboard/google/brya/variants/gothrax/gpio.c +++ b/src/mainboard/google/brya/variants/gothrax/gpio.c @@ -81,13 +81,6 @@ 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); @@ -102,11 +95,6 @@
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; - } else { - *num = ARRAY_SIZE(romstage_gpio_table); - return romstage_gpio_table; - } + *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 49078fe..2e81e89 100644 --- a/src/mainboard/google/brya/variants/gothrax/overridetree.cb +++ b/src/mainboard/google/brya/variants/gothrax/overridetree.cb @@ -3,7 +3,7 @@ option DB_NONE 0 option DB_C_A 1 option DB_C_A_LTE 2 - option DB_A 3 + option DB_A_HDMI_LTE 3 end field THERMAL_SOLUTION 2 option THERMAL_SOLUTION_PASSIVE 0 @@ -25,8 +25,8 @@ option WFC_ABSENT 1 end field TOUCH_PANEL 9 - option TOUCH_PANEL_ENABLE 0 - option TOUCH_PANEL_DISABLE 1 + option TOUCH_PANEL_I2C_HID 0 + option TOUCH_PANEL_I2C_GENERIC 1 end end
@@ -231,7 +231,7 @@ register "generic.has_power_resource" = "1" register "hid_desc_reg_offset" = "0x01" device i2c 0x10 on - probe TOUCH_PANEL TOUCH_PANEL_ENABLE + probe TOUCH_PANEL TOUCH_PANEL_I2C_HID end end chip drivers/i2c/hid @@ -249,7 +249,23 @@ register "generic.has_power_resource" = "1" register "hid_desc_reg_offset" = "0x01" device i2c 0x41 on - probe TOUCH_PANEL TOUCH_PANEL_ENABLE + probe TOUCH_PANEL TOUCH_PANEL_I2C_HID + end + end + chip drivers/i2c/generic + register "hid" = ""ELAN0001"" + register "desc" = ""ELAN Touchscreen"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_C7_IRQ)" + register "detect" = "1" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C1)" + register "reset_delay_ms" = "150" + register "reset_off_delay_ms" = "1" + register "enable_gpio" = + "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)" + register "enable_delay_ms" = "6" + register "has_power_resource" = "1" + device i2c 10 on + probe TOUCH_PANEL TOUCH_PANEL_I2C_GENERIC end end end @@ -317,6 +333,7 @@ register "input_analog_gain" = "3" device i2c 28 on probe DB_USB DB_C_A_LTE + probe DB_USB DB_A_HDMI_LTE end end end @@ -396,7 +413,10 @@ chip drivers/intel/pmc_mux/conn use usb2_port2 as usb2_port use tcss_usb3_port2 as usb3_port - device generic 1 alias conn1 on end + device generic 1 alias conn1 on + probe DB_USB DB_C_A + probe DB_USB DB_C_A_LTE + end end end end @@ -469,6 +489,7 @@ register "type" = "UPC_TYPE_INTERNAL" device ref usb2_port5 on probe DB_USB DB_C_A_LTE + probe DB_USB DB_A_HDMI_LTE end end chip drivers/usb/acpi @@ -516,6 +537,7 @@ register "type" = "UPC_TYPE_INTERNAL" device ref usb3_port3 on probe DB_USB DB_C_A_LTE + probe DB_USB DB_A_HDMI_LTE end end end diff --git a/src/mainboard/google/brya/variants/gothrax/variant.c b/src/mainboard/google/brya/variants/gothrax/variant.c index a1fdc23..8b8822b 100644 --- a/src/mainboard/google/brya/variants/gothrax/variant.c +++ b/src/mainboard/google/brya/variants/gothrax/variant.c @@ -7,7 +7,8 @@
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) { - if (!fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE))) { + if (!(fw_config_probe(FW_CONFIG(DB_USB, DB_C_A_LTE)) || + fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE)))) { printk(BIOS_INFO, "Disable usb2_port5 and usb3_port3 of WWAN.\n");
config->usb2_ports[4].enable = 0; @@ -33,7 +34,7 @@ config->usb2_ports[6].pre_emp_bit = USB2_HALF_BIT_PRE_EMP; }
- if (fw_config_probe(FW_CONFIG(DB_USB, DB_A))) { + if (fw_config_probe(FW_CONFIG(DB_USB, DB_A_HDMI_LTE))) { printk(BIOS_INFO, "Disable typec aux_bias_pads in the SOC.\n"); config->typec_aux_bias_pads[1].pad_auxp_dc = 0x00; config->typec_aux_bias_pads[1].pad_auxn_dc = 0x00;