diff --git a/src/mainboard/google/hatch/romstage.c b/src/mainboard/google/hatch/romstage.c index eb5153c133..710f1cea99 100644 --- a/src/mainboard/google/hatch/romstage.c +++ b/src/mainboard/google/hatch/romstage.c @@ -31,6 +31,8 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) struct cnl_mb_cfg memcfg; int mem_sku; int is_single_ch_mem; + const struct pad_config *pads; + size_t pads_num; variant_memory_params(&memcfg); mem_sku = variant_memory_sku(); @@ -53,4 +55,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) } cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg); + + pads = variant_romstage_gpio_table(&pads_num); + gpio_configure_pads(pads, pads_num); } diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c index c65375e2ec..609fbf742a 100644 --- a/src/mainboard/google/hatch/variants/baseboard/gpio.c +++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c @@ -434,6 +434,12 @@ const struct pad_config *__weak variant_early_gpio_table(size_t *num) return NULL; } +/* Weak implementation of romstage gpio */ +const struct pad_config *__weak variant_romstage_gpio_table(size_t *num) +{ + *num = 0; + return NULL; +} /* Weak implementation of finalize gpio */ const struct pad_config *__weak variant_finalize_gpio_table(size_t *num) { diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h index 62479eb6cd..0ec473b284 100644 --- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/variants.h @@ -24,6 +24,9 @@ int variant_memory_sku(void); /* Return variant specific gpio pads to be configured during sleep */ const struct pad_config *variant_sleep_gpio_table(u8 slp_typ, size_t *num); +/* Return GPIO pads that need to be configured during romstage */ +const struct pad_config *variant_romstage_gpio_table(size_t *num); + /* Return GPIO pads that need to be configured before ramstage */ const struct pad_config *variant_early_gpio_table(size_t *num);