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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69482
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Matt DeVillier 2022-11-11 16:14:33 -06:00 committed by Eric Lai
parent 150b809edf
commit c429ee1d97
4 changed files with 29 additions and 0 deletions

View File

@ -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 @@ void mainboard_updm_update(FSP_M_CONFIG *mcfg)
{
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);
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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.