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>
This commit is contained in:
Yunlong Jia 2024-12-05 10:10:50 +00:00 committed by Subrata Banik
commit 8c0df740c7
4 changed files with 35 additions and 23 deletions

View file

@ -28,7 +28,8 @@ static const struct pad_config wfc_disable_pads[] = {
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));

View file

@ -81,13 +81,6 @@ static const struct pad_config romstage_gpio_table[] = {
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_early_gpio_table(size_t *num)
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;
}

View file

@ -3,7 +3,7 @@ fw_config
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 @@ fw_config
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 @@ chip soc/intel/alderlake
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 @@ chip soc/intel/alderlake
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 @@ chip soc/intel/alderlake
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 soc/intel/alderlake
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 @@ chip soc/intel/alderlake
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 @@ chip soc/intel/alderlake
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

View file

@ -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 @@ void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
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;