Attention is currently required from: Jason Nien, Martin Roth.
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69482 )
Change subject: mg/google/zork: Add functionality to set GPIOs in romstage ......................................................................
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 matt.devillier@amd.corp-partner.google.com --- M src/mainboard/google/zork/romstage.c M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c M src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h 4 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/69482/1
diff --git a/src/mainboard/google/zork/romstage.c b/src/mainboard/google/zork/romstage.c index f72789a..9c70974 100644 --- a/src/mainboard/google/zork/romstage.c +++ b/src/mainboard/google/zork/romstage.c @@ -2,6 +2,7 @@
#include <baseboard/variants.h> #include <soc/fsp.h> +#include <soc/platform_descriptors.h>
void __weak variant_updm_update(FSP_M_CONFIG *mcfg) {}
@@ -9,3 +10,12 @@ { variant_updm_update(mcfg); } + +void mb_pre_fspm(void) +{ + const struct soc_amd_gpio *gpios; + size_t num_gpios; + + gpios = baseboard_romstage_gpio_table(&num_gpios); + gpio_configure_pads(gpios, num_gpios); +} 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 70e456c..3953a92 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 @@ *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 455684e..17c00db 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 @@ *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 c76ca02..fd39d1a 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 @@ /* 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 romstge. */ +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.