diff options
author | Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com> | 2024-03-01 02:05:16 +0000 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2024-03-05 11:58:26 +0000 |
commit | 735524529a324e828f79a4c63dd5b46d4d8144d5 (patch) | |
tree | d68f9e2804f1e99b46c23a0eb6af33cbfbfd9b7b /src/mainboard/google/brya/variants/gothrax/gpio.c | |
parent | 809d8c5d283cb8dffaed64b0a6ebea5e53459c55 (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80850
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kyle Lin <kylelinck@google.com>
Diffstat (limited to 'src/mainboard/google/brya/variants/gothrax/gpio.c')
-rw-r--r-- | src/mainboard/google/brya/variants/gothrax/gpio.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mainboard/google/brya/variants/gothrax/gpio.c b/src/mainboard/google/brya/variants/gothrax/gpio.c index 0bf1b52ddb..077c8506f7 100644 --- a/src/mainboard/google/brya/variants/gothrax/gpio.c +++ b/src/mainboard/google/brya/variants/gothrax/gpio.c @@ -2,6 +2,7 @@ #include <baseboard/variants.h> #include <soc/gpio.h> +#include <fw_config.h> /* Pad configuration in ramstage */ static const struct pad_config override_gpio_table[] = { @@ -80,6 +81,13 @@ 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); @@ -94,6 +102,11 @@ const struct pad_config *variant_early_gpio_table(size_t *num) const struct pad_config *variant_romstage_gpio_table(size_t *num) { - *num = ARRAY_SIZE(romstage_gpio_table); - return romstage_gpio_table; + 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; + } } |