summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/volteer/variants/elemi/Makefile.inc3
-rw-r--r--src/mainboard/google/volteer/variants/elemi/memory.c31
2 files changed, 34 insertions, 0 deletions
diff --git a/src/mainboard/google/volteer/variants/elemi/Makefile.inc b/src/mainboard/google/volteer/variants/elemi/Makefile.inc
new file mode 100644
index 0000000000..9064208bff
--- /dev/null
+++ b/src/mainboard/google/volteer/variants/elemi/Makefile.inc
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+romstage-y += memory.c
diff --git a/src/mainboard/google/volteer/variants/elemi/memory.c b/src/mainboard/google/volteer/variants/elemi/memory.c
new file mode 100644
index 0000000000..d3de4be711
--- /dev/null
+++ b/src/mainboard/google/volteer/variants/elemi/memory.c
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
+#include <gpio.h>
+
+/*This mb_ddr4_cfg structure is intentionally left empty so that fields are left nil. */
+static const struct mb_ddr4_cfg elemi_memcfg = {
+};
+
+static const struct ddr_memory_cfg baseboard_memcfg = {
+ .mem_type = MEMTYPE_DDR4,
+ .ddr4_cfg = &elemi_memcfg
+};
+
+const struct ddr_memory_cfg *variant_memory_params(void)
+{
+ return &baseboard_memcfg;
+}
+
+int variant_memory_sku(void)
+{
+ gpio_t spd_gpios[] = {
+ GPIO_MEM_CONFIG_3,
+ GPIO_MEM_CONFIG_2,
+ GPIO_MEM_CONFIG_1,
+ GPIO_MEM_CONFIG_0,
+ };
+
+ return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
+}