mb/google/fatcat/var/moonstone: Add fw_config touchscreen setting

Add a fw_config for touchscreen and non-touchscreen sku.
Based on the field to differentiat the touchscreen I2C port on/off
and GPIOs configuration.

BUG=none
TEST=Update the fw_config field and check the ap log:
     ABSENCE = 0 ... without touchscreen i2c probing messages.
     PRESENCE = 1 ... with touchscreen i2c probing messages.

Change-Id: I5f2cc0b0c37986240fbbeae3668ccc250748295d
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89851
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Ren Kuo 2025-10-31 19:23:33 +08:00 committed by Karthik Ramasubramanian
commit fe7b75d792
2 changed files with 19 additions and 0 deletions

View file

@ -77,6 +77,17 @@ static const struct pad_config pre_mem_fp_spi_enable_pads[] = {
PAD_CFG_GPO(GPP_C15, 0, DEEP),
};
static const struct pad_config touchscreen_disable_pads[] = {
/* GPP_F08: EN_TCHSCR_PWR => NC */
PAD_NC(GPP_F08, NONE),
/* GPP_F16: TCHSCR_RST_L => NC */
PAD_NC(GPP_F16, NONE),
/* GPP_F18: TCHSCR_INT_L => NC */
PAD_NC(GPP_F18, NONE),
/* GPP_E05: TCHSCR_RPT_EN => NC */
PAD_NC(GPP_E05, NONE),
};
void fw_config_configure_pre_mem_gpio(void)
{
if (!fw_config_is_provisioned()) {
@ -134,4 +145,7 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
GPIO_PADBASED_OVERRIDE(padbased_table, use_usb3c_enable_pads);
else
GPIO_PADBASED_OVERRIDE(padbased_table, use_usb2a2c_hdmi_enable_pads);
if (fw_config_probe(FW_CONFIG(TOUCH_SCREEN, ABSENCE)))
GPIO_PADBASED_OVERRIDE(padbased_table, touchscreen_disable_pads);
}

View file

@ -16,6 +16,10 @@ fw_config
option USB2A2C_HDMI 0
option USB3C 1
end
field TOUCH_SCREEN 13 13
option ABSENCE 0
option PRESENCE 1
end
end
chip soc/intel/pantherlake
@ -428,6 +432,7 @@ chip soc/intel/pantherlake
end
end # I2C4
device ref i2c5 on
probe TOUCH_SCREEN PRESENCE
chip drivers/i2c/hid
register "generic.hid" = ""ELAN9004""
register "generic.desc" = ""ELAN Touchscreen""