diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2018-08-01 18:59:50 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2018-08-19 00:19:54 +0000 |
commit | 532e8a9bf55b9963bc601757bcd0155798b1a3fe (patch) | |
tree | 66a4f2515dc0c5acaaeac0b7d4cde40e64649b1d /src | |
parent | 5d6593a43c728a9d526a3cb0026048bf335830d4 (diff) |
mb/lenovo/x1_carbon_gen1: add support for hynix memory
All different memory configuration should be supported by now.
Thanks to Igor Lee.
Change-Id: Ib93c0e3cbdc29cbf6cff26292df4fbbb8208082f
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Tested-by: Igor Lee <getrun@gmail.com>
Reviewed-on: https://review.coreboot.org/27781
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/lenovo/x1_carbon_gen1/romstage.c | 14 | ||||
-rw-r--r-- | src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc | 2 | ||||
-rw-r--r-- | src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex | 16 |
3 files changed, 26 insertions, 6 deletions
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c index c12c1fcabf..a34d1dba22 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/romstage.c +++ b/src/mainboard/lenovo/x1_carbon_gen1/romstage.c @@ -95,7 +95,13 @@ void mainboard_get_spd(spd_raw_data *spd, bool id_only) /* 4gb model = 0, 8gb model = 1 */ /* int extended_memory_version = get_gpio(44); */ - /* TODO: how do they differ? Guess only one slot is connected */ + + /* + * So far there is no need to parse gpio 44, as the 4GiB use + * the hynix or elpida memory and 8 GiB versions use samsung. + * All version use both channels. + * But we might miss some versions. + */ /* * GPIO45 GPIO25 @@ -105,10 +111,8 @@ void mainboard_get_spd(spd_raw_data *spd, bool id_only) * 1 1 reserved */ - /* We only support elpida and samsung. - Because the spd data is missing. */ - if (spd_index != 0 && spd_index != 2) - die("Unsupported Memory. Please add your SPD dump to coreboot."); + if (spd_index == 3) + die("Unsupported Memory. (detected 'reserved' memory configuration)."); memory = get_spd_data(spd_index); memcpy(&spd[0], memory, 256); diff --git a/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc b/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc index 0c908265ab..f5c233add0 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc @@ -16,7 +16,7 @@ SPD_BIN = $(obj)/spd.bin SPD_SOURCES = elpida.hex # 0b0000 Single Channel 2GB -SPD_SOURCES += samsung.hex # 0b0001 placeholder +SPD_SOURCES += hynix.hex # 0b0001 2GiB SPD_SOURCES += samsung.hex # 0b0010 4GiB SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f)) diff --git a/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex new file mode 100644 index 0000000000..111745ce2d --- /dev/null +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex @@ -0,0 +1,16 @@ +92 11 0b 03 04 00 00 02 03 52 01 08 0c 00 20 00 +6c 78 6c 3c 6c 11 20 81 28 08 3c 3c 01 68 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae ea +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |