From c9578eac246f7f4ada9115037e4f06bc5ab4d124 Mon Sep 17 00:00:00 2001 From: Appukuttan V K Date: Fri, 13 Feb 2026 11:43:33 +0530 Subject: [PATCH] mb/google/ocelot: Add THC-SPI Touchscreen support in fw_config Add support for THC-SPI touchscreen configuration in the GPIO pad-based override logic. The GPP_E17 pin serves dual purposes depending on the hardware configuration: - When touchscreen THC-SPI is present: NF3 (THC HID-SPI CS0) - When fingerprint sensor is present: NF5 (GSPI0 CS0) The firmware configuration logic now prioritizes touchscreen THC-SPI over fingerprint sensor configuration, as these are mutually exclusive hardware configurations. BUG=None TEST=Build ocelot and verify correct GPIO configuration based on fw_config settings for both touchscreen THC-SPI and fingerprint sensor configurations Change-Id: I93deb6352cd0f1168ad53819151c705c6ce48b28 Signed-off-by: Appukuttan V K Reviewed-on: https://review.coreboot.org/c/coreboot/+/91197 Tested-by: build bot (Jenkins) Reviewed-by: P, Usha --- .../google/ocelot/variants/ocelot/fw_config.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/ocelot/variants/ocelot/fw_config.c b/src/mainboard/google/ocelot/variants/ocelot/fw_config.c index 003cd84728..9984ef5e89 100644 --- a/src/mainboard/google/ocelot/variants/ocelot/fw_config.c +++ b/src/mainboard/google/ocelot/variants/ocelot/fw_config.c @@ -605,7 +605,21 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) GPIO_PADBASED_OVERRIDE(padbased_table, ish_disable_pads); } - if (fw_config_probe(FW_CONFIG(FP, FP_PRESENT))) { + /* + * *=========================================================================* + * | Usage | GPP_E17 | + * *=========================================================================* + * | Touchscreen in THC-SPI (with rework) | NF3: THC HID-SPI CS0 | + * *---------------------------------------*---------------------------------* + * | FPS present (without rework) | NF5: GSPI0 CS0 | + * *---------------------------------------*---------------------------------* + * + * NOTE: 1. CBI selecting TS THC-SPI or implies TS rework is applied for the board. + * 2. CBI selecting TS THC-SPI with FPS present is invalid case. + */ + if (fw_config_probe(FW_CONFIG(TOUCHSCREEN, TOUCHSCREEN_THC_SPI))) { + /* Board has TS THC-SPI rework and does not support FPS*/ + } else if (fw_config_probe(FW_CONFIG(FP, FP_PRESENT))) { GPIO_PADBASED_OVERRIDE(padbased_table, fp_enable_pads); } else { GPIO_PADBASED_OVERRIDE(padbased_table, fp_disable_pads);