summaryrefslogtreecommitdiff
path: root/src/mainboard/google/rex/variants/baseboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/rex/variants/baseboard')
-rw-r--r--src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h8
-rw-r--r--src/mainboard/google/rex/variants/baseboard/rex/Makefile.inc5
-rw-r--r--src/mainboard/google/rex/variants/baseboard/rex/gpio.c34
3 files changed, 47 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h
index d16d3dad53..a2fc805287 100644
--- a/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/rex/variants/baseboard/include/baseboard/variants.h
@@ -6,4 +6,12 @@
#include <soc/gpio.h>
#include <stdint.h>
+/* The next set of functions return the gpio table and fill in the number of entries for
+ * each table.
+ */
+
+const struct pad_config *variant_gpio_table(size_t *num);
+const struct pad_config *variant_early_gpio_table(size_t *num);
+const struct pad_config *variant_romstage_gpio_table(size_t *num);
+
#endif /*__BASEBOARD_VARIANTS_H__ */
diff --git a/src/mainboard/google/rex/variants/baseboard/rex/Makefile.inc b/src/mainboard/google/rex/variants/baseboard/rex/Makefile.inc
new file mode 100644
index 0000000000..6c29346470
--- /dev/null
+++ b/src/mainboard/google/rex/variants/baseboard/rex/Makefile.inc
@@ -0,0 +1,5 @@
+bootblock-y += gpio.c
+
+romstage-y += gpio.c
+
+ramstage-y += gpio.c
diff --git a/src/mainboard/google/rex/variants/baseboard/rex/gpio.c b/src/mainboard/google/rex/variants/baseboard/rex/gpio.c
new file mode 100644
index 0000000000..d9c31666ae
--- /dev/null
+++ b/src/mainboard/google/rex/variants/baseboard/rex/gpio.c
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <soc/gpio.h>
+
+/* Pad configuration in ramstage */
+static const struct pad_config gpio_table[] = {
+ /* ToDo: Fill gpio configuration */
+};
+
+/* Early pad configuration in bootblock */
+static const struct pad_config early_gpio_table[] = {
+ /* ToDo: Fill early gpio configuration */
+};
+
+const struct pad_config *__weak variant_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(gpio_table);
+ return gpio_table;
+}
+
+const struct pad_config *__weak variant_early_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(early_gpio_table);
+ return early_gpio_table;
+}
+
+/* Create the stub for romstage gpio, typically use for power sequence */
+const struct pad_config *__weak variant_romstage_gpio_table(size_t *num)
+{
+ *num = 0;
+ return NULL;
+}