summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/auron/Kconfig1
-rw-r--r--src/mainboard/google/auron/variants/auron_paine/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/auron/variants/auron_yuna/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/auron/variants/gandof/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/auron/variants/lulu/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/auron/variants/samus/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/Kconfig1
-rw-r--r--src/mainboard/google/cyan/variants/banon/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/celes/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/cyan/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/edgar/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/kefka/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/reks/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/relm/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/setzer/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/terra/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/ultima/Makefile.inc16
-rw-r--r--src/mainboard/google/cyan/variants/wizpig/Makefile.inc16
-rw-r--r--src/mainboard/google/dedede/Kconfig1
-rw-r--r--src/mainboard/google/dedede/spd/Makefile.inc18
-rw-r--r--src/mainboard/google/drallion/Kconfig1
-rw-r--r--src/mainboard/google/drallion/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/eve/Kconfig1
-rw-r--r--src/mainboard/google/eve/spd/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/Kconfig1
-rw-r--r--src/mainboard/google/glados/variants/asuka/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/caroline/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/cave/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/chell/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/glados/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/lars/Makefile.inc16
-rw-r--r--src/mainboard/google/glados/variants/sentry/Makefile.inc17
-rw-r--r--src/mainboard/google/hatch/Kconfig1
-rw-r--r--src/mainboard/google/hatch/spd/Makefile.inc19
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/spd/Makefile.inc2
-rw-r--r--src/mainboard/google/kahlee/variants/careena/spd/Makefile.inc2
-rw-r--r--src/mainboard/google/kahlee/variants/nuwani/spd/Makefile.inc2
-rw-r--r--src/mainboard/google/kahlee/variants/treeya/spd/Makefile.inc2
-rw-r--r--src/mainboard/google/poppy/Kconfig1
-rw-r--r--src/mainboard/google/poppy/spd/Makefile.inc9
-rw-r--r--src/mainboard/google/rambi/Kconfig1
-rw-r--r--src/mainboard/google/rambi/variants/banjo/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/candy/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/clapper/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/enguarde/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/glimmer/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/gnawty/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/heli/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/kip/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/ninja/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/orco/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/quawks/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/rambi/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/squawks/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/sumo/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/swanky/Makefile.inc16
-rw-r--r--src/mainboard/google/rambi/variants/winky/Makefile.inc16
-rw-r--r--src/mainboard/google/slippy/Kconfig1
-rw-r--r--src/mainboard/google/slippy/variants/falco/Makefile.inc17
-rw-r--r--src/mainboard/google/slippy/variants/leon/Makefile.inc17
-rw-r--r--src/mainboard/google/slippy/variants/peppy/Makefile.inc17
-rw-r--r--src/mainboard/google/slippy/variants/wolf/Makefile.inc17
-rw-r--r--src/mainboard/google/volteer/Kconfig1
-rw-r--r--src/mainboard/google/volteer/spd/Makefile.inc15
64 files changed, 22 insertions, 783 deletions
diff --git a/src/mainboard/google/auron/Kconfig b/src/mainboard/google/auron/Kconfig
index c5e00fd148..54c8ea2656 100644
--- a/src/mainboard/google/auron/Kconfig
+++ b/src/mainboard/google/auron/Kconfig
@@ -15,6 +15,7 @@ config BOARD_GOOGLE_BASEBOARD_AURON
select MAINBOARD_HAS_TPM1
select INTEL_INT15
select SYSTEM_TYPE_LAPTOP if !BOARD_GOOGLE_BUDDY
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_AURON
diff --git a/src/mainboard/google/auron/variants/auron_paine/spd/Makefile.inc b/src/mainboard/google/auron/variants/auron_paine/spd/Makefile.inc
index a446268132..69f8fd8fae 100644
--- a/src/mainboard/google/auron/variants/auron_paine/spd/Makefile.inc
+++ b/src/mainboard/google/auron/variants/auron_paine/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
# { GPIO47, GPIO9, GPIO13 }
SPD_SOURCES = Micron_4KTF25664HZ # 0b0000
SPD_SOURCES += Hynix_HMT425S6AFR6A # 0b0001
@@ -22,16 +20,4 @@ SPD_SOURCES += empty # 0b1101
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += empty # 0b1111
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/auron/variants/auron_yuna/spd/Makefile.inc b/src/mainboard/google/auron/variants/auron_yuna/spd/Makefile.inc
index a446268132..69f8fd8fae 100644
--- a/src/mainboard/google/auron/variants/auron_yuna/spd/Makefile.inc
+++ b/src/mainboard/google/auron/variants/auron_yuna/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
# { GPIO47, GPIO9, GPIO13 }
SPD_SOURCES = Micron_4KTF25664HZ # 0b0000
SPD_SOURCES += Hynix_HMT425S6AFR6A # 0b0001
@@ -22,16 +20,4 @@ SPD_SOURCES += empty # 0b1101
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += empty # 0b1111
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/auron/variants/gandof/spd/Makefile.inc b/src/mainboard/google/auron/variants/gandof/spd/Makefile.inc
index a6a8232f48..18b1062bb5 100644
--- a/src/mainboard/google/auron/variants/gandof/spd/Makefile.inc
+++ b/src/mainboard/google/auron/variants/gandof/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
# { GPIO47, GPIO9, GPIO13 }
SPD_SOURCES = Samsung_M471B5674EB0-YK0 # 0b0000
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR # 0b0001
@@ -14,16 +12,4 @@ SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR # 0b0101
SPD_SOURCES += empty # 0b0110
SPD_SOURCES += empty # 0b0111
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd rom data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/auron/variants/lulu/spd/Makefile.inc b/src/mainboard/google/auron/variants/lulu/spd/Makefile.inc
index c136955d4c..e4ffcf8f6a 100644
--- a/src/mainboard/google/auron/variants/lulu/spd/Makefile.inc
+++ b/src/mainboard/google/auron/variants/lulu/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
# { GPIO47, GPIO9, GPIO13, GPIO8}
SPD_SOURCES = micron_2GiB_dimm_MT41K256M16HA-125 # 0b0000 2GB
SPD_SOURCES += empty # 0b0001
@@ -22,16 +20,4 @@ SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0 # 0b1101 4GB
SPD_SOURCES += samsung_4GiB_dimm_K4B8G1646Q-MYK0 # 0b1110 8GB
SPD_SOURCES += empty # 0b1111
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd rom data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/auron/variants/samus/spd/Makefile.inc b/src/mainboard/google/auron/variants/samus/spd/Makefile.inc
index aaf9b36b3a..cc1542fce2 100644
--- a/src/mainboard/google/auron/variants/samus/spd/Makefile.inc
+++ b/src/mainboard/google/auron/variants/samus/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
# { GPIO65, GPIO67, GPIO68, GPIO69 }
SPD_SOURCES = empty # 0b0000
SPD_SOURCES += empty # 0b0001
@@ -22,16 +20,4 @@ SPD_SOURCES += hynix_16 # 0b1101
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += elpida_16 # 0b1111
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig
index a3db6d78d8..a43e473f53 100644
--- a/src/mainboard/google/cyan/Kconfig
+++ b/src/mainboard/google/cyan/Kconfig
@@ -17,6 +17,7 @@ config BOARD_GOOGLE_BASEBOARD_CYAN
select PCIEXP_L1_SUB_STATE if !BOARD_GOOGLE_CYAN
select SYSTEM_TYPE_LAPTOP
select USE_GOOGLE_FSP
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_CYAN
diff --git a/src/mainboard/google/cyan/variants/banon/Makefile.inc b/src/mainboard/google/cyan/variants/banon/Makefile.inc
index 5e3cf38f90..8a9cee84db 100644
--- a/src/mainboard/google/cyan/variants/banon/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/banon/Makefile.inc
@@ -5,8 +5,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4E8E304EE-EGCF
SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += empty
@@ -14,17 +12,3 @@ SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_2GiB_dimm_MT52L256M32D1PF
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
SPD_SOURCES += nanya_dimm_NT6CL256T32CM-H1
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/celes/Makefile.inc b/src/mainboard/google/cyan/variants/celes/Makefile.inc
index 11f918b79a..2f21fd93d5 100644
--- a/src/mainboard/google/cyan/variants/celes/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/celes/Makefile.inc
@@ -5,21 +5,5 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCE # Index0
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # Index1
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/cyan/Makefile.inc b/src/mainboard/google/cyan/variants/cyan/Makefile.inc
index a1521d4234..a5e9dbab3d 100644
--- a/src/mainboard/google/cyan/variants/cyan/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/cyan/Makefile.inc
@@ -4,8 +4,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += hynix_2GiB_dimm_HMT425S6CFR6A_H5TC4G63CFR
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
@@ -14,17 +12,3 @@ SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646E-BYK0
SPD_SOURCES += micron_2GiB_dimm_MT41K256M16TW-107
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646E-BYK0
SPD_SOURCES += micron_2GiB_dimm_MT41K256M16TW-107
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/edgar/Makefile.inc b/src/mainboard/google/cyan/variants/edgar/Makefile.inc
index b3651eac90..91c0d97a40 100644
--- a/src/mainboard/google/cyan/variants/edgar/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/edgar/Makefile.inc
@@ -5,8 +5,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCE
SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR-NUD
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCE
@@ -19,17 +17,3 @@ SPD_SOURCES += nanya_dimm_NT6CL256T32CM-H1
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
SPD_SOURCES += nanya_dimm_NT6CL256T32CM-H1
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/kefka/Makefile.inc b/src/mainboard/google/cyan/variants/kefka/Makefile.inc
index ff707b4dee..14db7537eb 100644
--- a/src/mainboard/google/cyan/variants/kefka/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/kefka/Makefile.inc
@@ -6,8 +6,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_dimm_MT52L256M32D1PF-107
@@ -16,17 +14,3 @@ SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/reks/Makefile.inc b/src/mainboard/google/cyan/variants/reks/Makefile.inc
index b45a2b229e..8b4a77645b 100644
--- a/src/mainboard/google/cyan/variants/reks/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/reks/Makefile.inc
@@ -6,24 +6,8 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4E8E304EE-EGCF
SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_2GiB_dimm_MT52L256M32D1PF
SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += micron_2GiB_dimm_EDF8132A3MA-JD-F
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/relm/Makefile.inc b/src/mainboard/google/cyan/variants/relm/Makefile.inc
index 3de47937e6..47e32bb32b 100644
--- a/src/mainboard/google/cyan/variants/relm/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/relm/Makefile.inc
@@ -6,8 +6,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4E8E304EE-EGCF
SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_2GiB_dimm_MT52L256M32D1PF
@@ -15,17 +13,3 @@ SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += micron_2GiB_dimm_EDF8132A3MA-JD-F
SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/setzer/Makefile.inc b/src/mainboard/google/cyan/variants/setzer/Makefile.inc
index d99926b203..1735907d8e 100644
--- a/src/mainboard/google/cyan/variants/setzer/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/setzer/Makefile.inc
@@ -6,8 +6,6 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCF
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF
SPD_SOURCES += hynix_dimm_H9CCNNN8GTMLAR-NUD
@@ -18,17 +16,3 @@ SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR-NUD
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/terra/Makefile.inc b/src/mainboard/google/cyan/variants/terra/Makefile.inc
index af07a93bc7..6358081d66 100644
--- a/src/mainboard/google/cyan/variants/terra/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/terra/Makefile.inc
@@ -6,23 +6,7 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCE
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF
SPD_SOURCES += micron_2GiB_dimm_EDF8132A3MA-GD-F-R
SPD_SOURCES += micron_2GiB_dimm_MT52L256M32D1PF-107WT
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/ultima/Makefile.inc b/src/mainboard/google/cyan/variants/ultima/Makefile.inc
index 10500c43c2..7cb457ef6c 100644
--- a/src/mainboard/google/cyan/variants/ultima/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/ultima/Makefile.inc
@@ -5,23 +5,7 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
ramstage-y += ramstage.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4E8E304EE-EGCF
SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_2GiB_dimm_EDF8132A3MA-JD-F
SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/cyan/variants/wizpig/Makefile.inc b/src/mainboard/google/cyan/variants/wizpig/Makefile.inc
index aa1621addb..b6ff0d058f 100644
--- a/src/mainboard/google/cyan/variants/wizpig/Makefile.inc
+++ b/src/mainboard/google/cyan/variants/wizpig/Makefile.inc
@@ -4,24 +4,8 @@ romstage-y += spd_util.c
ramstage-y += gpio.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = samsung_2GiB_dimm_K4E8E304EE-EGCE
SPD_SOURCES += hynix_2GiB_dimm_H9CCNNN8GTMLAR-NUD
SPD_SOURCES += micron_2GiB_dimm_EDF8132A3MA-JD-F
SPD_SOURCES += samsung_2GiB_dimm_K4E8E324EB-EGCF
SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR-NUD
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index dd1125e264..2bb255f1b1 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -21,6 +21,7 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
select SOC_INTEL_JASPERLAKE
select SOC_INTEL_COMMON_BLOCK_DTT
select SOC_INTEL_CSE_LITE_SKU
+ select GENERIC_SPD_BIN if !BOARD_GOOGLE_DEDEDE
if BOARD_GOOGLE_BASEBOARD_DEDEDE
diff --git a/src/mainboard/google/dedede/spd/Makefile.inc b/src/mainboard/google/dedede/spd/Makefile.inc
index bcfe06d79e..f73a3e438f 100644
--- a/src/mainboard/google/dedede/spd/Makefile.inc
+++ b/src/mainboard/google/dedede/spd/Makefile.inc
@@ -1,19 +1,3 @@
## SPDX-License-Identifier: GPL-2.0-or-later
-ifneq ($(SPD_SOURCES),)
-SPD_BIN = $(obj)/spd.bin
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/soc/intel/jasperlake/spd/$(f))
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
-endif
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/soc/intel/jasperlake/spd/lp4x/$(f))
diff --git a/src/mainboard/google/drallion/Kconfig b/src/mainboard/google/drallion/Kconfig
index ae10b7817d..3ec7a4f68f 100644
--- a/src/mainboard/google/drallion/Kconfig
+++ b/src/mainboard/google/drallion/Kconfig
@@ -22,6 +22,7 @@ config BOARD_GOOGLE_BASEBOARD_DRALLION
select SYSTEM_TYPE_LAPTOP
select TPM2
select MAINBOARD_USES_IFD_EC_REGION
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_DRALLION
diff --git a/src/mainboard/google/drallion/spd/Makefile.inc b/src/mainboard/google/drallion/spd/Makefile.inc
index 99aea9c827..125413a1f3 100644
--- a/src/mainboard/google/drallion/spd/Makefile.inc
+++ b/src/mainboard/google/drallion/spd/Makefile.inc
@@ -1,21 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
ifeq ($(SPD_SOURCES),)
SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
-else
- SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
endif
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/eve/Kconfig b/src/mainboard/google/eve/Kconfig
index dcc5b383ba..c2fd9823f6 100644
--- a/src/mainboard/google/eve/Kconfig
+++ b/src/mainboard/google/eve/Kconfig
@@ -22,6 +22,7 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_HAS_TPM2
select SOC_INTEL_KABYLAKE
select SYSTEM_TYPE_CONVERTIBLE
+ select GENERIC_SPD_BIN
config VBOOT
select EC_GOOGLE_CHROMEEC_SWITCHES
diff --git a/src/mainboard/google/eve/spd/Makefile.inc b/src/mainboard/google/eve/spd/Makefile.inc
index 767281504d..8c4f005465 100644
--- a/src/mainboard/google/eve/spd/Makefile.inc
+++ b/src/mainboard/google/eve/spd/Makefile.inc
@@ -2,8 +2,6 @@
romstage-y += spd.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = empty # 0b0000
SPD_SOURCES += samsung_dimm_K4E8E324EB # 0b0001
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR # 0b0010
@@ -11,17 +9,3 @@ SPD_SOURCES += samsung_dimm_K4E6E304EB # 0b0011
SPD_SOURCES += hynix_dimm_H9CCNNNBJTALAR # 0b0100
SPD_SOURCES += samsung_dimm_K4EBE304EB # 0b0101
SPD_SOURCES += hynix_dimm_H9CCNNNCLTMLAR # 0b0110
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/Kconfig b/src/mainboard/google/glados/Kconfig
index 9790552229..af899cfbbc 100644
--- a/src/mainboard/google/glados/Kconfig
+++ b/src/mainboard/google/glados/Kconfig
@@ -21,6 +21,7 @@ config BOARD_GOOGLE_BASEBOARD_GLADOS
select SYSTEM_TYPE_LAPTOP
select MAINBOARD_HAS_LIBGFXINIT
select MAINBOARD_NO_FSP_GOP if !BOARD_GOOGLE_GLADOS
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_GLADOS
diff --git a/src/mainboard/google/glados/variants/asuka/Makefile.inc b/src/mainboard/google/glados/variants/asuka/Makefile.inc
index ee3447823f..d1b4d16ba0 100644
--- a/src/mainboard/google/glados/variants/asuka/Makefile.inc
+++ b/src/mainboard/google/glados/variants/asuka/Makefile.inc
@@ -3,25 +3,9 @@
romstage-y += variant.c
ramstage-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = hynix_dimm_H9CCNNN8GTMLAR-NUD # 0b0000 Single Channel 2GB
SPD_SOURCES += hynix_dimm_H9CCNNN8GTMLAR-NUD # 0b0001 Dual Channel 4GB
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # 0b0010 Single Channel 2GB
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # 0b0011 Dual Channel 4GB
SPD_SOURCES += micron_dimm_MT52L256M32D1PF-107-1G-1866 # 0b0100 Single Channel 2GB
SPD_SOURCES += micron_dimm_MT52L256M32D1PF-107-1G-1866 # 0b0101 Dual Channel 4GB
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/caroline/Makefile.inc b/src/mainboard/google/glados/variants/caroline/Makefile.inc
index a2545fcf08..6a942ee456 100644
--- a/src/mainboard/google/glados/variants/caroline/Makefile.inc
+++ b/src/mainboard/google/glados/variants/caroline/Makefile.inc
@@ -4,23 +4,7 @@ romstage-y += variant.c
ramstage-y += variant.c
smm-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
# SPD data by index
SPD_SOURCES = samsung_dimm_K4E8E324EB-EGCF # 0b0000
SPD_SOURCES += samsung_dimm_K4E6E304EB-EGCF # 0b0001
SPD_SOURCES += samsung_dimm_K4EBE304EB-EGCG # 0b0010
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/cave/Makefile.inc b/src/mainboard/google/glados/variants/cave/Makefile.inc
index 2f19b3fbd2..88e450ed6f 100644
--- a/src/mainboard/google/glados/variants/cave/Makefile.inc
+++ b/src/mainboard/google/glados/variants/cave/Makefile.inc
@@ -4,8 +4,6 @@ romstage-y += variant.c
ramstage-y += variant.c
smm-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
# SPD data by index. No method for board identification yet
SPD_SOURCES = micron_4GiB_dimm_MT52L256M32D1PF # 0b0000
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # 0b0001
@@ -13,17 +11,3 @@ SPD_SOURCES += micron_8GiB_dimm_MT52L512M32D2PF # 0b0010
SPD_SOURCES += samsung_dimm_K4E6E304EB-EGCF # 0b0011
SPD_SOURCES += micron_16GiB_dimm_MT52L1G32D4PG # 0b0100
SPD_SOURCES += hynix_dimm_H9CCNNNCLTMLAR # 0b0101
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/chell/Makefile.inc b/src/mainboard/google/glados/variants/chell/Makefile.inc
index b820684b7c..53861e9839 100644
--- a/src/mainboard/google/glados/variants/chell/Makefile.inc
+++ b/src/mainboard/google/glados/variants/chell/Makefile.inc
@@ -4,8 +4,6 @@ romstage-y += variant.c
ramstage-y += variant.c
smm-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
# SPD data by index. No method for board identification yet
SPD_SOURCES = samsung_dimm_K4E8E304EE-EGCF # 0b0000
SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF # 0b0001
@@ -18,17 +16,3 @@ SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF # 0b0111
SPD_SOURCES += hynix_dimm_H9CCNNNBJTALAR # 0b1000
SPD_SOURCES += hynix_dimm_H9CCNNNCLGALAR # 0b1001
SPD_SOURCES += hynix_dimm_H9CCNNN8GTALAR # 0b1010
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/glados/Makefile.inc b/src/mainboard/google/glados/variants/glados/Makefile.inc
index 3cf91e8f03..8858453cfc 100644
--- a/src/mainboard/google/glados/variants/glados/Makefile.inc
+++ b/src/mainboard/google/glados/variants/glados/Makefile.inc
@@ -4,24 +4,8 @@ romstage-y += variant.c
ramstage-y += variant.c
smm-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
# SPD data by index. No method for board identification yet
SPD_SOURCES = empty # 0b0000
SPD_SOURCES += samsung_dimm_K4E6E304EE-EGCF # 0b0001
SPD_SOURCES += hynix_dimm_H9CCNNN8JTBLAR # 0b0010
SPD_SOURCES += hynix_dimm_H9CCNNNBLTALAR # 0b0011
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/lars/Makefile.inc b/src/mainboard/google/glados/variants/lars/Makefile.inc
index e7ab2511f2..f295a360c2 100644
--- a/src/mainboard/google/glados/variants/lars/Makefile.inc
+++ b/src/mainboard/google/glados/variants/lars/Makefile.inc
@@ -3,8 +3,6 @@
romstage-y += variant.c
ramstage-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = hynix_dimm_H9CCNNN8JTBLAR-NUD-1G-1866 # 0b0000 Single Channel 2GB
SPD_SOURCES += hynix_dimm_H9CCNNNBLTBLAR-NUD-2G-1866 # 0b0001 Dual Channel 8GB
SPD_SOURCES += samsung_dimm_K4E8E324EB-EGCF-1G-1866 # 0b0010 Dual Channel 4GB
@@ -21,17 +19,3 @@ SPD_SOURCES += samsung_dimm_K4E6E304EB-EGCF-2G-1866 # 0b1100 Single Channel
SPD_SOURCES += hynix_dimm_H9CCNNNBJTALAR # 0b1101 Dual Channel 8GB
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += empty # 0b1111
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/glados/variants/sentry/Makefile.inc b/src/mainboard/google/glados/variants/sentry/Makefile.inc
index 019820a4b2..4de16c951a 100644
--- a/src/mainboard/google/glados/variants/sentry/Makefile.inc
+++ b/src/mainboard/google/glados/variants/sentry/Makefile.inc
@@ -3,8 +3,6 @@
romstage-y += variant.c
ramstage-y += variant.c
-SPD_BIN = $(obj)/spd.bin
-
SPD_SOURCES = hynix_dimm_H9CCNNN8GTMLAR-NUD # 0b0000 Dual Channel 4GB
SPD_SOURCES += micron_dimm_MT52L256M32D1PF-107-1G-1866 # 0b0001 Dual Channel 4GB
SPD_SOURCES += samsung_dimm_K4E8E304EE-EGCF # 0b0010 Dual Channel 4GB
@@ -21,18 +19,3 @@ SPD_SOURCES += empty # 0b1100
SPD_SOURCES += empty # 0b1101
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += empty # 0b1111
-
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 690acd1b80..952cd2d0f2 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -81,6 +81,7 @@ config DIMM_SPD_SIZE
config ROMSTAGE_SPD_CBFS
bool
default y if !ROMSTAGE_SPD_SMBUS
+ select GENERIC_SPD_BIN
config ROMSTAGE_SPD_SMBUS
bool
diff --git a/src/mainboard/google/hatch/spd/Makefile.inc b/src/mainboard/google/hatch/spd/Makefile.inc
deleted file mode 100644
index dc1c9978a0..0000000000
--- a/src/mainboard/google/hatch/spd/Makefile.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-## SPDX-License-Identifier: GPL-2.0-only
-
-ifneq ($(SPD_SOURCES),)
-SPD_BIN = $(obj)/spd.bin
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
-endif
diff --git a/src/mainboard/google/kahlee/variants/baseboard/spd/Makefile.inc b/src/mainboard/google/kahlee/variants/baseboard/spd/Makefile.inc
index 482fdec085..1ec3342891 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/spd/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/baseboard/spd/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
SPD_SOURCES = hynix-H5AN8G6NAFR-UH # 0b0000
SPD_SOURCES += hynix-H5ANAG6NAMR-UH # 0b0001
SPD_SOURCES += micron-MT40A512M16JY-083E-B # 0b0010
diff --git a/src/mainboard/google/kahlee/variants/careena/spd/Makefile.inc b/src/mainboard/google/kahlee/variants/careena/spd/Makefile.inc
index ca459d270a..4c1da68f3d 100644
--- a/src/mainboard/google/kahlee/variants/careena/spd/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/careena/spd/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
SPD_SOURCES = hynix-H5AN8G6NAFR-UH # 0b0000
SPD_SOURCES += hynix-H5ANAG6NAMR-UH # 0b0001
SPD_SOURCES += micron-MT40A512M16JY-083E-B # 0b0010
diff --git a/src/mainboard/google/kahlee/variants/nuwani/spd/Makefile.inc b/src/mainboard/google/kahlee/variants/nuwani/spd/Makefile.inc
index 2d3cd88581..e72c9e6d7a 100644
--- a/src/mainboard/google/kahlee/variants/nuwani/spd/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/nuwani/spd/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
SPD_SOURCES = hynix-H5AN8G6NAFR-UH # 0b0000
SPD_SOURCES += hynix-H5ANAG6NAMR-UH # 0b0001
SPD_SOURCES += micron-MT40A512M16JY-083E-B # 0b0010
diff --git a/src/mainboard/google/kahlee/variants/treeya/spd/Makefile.inc b/src/mainboard/google/kahlee/variants/treeya/spd/Makefile.inc
index 2d3cd88581..e72c9e6d7a 100644
--- a/src/mainboard/google/kahlee/variants/treeya/spd/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/treeya/spd/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
SPD_SOURCES = hynix-H5AN8G6NAFR-UH # 0b0000
SPD_SOURCES += hynix-H5ANAG6NAMR-UH # 0b0001
SPD_SOURCES += micron-MT40A512M16JY-083E-B # 0b0010
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index 74b4da6fbc..ccd03cc844 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -15,6 +15,7 @@ config BOARD_GOOGLE_BASEBOARD_POPPY
select MAINBOARD_HAS_CHROMEOS
select SOC_INTEL_KABYLAKE
select MAINBOARD_HAS_TPM2
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_POPPY
diff --git a/src/mainboard/google/poppy/spd/Makefile.inc b/src/mainboard/google/poppy/spd/Makefile.inc
index dd57835739..997352cd0c 100644
--- a/src/mainboard/google/poppy/spd/Makefile.inc
+++ b/src/mainboard/google/poppy/spd/Makefile.inc
@@ -1,5 +1,4 @@
-SPD_BIN = $(obj)/spd.bin
SEC_SPD_BIN = $(obj)/sec-spd.bin
define gen_spd_bin
@@ -17,16 +16,8 @@ add_spd_to_cbfs= \
ifeq ($(SPD_SOURCES),)
SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
-else
- SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
endif
-# Include SPD ROM data
-$(SPD_BIN): $(SPD_DEPS)
- $(call gen_spd_bin, $@, $+)
-
-$(call add_spd_to_cbfs, spd.bin, $(SPD_BIN))
-
# Add optional secondary SPD ROM data if present
ifneq ($(SEC_SPD_SOURCES),)
diff --git a/src/mainboard/google/rambi/Kconfig b/src/mainboard/google/rambi/Kconfig
index aa1c977f2a..22979e377b 100644
--- a/src/mainboard/google/rambi/Kconfig
+++ b/src/mainboard/google/rambi/Kconfig
@@ -14,6 +14,7 @@ config BOARD_GOOGLE_BASEBOARD_RAMBI
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM1
select SYSTEM_TYPE_LAPTOP if !BOARD_GOOGLE_NINJA && !BOARD_GOOGLE_SUMO
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_RAMBI
diff --git a/src/mainboard/google/rambi/variants/banjo/Makefile.inc b/src/mainboard/google/rambi/variants/banjo/Makefile.inc
index 1d6619bf8f..6711c2e760 100644
--- a/src/mainboard/google/rambi/variants/banjo/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/banjo/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 2GiB total - 1 x 2GiB Samsung K4B4G1646Q-HYK0 1600MHz
@@ -16,17 +14,3 @@ SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/candy/Makefile.inc b/src/mainboard/google/rambi/variants/candy/Makefile.inc
index 4630519b4e..4e8c9017ef 100644
--- a/src/mainboard/google/rambi/variants/candy/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/candy/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b0000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -29,17 +27,3 @@ SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646E-BYK0
SPD_SOURCES += micron_2GiB_dimm_MT41K256M16TW-107
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/clapper/Makefile.inc b/src/mainboard/google/rambi/variants/clapper/Makefile.inc
index 2a641ba881..91d23af976 100644
--- a/src/mainboard/google/rambi/variants/clapper/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/clapper/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/enguarde/Makefile.inc b/src/mainboard/google/rambi/variants/enguarde/Makefile.inc
index 5b7d58b8e3..57f72800a5 100644
--- a/src/mainboard/google/rambi/variants/enguarde/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/enguarde/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += samsung_1GiB_dimm_K4B2G1646Q-BYK0
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd rom data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/glimmer/Makefile.inc b/src/mainboard/google/rambi/variants/glimmer/Makefile.inc
index da99edce4c..c54f901f49 100644
--- a/src/mainboard/google/rambi/variants/glimmer/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/glimmer/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b0000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -26,17 +24,3 @@ SPD_SOURCES += elpida_2GiB_dimm_EDJ4216EFBG-GNL-F
SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += elpida_2GiB_dimm_EDJ4216EFBG-GNL-F
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd rom data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/gnawty/Makefile.inc b/src/mainboard/google/rambi/variants/gnawty/Makefile.inc
index eb87d0c619..f17db16e68 100644
--- a/src/mainboard/google/rambi/variants/gnawty/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/gnawty/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Samsung K4B4G1646Q-HYK0 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63MFR-PBA
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/heli/Makefile.inc b/src/mainboard/google/rambi/variants/heli/Makefile.inc
index 8a9adf3d81..eacc7b5a09 100644
--- a/src/mainboard/google/rambi/variants/heli/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/heli/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# RAM_ID Vendor Vendor_PN Freq Size Total_size channel
@@ -26,17 +24,3 @@ SPD_SOURCES += empty # 0b1100
SPD_SOURCES += empty # 0b1101
SPD_SOURCES += empty # 0b1110
SPD_SOURCES += empty # 0b1111
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/kip/Makefile.inc b/src/mainboard/google/rambi/variants/kip/Makefile.inc
index bf95c739e8..d9c872ab56 100644
--- a/src/mainboard/google/rambi/variants/kip/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/kip/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125a
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += elpida_2GiB_dimm_EDJ4216EFBG-GNL-F
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/ninja/Makefile.inc b/src/mainboard/google/rambi/variants/ninja/Makefile.inc
index 723a5e592d..739eb7ea7a 100644
--- a/src/mainboard/google/rambi/variants/ninja/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/ninja/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/orco/Makefile.inc b/src/mainboard/google/rambi/variants/orco/Makefile.inc
index 2c2496ebc9..0412c537c5 100644
--- a/src/mainboard/google/rambi/variants/orco/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/orco/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/quawks/Makefile.inc b/src/mainboard/google/rambi/variants/quawks/Makefile.inc
index 2c0127cbef..d729475686 100644
--- a/src/mainboard/google/rambi/variants/quawks/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/quawks/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Elpida EDJ4216EFBG-GNL-F 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += elpida_2GiB_dimm_EDJ4216EFBG-GNL-F
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/rambi/Makefile.inc b/src/mainboard/google/rambi/variants/rambi/Makefile.inc
index 5bddd5c15a..012206eb18 100644
--- a/src/mainboard/google/rambi/variants/rambi/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/rambi/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -16,17 +14,3 @@ 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)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/squawks/Makefile.inc b/src/mainboard/google/rambi/variants/squawks/Makefile.inc
index 2c0127cbef..d729475686 100644
--- a/src/mainboard/google/rambi/variants/squawks/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/squawks/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Elpida EDJ4216EFBG-GNL-F 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += elpida_2GiB_dimm_EDJ4216EFBG-GNL-F
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += Hynix_HMT425S6CFR6A_H5TC4G63CFR
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/sumo/Makefile.inc b/src/mainboard/google/rambi/variants/sumo/Makefile.inc
index 723a5e592d..739eb7ea7a 100644
--- a/src/mainboard/google/rambi/variants/sumo/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/sumo/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GiB Micron MT41K256M16HA-125:E 1600MHz
@@ -20,17 +18,3 @@ SPD_SOURCES += micron_2GiB_dimm_MT41K256M16HA-125
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63CFR-PBA
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/swanky/Makefile.inc b/src/mainboard/google/rambi/variants/swanky/Makefile.inc
index 7269afd299..94702622ce 100644
--- a/src/mainboard/google/rambi/variants/swanky/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/swanky/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 2GiB total - 1 x 2GiB Samsung K4B4G1646Q-HYK0 1600MHz
@@ -12,17 +10,3 @@ SPD_SOURCES = samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
SPD_SOURCES += samsung_2GiB_dimm_K4B4G1646Q-HYK0
SPD_SOURCES += hynix_2GiB_dimm_H5TC4G63AFR-PBA
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/rambi/variants/winky/Makefile.inc b/src/mainboard/google/rambi/variants/winky/Makefile.inc
index 105684f7eb..27b8a6a42a 100644
--- a/src/mainboard/google/rambi/variants/winky/Makefile.inc
+++ b/src/mainboard/google/rambi/variants/winky/Makefile.inc
@@ -1,7 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-SPD_BIN = $(obj)/spd.bin
-
# Order matters for SPD sources. The following indices
# define the SPD data to use.
# 0b000 - 4GiB total - 2 x 2GB - micron HTTC4G63CFR-PBA_x16_4Gb
@@ -16,17 +14,3 @@ SPD_SOURCES += micron_1GiB_dimm_MT41K128M16JT-125
SPD_SOURCES += hynix_1GiB_dimm_H5TC2G63FFR-PBA
SPD_SOURCES += HT_micron_HTTC4G63CFR-PBA_x16_4Gb
SPD_SOURCES += Samsung_2Gib_K4B4G1646Q-HYK0
-
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
diff --git a/src/mainboard/google/slippy/Kconfig b/src/mainboard/google/slippy/Kconfig
index 931d3ce55f..5a16d23ca8 100644
--- a/src/mainboard/google/slippy/Kconfig
+++ b/src/mainboard/google/slippy/Kconfig
@@ -17,6 +17,7 @@ config BOARD_GOOGLE_BASEBOARD_SLIPPY
select MAINBOARD_HAS_LIBGFXINIT
select INTEL_GMA_HAVE_VBT
select DRIVERS_I2C_RTD2132 if BOARD_GOOGLE_LEON
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_SLIPPY
diff --git a/src/mainboard/google/slippy/variants/falco/Makefile.inc b/src/mainboard/google/slippy/variants/falco/Makefile.inc
index 6d1ee81ec7..d8d748b726 100644
--- a/src/mainboard/google/slippy/variants/falco/Makefile.inc
+++ b/src/mainboard/google/slippy/variants/falco/Makefile.inc
@@ -1,8 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-## DIMM SPD for on-board memory
-SPD_BIN = $(obj)/spd.bin
-
# Order of names in SPD_SOURCES is important!
SPD_SOURCES = Micron_4KTF25664HZ # 4GB / CH0 + CH1 (RAM_ID=000)
SPD_SOURCES += Hynix_HMT425S6AFR6A # 4GB / CH0 + CH1 (RAM_ID=001)
@@ -13,16 +10,4 @@ SPD_SOURCES += Elpida_EDJ4216EFBG # 2GB / CH0 only (RAM_ID=101)
SPD_SOURCES += Samsung_M471B5674QH0 # 4GB / CH0 + CH1 (RAM_ID=110)
SPD_SOURCES += Samsung_M471B5674QH0 # 2GB / CH0 only (RAM_ID=111)
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/slippy/variants/leon/Makefile.inc b/src/mainboard/google/slippy/variants/leon/Makefile.inc
index 3dab895e9c..213dadb006 100644
--- a/src/mainboard/google/slippy/variants/leon/Makefile.inc
+++ b/src/mainboard/google/slippy/variants/leon/Makefile.inc
@@ -1,8 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-## DIMM SPD for on-board memory
-SPD_BIN = $(obj)/spd.bin
-
# Order of names in SPD_SOURCES is important!
SPD_SOURCES = Micron_4KTF25664HZ # 0: 4GB / CH0 + CH1
SPD_SOURCES += Hynix_HMT425S6AFR6A # 1: 4GB / CH0 + CH1
@@ -12,16 +9,4 @@ SPD_SOURCES += Micron_4KTF25664HZ # 4: space holder
SPD_SOURCES += Hynix_HMT425S6AFR6A # 5: 2GB / CH0
SPD_SOURCES += Samsung_K4B4G1646Q # 6: 2GB / CH0
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/slippy/variants/peppy/Makefile.inc b/src/mainboard/google/slippy/variants/peppy/Makefile.inc
index c19326e0c5..f8c5b0d88f 100644
--- a/src/mainboard/google/slippy/variants/peppy/Makefile.inc
+++ b/src/mainboard/google/slippy/variants/peppy/Makefile.inc
@@ -1,8 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-## DIMM SPD for on-board memory
-SPD_BIN = $(obj)/spd.bin
-
# Order of names in SPD_SOURCES is important!
SPD_SOURCES = Micron_4KTF25664HZ # 0: 4GB / CH0 + CH1
SPD_SOURCES += Hynix_HMT425S6AFR6A # 1: 4GB / CH0 + CH1
@@ -13,16 +10,4 @@ SPD_SOURCES += Hynix_HMT425S6AFR6A # 5: 2GB / CH0 + CH1
SPD_SOURCES += Elpida_EDJ4216EFBG # 6: 2GB / CH0 + CH1
SPD_SOURCES += Hynix_HMT425S6CFR6A # 7: 2GB / CH0 + CH1
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/slippy/variants/wolf/Makefile.inc b/src/mainboard/google/slippy/variants/wolf/Makefile.inc
index 3306b797f0..cd38d98051 100644
--- a/src/mainboard/google/slippy/variants/wolf/Makefile.inc
+++ b/src/mainboard/google/slippy/variants/wolf/Makefile.inc
@@ -1,8 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
-## DIMM SPD for on-board memory
-SPD_BIN = $(obj)/spd.bin
-
# Order of names in SPD_SOURCES is important!
SPD_SOURCES = Micron_4KTF25664HZ # 0: 4GB / CH0 + CH1
SPD_SOURCES += Hynix_HMT425S6AFR6A # 1: 4GB / CH0 + CH1
@@ -11,16 +8,4 @@ SPD_SOURCES += Micron_4KTF25664HZ # 3: 2GB / CH0
SPD_SOURCES += Hynix_HMT425S6AFR6A # 4: 2GB / CH0
SPD_SOURCES += Samsung_K4B4G1646B # 4: 2GB / CH0
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd rom data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
diff --git a/src/mainboard/google/volteer/Kconfig b/src/mainboard/google/volteer/Kconfig
index 4867feaabe..dda2f4e933 100644
--- a/src/mainboard/google/volteer/Kconfig
+++ b/src/mainboard/google/volteer/Kconfig
@@ -27,6 +27,7 @@ config BOARD_GOOGLE_BASEBOARD_VOLTEER
select MAINBOARD_HAS_TPM2
select PCIEXP_HOTPLUG
select SOC_INTEL_TIGERLAKE
+ select GENERIC_SPD_BIN
if BOARD_GOOGLE_BASEBOARD_VOLTEER
diff --git a/src/mainboard/google/volteer/spd/Makefile.inc b/src/mainboard/google/volteer/spd/Makefile.inc
index 2dfafd5cd8..eb8e6ff355 100644
--- a/src/mainboard/google/volteer/spd/Makefile.inc
+++ b/src/mainboard/google/volteer/spd/Makefile.inc
@@ -2,23 +2,10 @@
##
ifneq ($(SPD_SOURCES),)
-SPD_BIN = $(obj)/spd.bin
-
ifeq ($(SPD_SOURCE_PATH),)
SPD_SOURCE_PATH := src/soc/intel/tigerlake/spd
endif
-SPD_DEPS := $(foreach f, $(SPD_SOURCES), $(SPD_SOURCE_PATH)/$(f))
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
+LIB_SPD_DEPS := $(foreach f, $(SPD_SOURCES), $(SPD_SOURCE_PATH)/$(f))
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
endif