mb/google/brya: Add support for romstage GPIO table

Some variants may require more complex power sequencing than can be
accomodated with just 2 GPIO tables, therefore introduce one in romstage
as well.

BUG=b:187691798

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I7a63a2ee2cd036b9ae5822be9c87d8a026a54922
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
This commit is contained in:
Tim Wawrzynczak 2021-09-09 16:12:51 -06:00 committed by Felix Held
parent 90b1dc1891
commit f55e82c393
7 changed files with 23 additions and 2 deletions

View File

@ -10,11 +10,15 @@ void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
{
const struct mb_cfg *mem_config = variant_memory_params();
bool half_populated = variant_is_half_populated();
const struct mem_spd spd_info = {
.topo = MEM_TOPO_MEMORY_DOWN,
.cbfs_index = variant_memory_sku(),
};
const struct pad_config *pads;
size_t pads_num;
memcfg_init(m_cfg, mem_config, &spd_info, half_populated);
pads = variant_romstage_gpio_table(&pads_num);
gpio_configure_pads(pads, pads_num);
}

View File

@ -1,3 +1,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-y += gpio.c

View File

@ -422,3 +422,9 @@ const struct cros_gpio *__weak variant_cros_gpios(size_t *num)
*num = ARRAY_SIZE(cros_gpios);
return cros_gpios;
}
const struct pad_config *__weak variant_romstage_gpio_table(size_t *num)
{
*num = 0;
return NULL;
}

View File

@ -1,6 +1,7 @@
bootblock-y += gpio.c
romstage-y += memory.c
romstage-y += gpio.c
ramstage-y += gpio.c
ramstage-y += ramstage.c

View File

@ -444,3 +444,9 @@ const struct cros_gpio *__weak variant_cros_gpios(size_t *num)
*num = ARRAY_SIZE(cros_gpios);
return cros_gpios;
}
const struct pad_config *__weak variant_romstage_gpio_table(size_t *num)
{
*num = 0;
return NULL;
}

View File

@ -16,6 +16,7 @@ const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_gpio_override_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
const struct cros_gpio *variant_cros_gpios(size_t *num);
const struct pad_config *variant_romstage_gpio_table(size_t *num);
const struct mb_cfg *variant_memory_params(void);
int variant_memory_sku(void);

View File

@ -1,4 +1,5 @@
bootblock-y += gpio.c
romstage-y += gpio.c
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c
ramstage-$(CONFIG_FW_CONFIG) += variant.c
ramstage-y += gpio.c