coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/variants.h>
4 #include <baseboard/gpio.h>
5 #include <gpio.h>
6 #include <soc/meminit.h>
7 #include <soc/romstage.h>
8 
9 static const struct mb_cfg board_memcfg_cfg = {
10 
11  .dq_map[DDR_CH0] = {
12  {0xf, 0xf0},
13  {0xf, 0xf0},
14  {0xff, 0x0},
15  {0x0, 0x0},
16  {0x0, 0x0},
17  {0x0, 0x0}
18  },
19  .dq_map[DDR_CH1] = {
20  {0xf, 0xf0},
21  {0xf, 0xf0},
22  {0xff, 0x0},
23  {0x0, 0x0},
24  {0x00, 0x0},
25  {0x00, 0x0}
26  },
27 
28  /*
29  * The dqs_map arrays map the ddr4 pins to the SoC pins
30  * for both channels.
31  *
32  * the index = pin number on SoC
33  * the value = pin number on LPDDR4 part
34  */
35  .dqs_map[DDR_CH0] = {0, 3, 2, 1, 7, 5, 4, 6},
36  .dqs_map[DDR_CH1] = {3, 1, 2, 0, 4, 7, 6, 5},
37 
38  /* Disable Early Command Training */
39  .ect = 1,
40 
41  /* User Board Type */
42  .UserBd = BOARD_TYPE_MOBILE,
43 };
44 
45 const struct mb_cfg *variant_memcfg_config(void)
46 {
47  return &board_memcfg_cfg;
48 }
@ DDR_CH0
@ DDR_CH1
const struct mb_cfg *__weak variant_memcfg_config(void)
Definition: memory.c:46
static const struct mb_cfg board_memcfg_cfg
Definition: memory.c:9
@ BOARD_TYPE_MOBILE
Definition: romstage.h:14
Definition: meminit.h:71
uint8_t dq_map[CONFIG_DATA_BUS_WIDTH]
Definition: meminit.h:80