diff --git a/src/mainboard/siemens/fa_ehl/Kconfig b/src/mainboard/siemens/fa_ehl/Kconfig index d15bda1b59..3821142ccb 100644 --- a/src/mainboard/siemens/fa_ehl/Kconfig +++ b/src/mainboard/siemens/fa_ehl/Kconfig @@ -6,8 +6,9 @@ config BOARD_SIEMENS_BASEBOARD_FA_EHL select BOARD_ROMSIZE_KB_16384 select DRIVERS_I2C_GENERIC select HAVE_ACPI_TABLES - select USE_SIEMENS_HWILIB + select HAVE_SPD_IN_CBFS select SOC_INTEL_DISABLE_POWER_LIMITS + select USE_SIEMENS_HWILIB config BOARD_SIEMENS_FA_EHL select BOARD_SIEMENS_BASEBOARD_FA_EHL diff --git a/src/mainboard/siemens/fa_ehl/Makefile.mk b/src/mainboard/siemens/fa_ehl/Makefile.mk index 574d595079..e34eddb9f1 100644 --- a/src/mainboard/siemens/fa_ehl/Makefile.mk +++ b/src/mainboard/siemens/fa_ehl/Makefile.mk @@ -1,5 +1,7 @@ ## SPDX-License-Identifier: GPL-2.0-only +subdirs-y += spd + bootblock-y += bootblock.c romstage-y += romstage_fsp_params.c diff --git a/src/mainboard/siemens/fa_ehl/romstage_fsp_params.c b/src/mainboard/siemens/fa_ehl/romstage_fsp_params.c index 506bcc6824..926b202bc6 100644 --- a/src/mainboard/siemens/fa_ehl/romstage_fsp_params.c +++ b/src/mainboard/siemens/fa_ehl/romstage_fsp_params.c @@ -1,10 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include #include #include -#include #include #include #include @@ -14,23 +12,12 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) { static struct spd_info spd_info; const struct mb_cfg *board_cfg = variant_memcfg_config(); - static uint8_t spd_data[CONFIG_DIMM_SPD_SIZE]; - const char *cbfs_hwi_name = "hwinfo.hex"; - /* Initialize SPD information for LPDDR4x from HW-Info primarily with a fallback to - spd.bin in the case where the SPD data in HW-Info is not available or invalid. */ - memset(spd_data, 0, sizeof(spd_data)); - if ((hwilib_find_blocks(cbfs_hwi_name) == CB_SUCCESS) && - (hwilib_get_field(SPD, spd_data, 0x80) == 0x80) && - (ddr_crc16(spd_data, 126) == read16((void *)&spd_data[126]))) { - spd_info.spd_spec.spd_data_ptr_info.spd_data_ptr = (uintptr_t)spd_data; - spd_info.spd_spec.spd_data_ptr_info.spd_data_len = CONFIG_DIMM_SPD_SIZE; - spd_info.read_type = READ_SPD_MEMPTR; - } else { - die("SPD in HW-Info not valid!\n"); - } - /* Initialize variant specific configurations */ - memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, false); + bool half_populated = false; + spd_info.read_type = READ_SPD_CBFS; + spd_info.spd_spec.spd_index = 0x00; + + memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated); /* Enable Row-Hammer prevention */ memupd->FspmConfig.RhPrevention = 1; diff --git a/src/mainboard/siemens/fa_ehl/spd/Makefile.mk b/src/mainboard/siemens/fa_ehl/spd/Makefile.mk new file mode 100644 index 0000000000..5b98d884d4 --- /dev/null +++ b/src/mainboard/siemens/fa_ehl/spd/Makefile.mk @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-only + +SPD_SOURCES = Nanya_NT6AP512T32BV-J1I # 0b000 diff --git a/src/mainboard/siemens/fa_ehl/variants/fa_ehl/spd/Nanya_NT6AP512T32BV-J1I.spd.hex b/src/mainboard/siemens/fa_ehl/spd/Nanya_NT6AP512T32BV-J1I.spd.hex similarity index 100% rename from src/mainboard/siemens/fa_ehl/variants/fa_ehl/spd/Nanya_NT6AP512T32BV-J1I.spd.hex rename to src/mainboard/siemens/fa_ehl/spd/Nanya_NT6AP512T32BV-J1I.spd.hex diff --git a/src/mainboard/siemens/fa_ehl/spd/spd.h b/src/mainboard/siemens/fa_ehl/spd/spd.h new file mode 100644 index 0000000000..e2fe0f3e6f --- /dev/null +++ b/src/mainboard/siemens/fa_ehl/spd/spd.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef MAINBOARD_SPD_H +#define MAINBOARD_SPD_H + +#include + +void mainboard_fill_dq_map_ch0(u8 *dq_map_ptr); +void mainboard_fill_dq_map_ch1(u8 *dq_map_ptr); +void mainboard_fill_dqs_map_ch0(u8 *dqs_map_ptr); +void mainboard_fill_dqs_map_ch1(u8 *dqs_map_ptr); +void mainboard_fill_rcomp_res_data(u16 *rcomp_ptr); +void mainboard_fill_rcomp_strength_data(u16 *rcomp_strength_ptr); +#endif diff --git a/src/mainboard/siemens/fa_ehl/variants/fa_ehl/Makefile.mk b/src/mainboard/siemens/fa_ehl/variants/fa_ehl/Makefile.mk index d49412eba2..6e87f9fc1a 100644 --- a/src/mainboard/siemens/fa_ehl/variants/fa_ehl/Makefile.mk +++ b/src/mainboard/siemens/fa_ehl/variants/fa_ehl/Makefile.mk @@ -4,7 +4,3 @@ bootblock-y += gpio.c romstage-y += memory.c ramstage-y += gpio.c ramstage-y += mainboard.c - -SPD_SOURCES = Micron_MT53E512M32D1NP-046WTB.spd.hex -LIB_SPD_CBFS := $(foreach f, $(SPD_SOURCES), \ - src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex) diff --git a/src/mainboard/siemens/fa_ehl/variants/fa_ehl/memory.c b/src/mainboard/siemens/fa_ehl/variants/fa_ehl/memory.c index 8088857b28..31d0a08399 100644 --- a/src/mainboard/siemens/fa_ehl/variants/fa_ehl/memory.c +++ b/src/mainboard/siemens/fa_ehl/variants/fa_ehl/memory.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include #include #include