4 #include <soc/romstage.h>
6 #include <soc/meminit.h>
25 .ch1_rank_density = 0,
28 .part_num =
"K4F8E304HB-MGCJ",
36 .part_num =
"K4F8E304HB-MGCJ",
44 .part_num =
"K4F6E304HB-MGCJ",
54 0x0D, 0x0A, 0x08, 0x0B, 0x0C, 0x0F, 0x0E, 0x09,
55 0x06, 0x00, 0x03, 0x04, 0x07, 0x01, 0x05, 0x02,
56 0x1C, 0x1A, 0x19, 0x1B, 0x1D, 0x1F, 0x1E, 0x18,
57 0x10, 0x17, 0x15, 0x16, 0x14, 0x12, 0x13, 0x11
61 0x00, 0x07, 0x04, 0x05, 0x06, 0x02, 0x03, 0x01,
62 0x08, 0x0F, 0x0D, 0x0B, 0x0A, 0x09, 0x0E, 0x0C,
63 0x17, 0x11, 0x13, 0x12, 0x14, 0x15, 0x16, 0x10,
64 0x1C, 0x1A, 0x1D, 0x1F, 0x18, 0x19, 0x1E, 0x1B
68 0x0D, 0x08, 0x0B, 0x0E, 0x0C, 0x0F, 0x09, 0x0A,
69 0x04, 0x07, 0x01, 0x06, 0x02, 0x03, 0x00, 0x05,
70 0x18, 0x19, 0x1C, 0x1A, 0x1D, 0x1E, 0x1F, 0x1B,
71 0x11, 0x13, 0x15, 0x10, 0x16, 0x12, 0x17, 0x14
75 0x00, 0x05, 0x04, 0x07, 0x03, 0x02, 0x06, 0x01,
76 0x0A, 0x0B, 0x08, 0x09, 0x0C, 0x0E, 0x0D, 0x0F,
77 0x12, 0x16, 0x14, 0x13, 0x17, 0x11, 0x15, 0x10,
78 0x19, 0x1F, 0x1D, 0x1B, 0x1E, 0x18, 0x1C, 0x1A
94 memory_skuid |= rx_state << i;
108 printk(
BIOS_DEBUG,
"MAINBOARD: Found memory SKU ID: 0x%02x\n", memory_skuid);
110 switch (memory_skuid) {
112 config->DualRankSupportEnable = 0;
113 config->Ch0_RankEnable = 1;
114 config->Ch0_DramDensity = 2;
115 config->Ch1_RankEnable = 1;
116 config->Ch1_DramDensity = 2;
117 config->Ch2_RankEnable = 0;
118 config->Ch3_RankEnable = 0;
122 config->DualRankSupportEnable = 1;
123 config->Ch0_RankEnable = 1;
124 config->Ch0_DramDensity = 2;
125 config->Ch1_RankEnable = 1;
126 config->Ch1_DramDensity = 2;
127 config->Ch2_RankEnable = 1;
128 config->Ch2_DramDensity = 2;
129 config->Ch3_RankEnable = 1;
130 config->Ch3_DramDensity = 2;
134 config->DualRankSupportEnable = 1;
135 config->Ch0_RankEnable = 3;
136 config->Ch0_DramDensity = 2;
137 config->Ch1_RankEnable = 3;
138 config->Ch1_DramDensity = 2;
139 config->Ch2_RankEnable = 3;
140 config->Ch2_DramDensity = 2;
141 config->Ch3_RankEnable = 3;
142 config->Ch3_DramDensity = 2;
146 config->DualRankSupportEnable = 1;
147 config->Ch0_RankEnable = 1;
148 config->Ch0_DramDensity = 4;
149 config->Ch1_RankEnable = 1;
150 config->Ch1_DramDensity = 4;
151 config->Ch2_RankEnable = 1;
152 config->Ch2_DramDensity = 4;
153 config->Ch3_RankEnable = 1;
154 config->Ch3_DramDensity = 4;
165 config->DDR3LPageSize = 0x0;
166 config->DIMM0SPDAddress = 0x0;
167 config->DIMM1SPDAddress = 0x0;
168 config->RmtCheckRun = 0x3;
169 config->RmtMarginCheckScaleHighThreshold = 0xC8;
170 config->EnhancePort8xhDecoding = 0x0;
172 config->Ch0_DeviceWidth = 0x1;
174 config->Ch1_DeviceWidth = 0x1;
176 config->Ch2_DeviceWidth = 0x1;
178 config->Ch3_DeviceWidth = 0x1;
180 config->StartTimerTickerOfPfetAssert = 0x4E20;
void save_lpddr4_dimm_info(const struct lpddr4_cfg *lpcfg, size_t mem_sku)
void * memcpy(void *dest, const void *src, size_t n)
#define printk(level,...)
__weak void mainboard_save_dimm_info(struct romstage_params *params)
int gpio_get(gpio_t gpio)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
static const struct pad_config gpio_table[]
void mainboard_memory_init_params(FSPM_UPD *mupd)
static const uint8_t memory_skuid_pads[]
static const struct lpddr4_cfg lp4cfg
static const struct lpddr4_sku skus[]
static const uint8_t ch1_bit_swizzling[]
static const uint8_t ch3_bit_swizzling[]
static const uint8_t ch0_bit_swizzling[]
static const uint8_t ch2_bit_swizzling[]
static uint8_t get_memory_skuid(void)
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
const struct lpddr4_sku * skus