coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
meminit.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _SOC_ALDERLAKE_MEMINIT_H_
4 #define _SOC_ALDERLAKE_MEMINIT_H_
5 
6 #include <types.h>
7 #include <fsp/soc_binding.h>
8 #include <intelblocks/meminit.h>
9 
10 enum mem_type {
15 };
16 
18  /* Dqs Pins Interleaved Setting. Enable/Disable Control */
20 };
21 
22 struct lpx_dq {
25 };
26 
27 struct lpx_dqs {
30 };
31 
32 struct lpx_dq_map {
33  struct lpx_dq ddr0;
34  struct lpx_dq ddr1;
35  struct lpx_dq ddr2;
36  struct lpx_dq ddr3;
37  struct lpx_dq ddr4;
38  struct lpx_dq ddr5;
39  struct lpx_dq ddr6;
40  struct lpx_dq ddr7;
41 };
42 
43 struct lpx_dqs_map {
44  struct lpx_dqs ddr0;
45  struct lpx_dqs ddr1;
46  struct lpx_dqs ddr2;
47  struct lpx_dqs ddr3;
48  struct lpx_dqs ddr4;
49  struct lpx_dqs ddr5;
50  struct lpx_dqs ddr6;
51  struct lpx_dqs ddr7;
52 };
53 
56 };
57 
58 struct rcomp {
59  /*
60  * Rcomp resistor value. This values represents the resistance in
61  * ohms of the rcomp resistor attached to the DDR_COMP pin on the SoC.
62  *
63  * Note: If mainboard users don't want to override rcomp related settings
64  * then associated rcomp UPDs will have its default value.
65  */
67  /* Rcomp target values. */
69 };
70 
71 struct mb_cfg {
72  enum mem_type type;
73  struct rcomp rcomp;
74  union {
75  /*
76  * DQ CPU<>DRAM map:
77  * Index of the array represents DQ# on the CPU and the value represents DQ# on
78  * the DRAM part.
79  */
80  uint8_t dq_map[CONFIG_DATA_BUS_WIDTH];
81  struct lpx_dq_map lpx_dq_map;
82  };
83 
84  union {
85  /*
86  * DQS CPU<>DRAM map:
87  * Index of the array represents DQS# on the CPU and the value represents DQS#
88  * on the DRAM part.
89  */
90  uint8_t dqs_map[CONFIG_DATA_BUS_WIDTH/BITS_PER_BYTE];
91  struct lpx_dqs_map lpx_dqs_map;
92  };
93 
94  union {
97  };
98 
99  /* Early Command Training Enable/Disable Control */
100  bool ect;
101 
102  /* Board type */
104 
105  /* Command Mirror */
107 
108  /* Enable/Disable TxDqDqs Retraining for Lp4/Lp5/DDR */
110 };
111 
112 void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
113  const struct mem_spd *spd_info, bool half_populated);
114 
115 #endif /* _SOC_ALDERLAKE_MEMINIT_H_ */
void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg, const struct mem_spd *spd_info, bool half_populated)
Definition: meminit.c:238
mem_type
Definition: meminit.h:10
@ MEM_TYPE_LP5X
Definition: meminit.h:14
@ MEM_TYPE_LP4X
Definition: meminit.h:13
@ MEM_TYPE_DDR5
Definition: meminit.h:12
@ MEM_TYPE_DDR4
Definition: meminit.h:11
#define BITS_PER_BYTE
Definition: types.h:22
unsigned short uint16_t
Definition: stdint.h:11
unsigned char uint8_t
Definition: stdint.h:8
struct lpx_dq ddr5
Definition: meminit.h:38
struct lpx_dq ddr7
Definition: meminit.h:40
struct lpx_dq ddr1
Definition: meminit.h:34
struct lpx_dq ddr6
Definition: meminit.h:39
struct lpx_dq ddr3
Definition: meminit.h:36
struct lpx_dq ddr4
Definition: meminit.h:37
struct lpx_dq ddr2
Definition: meminit.h:35
struct lpx_dq ddr0
Definition: meminit.h:33
Definition: meminit.h:22
uint8_t dq1[BITS_PER_BYTE]
Definition: meminit.h:24
uint8_t dq0[BITS_PER_BYTE]
Definition: meminit.h:23
struct lpx_dqs ddr1
Definition: meminit.h:45
struct lpx_dqs ddr2
Definition: meminit.h:46
struct lpx_dqs ddr0
Definition: meminit.h:44
struct lpx_dqs ddr3
Definition: meminit.h:47
struct lpx_dqs ddr7
Definition: meminit.h:51
struct lpx_dqs ddr6
Definition: meminit.h:50
struct lpx_dqs ddr5
Definition: meminit.h:49
struct lpx_dqs ddr4
Definition: meminit.h:48
uint8_t dqs0
Definition: meminit.h:28
uint8_t dqs1
Definition: meminit.h:29
Definition: meminit.h:71
bool ect
Definition: meminit.h:100
uint8_t dqs_map[CONFIG_DATA_BUS_WIDTH/BITS_PER_BYTE]
Definition: meminit.h:90
uint8_t CmdMirror
Definition: meminit.h:106
uint8_t UserBd
Definition: meminit.h:103
enum mem_type type
Definition: meminit.h:72
struct mem_ddr_config ddr_config
Definition: meminit.h:96
uint8_t dq_map[CONFIG_DATA_BUS_WIDTH]
Definition: meminit.h:80
uint8_t LpDdrDqDqsReTraining
Definition: meminit.h:109
struct mem_lp5x_config lp5x_config
Definition: meminit.h:95
bool dq_pins_interleaved
Definition: meminit.h:19
uint8_t ccc_config
Definition: meminit.h:55
Definition: meminit.h:58
uint16_t resistor
Definition: meminit.h:66
uint16_t targets[5]
Definition: meminit.h:68
Definition: spd.h:11