diff options
author | Amanda Huang <amanda_hwang@compal.corp-partner.google.com> | 2019-09-11 19:59:36 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-09-18 12:55:27 +0000 |
commit | 05e8dd18b1768e5a6bf583ead18234ed8ebe4f84 (patch) | |
tree | c678a42818e822aaa320cd247ad13de793e6fdff /src/mainboard/google/drallion/variants | |
parent | 86f29118d37d0fa35ed5e20668336f852cd12550 (diff) |
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 <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35346
Reviewed-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-by: Mathew King <mathewk@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/drallion/variants')
-rw-r--r-- | src/mainboard/google/drallion/variants/drallion/Makefile.inc | 7 | ||||
-rw-r--r-- | src/mainboard/google/drallion/variants/drallion/memory.c | 10 |
2 files changed, 16 insertions, 1 deletions
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 <gpio.h> #include <variant/gpio.h> +/* 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))]; } |