mb/google/dedede: Add method to set GPIOs in romstage
Add method variant_romstage_gpio_table() with empty weak implementation to allow variants to override as needed for touchscreen power sequencing (to be implemented in a subsequent commit). Call method in romstage to program any GPIOs the variant may need to set. TEST=tested with rest of patch train Change-Id: Ic216827a4b53d1d35913efca63a43d4672791c54 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71186 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
committed by
Felix Singer
parent
3cd06cc427
commit
af6029ba1a
@@ -10,6 +10,8 @@
|
||||
|
||||
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||
{
|
||||
const struct pad_config *pads;
|
||||
size_t pads_num;
|
||||
const struct mb_cfg *board_cfg = variant_memcfg_config();
|
||||
const struct spd_info spd_info = {
|
||||
.read_type = READ_SPD_CBFS,
|
||||
@@ -18,4 +20,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||
bool half_populated = variant_mem_is_half_populated();
|
||||
|
||||
memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated);
|
||||
|
||||
pads = variant_romstage_gpio_table(&pads_num);
|
||||
gpio_configure_pads(pads, pads_num);
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
bootblock-y += gpio.c
|
||||
|
||||
romstage-y += gpio.c
|
||||
romstage-y += memory.c
|
||||
|
||||
ramstage-y += gpio.c
|
||||
|
@@ -469,6 +469,12 @@ const struct pad_config *__weak variant_sleep_gpio_table(size_t *num)
|
||||
return sleep_gpio_table;
|
||||
}
|
||||
|
||||
const struct pad_config *__weak variant_romstage_gpio_table(size_t *num)
|
||||
{
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const struct cros_gpio cros_gpios[] = {
|
||||
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_COMM0_NAME),
|
||||
CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_COMM0_NAME),
|
||||
|
@@ -14,6 +14,7 @@ const struct pad_config *baseboard_gpio_table(size_t *num);
|
||||
const struct pad_config *variant_early_gpio_table(size_t *num);
|
||||
const struct pad_config *variant_sleep_gpio_table(size_t *num);
|
||||
const struct pad_config *variant_override_gpio_table(size_t *num);
|
||||
const struct pad_config *variant_romstage_gpio_table(size_t *num);
|
||||
|
||||
enum s0ix_entry {
|
||||
S0IX_EXIT,
|
||||
|
Reference in New Issue
Block a user