From 7413815a01838d03718b8cfa16b4fff81bdb7f3b Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 21 Dec 2022 08:18:34 -0600 Subject: mb/google/volteer: 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: Ib3c2a0e849006b7bf70cbd0bf6f32aa01ccf1bc4 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/71180 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/mainboard/google/volteer/variants/baseboard/Makefile.inc | 1 + src/mainboard/google/volteer/variants/baseboard/gpio.c | 6 ++++++ .../google/volteer/variants/baseboard/include/baseboard/variants.h | 1 + 3 files changed, 8 insertions(+) (limited to 'src/mainboard/google/volteer/variants') diff --git a/src/mainboard/google/volteer/variants/baseboard/Makefile.inc b/src/mainboard/google/volteer/variants/baseboard/Makefile.inc index 4dd8eb6861..24d9f30d72 100644 --- a/src/mainboard/google/volteer/variants/baseboard/Makefile.inc +++ b/src/mainboard/google/volteer/variants/baseboard/Makefile.inc @@ -3,6 +3,7 @@ bootblock-y += gpio.c +romstage-y += gpio.c romstage-y += memory.c ramstage-y += gpio.c diff --git a/src/mainboard/google/volteer/variants/baseboard/gpio.c b/src/mainboard/google/volteer/variants/baseboard/gpio.c index 9784c8851a..f0d8b7c768 100644 --- a/src/mainboard/google/volteer/variants/baseboard/gpio.c +++ b/src/mainboard/google/volteer/variants/baseboard/gpio.c @@ -462,6 +462,12 @@ const struct pad_config *__weak variant_sleep_gpio_table(u8 slp_typ, return NULL; } +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_DEVICE_NAME), CROS_GPIO_WP_AH(GPIO_PCH_WP, CROS_GPIO_DEVICE_NAME), diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h index da5085ec1b..0751f26d65 100644 --- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h @@ -15,6 +15,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(u8 slp_typ, 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); const struct mb_cfg *variant_memory_params(void); int variant_memory_sku(void); -- cgit v1.2.3