From 05e8dd18b1768e5a6bf583ead18234ed8ebe4f84 Mon Sep 17 00:00:00 2001 From: Amanda Huang Date: Wed, 11 Sep 2019 19:59:36 +0800 Subject: mb/google/drallion: Add SPD files for drallion This change adds SPD files for Drallion. Use spd_index matrix to correspond mem_id. This can save the dummy spd index to reduce the size of SPD.bin. BUG=b:139397313 TEST=Compile successfully Change-Id: I2f7e75fdbca4183bcd730e40fef4bfe280ab900b Signed-off-by: Amanda Huang Reviewed-on: https://review.coreboot.org/c/coreboot/+/35346 Reviewed-by: John Su Reviewed-by: Mathew King Tested-by: build bot (Jenkins) --- src/mainboard/google/drallion/variants/drallion/Makefile.inc | 7 +++++++ src/mainboard/google/drallion/variants/drallion/memory.c | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/drallion/variants') diff --git a/src/mainboard/google/drallion/variants/drallion/Makefile.inc b/src/mainboard/google/drallion/variants/drallion/Makefile.inc index 8e070d26fb..942d00b696 100644 --- a/src/mainboard/google/drallion/variants/drallion/Makefile.inc +++ b/src/mainboard/google/drallion/variants/drallion/Makefile.inc @@ -15,6 +15,13 @@ ## GPP_F12-F16 indicates mem_id to match specific spd file SPD_SOURCES = empty_ddr4 # 0b00000 +SPD_SOURCES += micron_dimm_MT40A512M16LY-075E # 0b10100 +SPD_SOURCES += micron_dimm_MT40A512M16TB-062EJ # 0b11100 +SPD_SOURCES += micron_dimm_MT40A1G16KNR-075E # 0b10010 +SPD_SOURCES += hynix_dimm_H5AN8G6NCJR-VKC # 0b10001 +SPD_SOURCES += hynix_dimm_H5ANAG6NCMR-VKC # 0b11001 +SPD_SOURCES += samsung_dimm_K4A8G165WC-BCTD # 0b10011 +SPD_SOURCES += samsung_dimm_K4AAG165WB-MCTD # 0b11011 bootblock-y += gpio.c ramstage-y += gpio.c diff --git a/src/mainboard/google/drallion/variants/drallion/memory.c b/src/mainboard/google/drallion/variants/drallion/memory.c index e1755b4a85..c837805016 100644 --- a/src/mainboard/google/drallion/variants/drallion/memory.c +++ b/src/mainboard/google/drallion/variants/drallion/memory.c @@ -17,6 +17,14 @@ #include #include +/* Use spd_index array to save mem_id */ +static const int spd_index[32] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 3, 6, 1, 0, 0, 0, 0, + 5, 0, 7, 2, 0, 0, 0, 0 + }; + int variant_memory_sku(void) { gpio_t spd_gpios[] = { @@ -27,5 +35,5 @@ int variant_memory_sku(void) GPIO_MEM_CONFIG_4, }; - return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)); + return spd_index[gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios))]; } -- cgit v1.2.3