summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/variants/baseboard/trulo/Makefile.mk5
-rw-r--r--src/mainboard/google/brya/variants/orisa/Makefile.mk5
-rw-r--r--src/mainboard/google/brya/variants/orisa/gpio.c (renamed from src/mainboard/google/brya/variants/baseboard/trulo/gpio.c)17
-rw-r--r--src/mainboard/google/brya/variants/trulo/Makefile.mk5
-rw-r--r--src/mainboard/google/brya/variants/trulo/gpio.c51
5 files changed, 72 insertions, 11 deletions
diff --git a/src/mainboard/google/brya/variants/baseboard/trulo/Makefile.mk b/src/mainboard/google/brya/variants/baseboard/trulo/Makefile.mk
index 54a5c5b5c9..be05cd4e5c 100644
--- a/src/mainboard/google/brya/variants/baseboard/trulo/Makefile.mk
+++ b/src/mainboard/google/brya/variants/baseboard/trulo/Makefile.mk
@@ -1,8 +1,3 @@
## SPDX-License-Identifier: GPL-2.0-only
-bootblock-y += gpio.c
-
romstage-y += memory.c
-romstage-y += gpio.c
-
-ramstage-y += gpio.c
diff --git a/src/mainboard/google/brya/variants/orisa/Makefile.mk b/src/mainboard/google/brya/variants/orisa/Makefile.mk
new file mode 100644
index 0000000000..91f031e7a4
--- /dev/null
+++ b/src/mainboard/google/brya/variants/orisa/Makefile.mk
@@ -0,0 +1,5 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+bootblock-y += gpio.c
+romstage-y += gpio.c
+ramstage-y += gpio.c
diff --git a/src/mainboard/google/brya/variants/baseboard/trulo/gpio.c b/src/mainboard/google/brya/variants/orisa/gpio.c
index 410f194f65..beee6fcb29 100644
--- a/src/mainboard/google/brya/variants/baseboard/trulo/gpio.c
+++ b/src/mainboard/google/brya/variants/orisa/gpio.c
@@ -16,19 +16,24 @@ static const struct pad_config early_gpio_table[] = {
/* TODO */
};
-const struct pad_config *__weak variant_gpio_table(size_t *num)
+/* Fill romstage gpio configuration */
+static const struct pad_config romstage_gpio_table[] = {
+ /* TODO */
+};
+
+const struct pad_config *variant_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
}
-const struct pad_config *__weak variant_gpio_override_table(size_t *num)
+const struct pad_config *variant_gpio_override_table(size_t *num)
{
*num = 0;
return NULL;
}
-const struct pad_config *__weak variant_early_gpio_table(size_t *num)
+const struct pad_config *variant_early_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_gpio_table);
return early_gpio_table;
@@ -39,8 +44,8 @@ static const struct cros_gpio cros_gpios[] = {
};
DECLARE_CROS_GPIOS(cros_gpios);
-const struct pad_config *__weak variant_romstage_gpio_table(size_t *num)
+const struct pad_config *variant_romstage_gpio_table(size_t *num)
{
- *num = 0;
- return NULL;
+ *num = ARRAY_SIZE(romstage_gpio_table);
+ return romstage_gpio_table;
}
diff --git a/src/mainboard/google/brya/variants/trulo/Makefile.mk b/src/mainboard/google/brya/variants/trulo/Makefile.mk
new file mode 100644
index 0000000000..91f031e7a4
--- /dev/null
+++ b/src/mainboard/google/brya/variants/trulo/Makefile.mk
@@ -0,0 +1,5 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+bootblock-y += gpio.c
+romstage-y += gpio.c
+ramstage-y += gpio.c
diff --git a/src/mainboard/google/brya/variants/trulo/gpio.c b/src/mainboard/google/brya/variants/trulo/gpio.c
new file mode 100644
index 0000000000..beee6fcb29
--- /dev/null
+++ b/src/mainboard/google/brya/variants/trulo/gpio.c
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <soc/gpio.h>
+#include <types.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+/* Pad configuration in ramstage */
+static const struct pad_config gpio_table[] = {
+ /* TODO */
+};
+
+/* Early pad configuration in bootblock */
+static const struct pad_config early_gpio_table[] = {
+ /* TODO */
+};
+
+/* Fill romstage gpio configuration */
+static const struct pad_config romstage_gpio_table[] = {
+ /* TODO */
+};
+
+const struct pad_config *variant_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(gpio_table);
+ return gpio_table;
+}
+
+const struct pad_config *variant_gpio_override_table(size_t *num)
+{
+ *num = 0;
+ return NULL;
+}
+
+const struct pad_config *variant_early_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(early_gpio_table);
+ return early_gpio_table;
+}
+
+static const struct cros_gpio cros_gpios[] = {
+ /* TODO */
+};
+DECLARE_CROS_GPIOS(cros_gpios);
+
+const struct pad_config *variant_romstage_gpio_table(size_t *num)
+{
+ *num = ARRAY_SIZE(romstage_gpio_table);
+ return romstage_gpio_table;
+}