summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/octopus/variants/phaser/Makefile.inc2
-rw-r--r--src/mainboard/google/octopus/variants/phaser/memory.c22
2 files changed, 24 insertions, 0 deletions
diff --git a/src/mainboard/google/octopus/variants/phaser/Makefile.inc b/src/mainboard/google/octopus/variants/phaser/Makefile.inc
index 37270eb960..22ef41c3a2 100644
--- a/src/mainboard/google/octopus/variants/phaser/Makefile.inc
+++ b/src/mainboard/google/octopus/variants/phaser/Makefile.inc
@@ -1,5 +1,7 @@
bootblock-y += gpio.c
+romstage-y += memory.c
+
ramstage-y += variant.c
ramstage-y += gpio.c
ramstage-y += mainboard.c
diff --git a/src/mainboard/google/octopus/variants/phaser/memory.c b/src/mainboard/google/octopus/variants/phaser/memory.c
new file mode 100644
index 0000000000..f7c31cdc90
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/phaser/memory.c
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/variants.h>
+#include <boardid.h>
+#include <gpio.h>
+#include <variant/gpio.h>
+
+size_t variant_memory_sku(void)
+{
+ size_t rt;
+ gpio_t pads[] = {
+ [3] = MEM_CONFIG3, [2] = MEM_CONFIG2,
+ [1] = MEM_CONFIG1, [0] = MEM_CONFIG0,
+ };
+
+ rt = gpio_base2_value(pads, ARRAY_SIZE(pads));
+
+ if (board_id() == 7)
+ return (rt == 3) ? 1 : rt; // If RAM ID = 3, return 1
+ else
+ return rt;
+}