From c429ee1d9764398fe9dbb3e34b03bd3bd6d95ed9 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Fri, 11 Nov 2022 16:14:33 -0600 Subject: mg/google/zork: Add functionality to set GPIOs in romstage Add (empty) baseboard GPIO tables, getter functions, and call to gpio_configure_pads() in romstage, in preparation for adding touchscreen GPIO configuration/power sequencing. Change-Id: If0f626dbc7e601c2f49759e49a0baf027bf25f96 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/69482 Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- .../google/zork/variants/baseboard/gpio_baseboard_dalboz.c | 8 ++++++++ .../google/zork/variants/baseboard/gpio_baseboard_trembyle.c | 8 ++++++++ .../google/zork/variants/baseboard/include/baseboard/variants.h | 3 +++ 3 files changed, 19 insertions(+) (limited to 'src/mainboard/google/zork/variants/baseboard') diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c index 70e456ccb5..3953a92e2d 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c @@ -353,3 +353,11 @@ const struct soc_amd_gpio *variant_early_gpio_table(size_t *size) *size = ARRAY_SIZE(early_gpio_table); return early_gpio_table; } + +static const struct soc_amd_gpio romstage_gpio_table[] = {}; + +const struct soc_amd_gpio *baseboard_romstage_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(romstage_gpio_table); + return romstage_gpio_table; +} diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c index 455684e595..17c00db4a8 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c @@ -402,3 +402,11 @@ const struct soc_amd_gpio *variant_early_gpio_table(size_t *size) *size = ARRAY_SIZE(early_gpio_table); return early_gpio_table; } + +static const struct soc_amd_gpio romstage_gpio_table[] = {}; + +const struct soc_amd_gpio *baseboard_romstage_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(romstage_gpio_table); + return romstage_gpio_table; +} diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h index c76ca026ae..2e97aabf79 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h @@ -23,6 +23,9 @@ const struct soc_amd_gpio *variant_override_gpio_table(size_t *size); /* This function provides GPIO init in bootblock. */ const struct soc_amd_gpio *variant_bootblock_gpio_table(size_t *size, int slp_typ); +/* This function provides GPIO settings for romstage. */ +const struct soc_amd_gpio *baseboard_romstage_gpio_table(size_t *size); + /* * This function provides GPIO table for the pads that need to be configured when entering * sleep. -- cgit v1.2.3