Debian Codegraph @

src/mainboard/intel/elkhartlake_crb/variants/ehlcrb/memory.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <baseboard/variants.h>
4 #include <gpio.h>
5 #include <soc/meminit.h>
6 #include <soc/romstage.h>
7
8 static const struct mb_cfg ehlcrb_lpddr4x_memcfg_cfg = {
9 .dq_map[DDR_CH0] = {
10 {0xf, 0xf0},
11 {0xf, 0xf0},
12 {0xff, 0x0},
13 {0x0, 0x0},
14 {0x0, 0x0},
15 {0x0, 0x0}
16 },
17
18 .dq_map[DDR_CH1] = {
19 {0xf, 0xf0},
20 {0xf, 0xf0},
21 {0xff, 0x0},
22 {0x0, 0x0},
23 {0x0, 0x0},
24 {0x0, 0x0}
25 },
26
27 /*
28 * The dqs_map arrays map the ddr4 pins to the SoC pins
29 * for both channels.
30 *
31 * the index = pin number on ddr4 part
32 * the value = pin number on SoC
33 */
34 .dqs_map[DDR_CH0] = {3, 0, 1, 2, 7, 4, 5, 6},
35 .dqs_map[DDR_CH1] = {3, 0, 1, 2, 7, 4, 5, 6},
36
37 /* Baseboard uses 100, 100 and 100 rcomp resistors */
38 .rcomp_resistor = {100, 100, 100},
39
40 .rcomp_targets = {60, 40, 30, 20, 30},
41
42 /* LPDDR4x does not allow interleaved memory */
43 .dq_pins_interleaved = 0,
44
45 /* Baseboard is using config 2 for vref_ca */
46 .vref_ca_config = 2,
47
48 /* Enable Early Command Training */
49 .ect = 1,
50
51 /* Set Board Type */
52 .UserBd = BOARD_TYPE_MOBILE,
53 };
54
55 const struct mb_cfg *variant_memcfg_config(void)
56 {
57 return &ehlcrb_lpddr4x_memcfg_cfg;
58 }