coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
4 #include <soc/cnl_memcfg_init.h>
5 #include <soc/romstage.h>
6 
7 static const struct cnl_mb_cfg memcfg = {
8  /* Access memory info through SMBUS. */
9  .spd[0] = {
11  .spd_spec = {.spd_smbus_address = 0xa0},
12  },
13  .spd[1] = {.read_type = NOT_EXISTING},
14  .spd[2] = {
15  .read_type = READ_SMBUS,
16  .spd_spec = {.spd_smbus_address = 0xa4},
17  },
18  .spd[3] = {.read_type = NOT_EXISTING},
19 
20  /*
21  * The dqs_map arrays map the ddr4 pins to the SoC pins
22  * for both channels.
23  *
24  * the index = pin number on ddr4 part
25  * the value = pin number on SoC
26  */
27  .dqs_map[DDR_CH0] = {0, 1, 4, 5, 2, 3, 6, 7},
28  .dqs_map[DDR_CH1] = {0, 1, 4, 5, 2, 3, 6, 7},
29 
30  /* Baseboard uses 121, 81 and 100 rcomp resistors */
31  .rcomp_resistor = {121, 81, 100},
32 
33  /*
34  * Baseboard Rcomp target values.
35  */
36  .rcomp_targets = {100, 40, 20, 20, 26},
37 
38  /* Disable Early Command Training */
39  .ect = 0,
40 
41  /* Base on board design */
42  .vref_ca_config = 2,
43 };
44 
45 void mainboard_memory_init_params(FSPM_UPD *memupd)
46 {
48 
49  cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
50 }
void cannonlake_memcfg_init(FSP_M_CONFIG *mem_cfg, const struct cnl_mb_cfg *cnl_cfg)
@ NOT_EXISTING
@ READ_SMBUS
@ DDR_CH0
@ DDR_CH1
void wilco_ec_romstage_init(void)
wilco_ec_early_init
Definition: romstage.c:7
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition: romstage.c:22
static const struct cnl_mb_cfg memcfg
Definition: romstage.c:7
struct spd_info spd[NUM_DIMM_SLOT]
enum mem_info_read_type read_type