summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/rambi/romstage.c18
-rw-r--r--src/mainboard/google/rambi/spd/Makefile.inc4
2 files changed, 19 insertions, 3 deletions
diff --git a/src/mainboard/google/rambi/romstage.c b/src/mainboard/google/rambi/romstage.c
index 369ebad445..efe1343950 100644
--- a/src/mainboard/google/rambi/romstage.c
+++ b/src/mainboard/google/rambi/romstage.c
@@ -31,7 +31,12 @@
* 0b001 - 4GiB total - 2 x 2GiB Hynix H5TC4G63AFR-PBA 1600MHz
* 0b010 - 2GiB total - 2 x 1GiB Micron MT41K128M16JT-125:K 1600MHz
* 0b011 - 2GiB total - 2 x 1GiB Hynix H5TC2G63FFR-PBA 1600MHz
+ * 0b100 - 2GiB total - 1 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
+ * 0b101 - 2GiB total - 1 x 2GiB Hynix H5TC4G63AFR-PBA 1600MHz
*/
+static const uint32_t dual_channel_config =
+ (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
+
#define SPD_SIZE 256
#define GPIO_SSUS_37_PAD 57
#define GPIO_SSUS_38_PAD 50
@@ -43,7 +48,7 @@ static inline void disable_internal_pull(int pad)
write32(ssus_pconf0(pad), read32(ssus_pconf0(pad)) & pull_mask);
}
-static void *get_spd_pointer(char *spd_file_content, int total_spds)
+static void *get_spd_pointer(char *spd_file_content, int total_spds, int *dual)
{
int ram_id = 0;
@@ -63,6 +68,10 @@ static void *get_spd_pointer(char *spd_file_content, int total_spds)
if (ram_id >= total_spds)
return NULL;
+ /* Single channel configs */
+ if (dual_channel_config & (1 << ram_id))
+ *dual = 1;
+
return &spd_file_content[SPD_SIZE * ram_id];
}
@@ -70,6 +79,7 @@ void mainboard_romstage_entry(struct romstage_params *rp)
{
struct cbfs_file *spd_file;
void *spd_content;
+ int dual_channel = 0;
struct mrc_params mp = {
.mainboard = {
@@ -84,9 +94,11 @@ void mainboard_romstage_entry(struct romstage_params *rp)
/* Both channels are always present. */
spd_content = get_spd_pointer(CBFS_SUBHEADER(spd_file),
- ntohl(spd_file->len) / SPD_SIZE);
+ ntohl(spd_file->len) / SPD_SIZE,
+ &dual_channel);
mp.mainboard.dram_data[0] = spd_content;
- mp.mainboard.dram_data[1] = spd_content;
+ if (dual_channel)
+ mp.mainboard.dram_data[1] = spd_content;
rp->mrc_params = &mp;
romstage_common(rp);
diff --git a/src/mainboard/google/rambi/spd/Makefile.inc b/src/mainboard/google/rambi/spd/Makefile.inc
index 36f4b66823..fb0335fb5a 100644
--- a/src/mainboard/google/rambi/spd/Makefile.inc
+++ b/src/mainboard/google/rambi/spd/Makefile.inc
@@ -25,10 +25,14 @@ SPD_BIN = $(obj)/spd.bin
# 0b001 - 4GiB total - 2 x 2GiB Hynix H5TC4G63AFR-PBA 1600MHz
# 0b010 - 2GiB total - 2 x 1GiB Micron MT41K128M16JT-125:K 1600MHz
# 0b011 - 2GiB total - 2 x 1GiB Hynix H5TC2G63FFR-PBA 1600MHz
+# 0b100 - 2GiB total - 1 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
+# 0b101 - 2GiB total - 1 x 2GiB Hynix H5TC4G63AFR-PBA 1600MHz
SPD_SOURCES = micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += micron_1GiB_dimm_MT41K128M16JT-125
SPD_SOURCES += hynix_1GiB_dimm_H5TC2G63FFR-PBA
+SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
+SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)