summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/brya/mainboard.c6
-rw-r--r--src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h1
-rw-r--r--src/mainboard/google/brya/variants/baseboard/nissa/Makefile.inc1
-rw-r--r--src/mainboard/google/brya/variants/baseboard/nissa/ramstage.c23
4 files changed, 30 insertions, 1 deletions
diff --git a/src/mainboard/google/brya/mainboard.c b/src/mainboard/google/brya/mainboard.c
index 3c5b2c39c9..7e933f359c 100644
--- a/src/mainboard/google/brya/mainboard.c
+++ b/src/mainboard/google/brya/mainboard.c
@@ -69,7 +69,7 @@ void __weak variant_init(void)
/* default implementation does nothing */
}
-static void mainboard_init(void *chip_info)
+void __weak variant_configure_pads(void)
{
const struct pad_config *base_pads;
const struct pad_config *override_pads;
@@ -78,7 +78,11 @@ static void mainboard_init(void *chip_info)
base_pads = variant_gpio_table(&base_num);
override_pads = variant_gpio_override_table(&override_num);
gpio_configure_pads_with_override(base_pads, base_num, override_pads, override_num);
+}
+static void mainboard_init(void *chip_info)
+{
+ variant_configure_pads();
variant_init();
variant_devtree_update();
}
diff --git a/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
index 42e76227b6..ce849d0521 100644
--- a/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/brya/variants/baseboard/include/baseboard/variants.h
@@ -23,6 +23,7 @@ int variant_memory_sku(void);
bool variant_is_half_populated(void);
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config);
void variant_fill_ssdt(const struct device *dev);
+void variant_configure_pads(void);
enum s0ix_entry {
S0IX_EXIT,
diff --git a/src/mainboard/google/brya/variants/baseboard/nissa/Makefile.inc b/src/mainboard/google/brya/variants/baseboard/nissa/Makefile.inc
index 1693d2e263..8a4b2acfaa 100644
--- a/src/mainboard/google/brya/variants/baseboard/nissa/Makefile.inc
+++ b/src/mainboard/google/brya/variants/baseboard/nissa/Makefile.inc
@@ -4,3 +4,4 @@ romstage-y += memory.c
romstage-y += gpio.c
ramstage-y += gpio.c
+ramstage-y += ramstage.c
diff --git a/src/mainboard/google/brya/variants/baseboard/nissa/ramstage.c b/src/mainboard/google/brya/variants/baseboard/nissa/ramstage.c
new file mode 100644
index 0000000000..7f4e291abc
--- /dev/null
+++ b/src/mainboard/google/brya/variants/baseboard/nissa/ramstage.c
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <gpio.h>
+#include <soc/gpio.h>
+#include <soc/ramstage.h>
+
+void variant_configure_pads(void)
+{
+ const struct pad_config *base_pads;
+ const struct pad_config *override_pads;
+ struct pad_config *padbased_table;
+ size_t base_num, override_num;
+
+ padbased_table = new_padbased_table();
+ base_pads = variant_gpio_table(&base_num);
+ gpio_padbased_override(padbased_table, base_pads, base_num);
+ override_pads = variant_gpio_override_table(&override_num);
+ gpio_padbased_override(padbased_table, override_pads, override_num);
+ gpio_configure_pads_with_padbased(padbased_table);
+ free(padbased_table);
+}