summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/poppy/romstage.c8
-rw-r--r--src/mainboard/google/poppy/variants/baseboard/Makefile.inc1
-rw-r--r--src/mainboard/google/poppy/variants/baseboard/gpio.c6
-rw-r--r--src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h6
4 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/poppy/romstage.c b/src/mainboard/google/poppy/romstage.c
index f49fbf423f..af4f70b4a3 100644
--- a/src/mainboard/google/poppy/romstage.c
+++ b/src/mainboard/google/poppy/romstage.c
@@ -17,8 +17,10 @@
#include <baseboard/variants.h>
#include <cbfs.h>
#include <console/console.h>
+#include <soc/gpio.h>
#include <soc/romstage.h>
#include <string.h>
+#include <variant/gpio.h>
#include <fsp/soc_binding.h>
@@ -147,6 +149,12 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
FSP_M_CONFIG *mem_cfg = &mupd->FspmConfig;
struct memory_params p;
+ const struct pad_config *pads;
+ size_t num;
+
+ pads = variant_romstage_gpio_table(&num);
+ gpio_configure_pads(pads, num);
+
memset(&p, 0, sizeof(p));
variant_memory_params(&p);
diff --git a/src/mainboard/google/poppy/variants/baseboard/Makefile.inc b/src/mainboard/google/poppy/variants/baseboard/Makefile.inc
index 1d25510dff..41669f2114 100644
--- a/src/mainboard/google/poppy/variants/baseboard/Makefile.inc
+++ b/src/mainboard/google/poppy/variants/baseboard/Makefile.inc
@@ -1,6 +1,7 @@
bootblock-y += gpio.c
romstage-y += memory.c
+romstage-y += gpio.c
ramstage-y += gpio.c
ramstage-y += nhlt.c
diff --git a/src/mainboard/google/poppy/variants/baseboard/gpio.c b/src/mainboard/google/poppy/variants/baseboard/gpio.c
index 25202e6139..c1b8e4ce55 100644
--- a/src/mainboard/google/poppy/variants/baseboard/gpio.c
+++ b/src/mainboard/google/poppy/variants/baseboard/gpio.c
@@ -403,3 +403,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;
+}
diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
index 7e850b6e78..391f809c16 100644
--- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h
@@ -27,6 +27,12 @@
const struct pad_config *variant_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
+/*
+ * Callback to get GPIOs to configure in romstage before memory training is
+ * performed.
+ */
+const struct pad_config *variant_romstage_gpio_table(size_t *num);
+
const struct cros_gpio *variant_cros_gpios(size_t *num);
/* Config gpio by different sku id */
const struct pad_config *variant_sku_gpio_table(size_t *num);