xref: /rk3399_ARM-atf/fdts/stm32mp25-lpddr4-1x32Gbits-1x32bits-1200MHz.dtsi (revision 64f82e5a06cf4aeef9da40a8d503dc3f77cdb840)
1*64f82e5aSYann Gautier// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2*64f82e5aSYann Gautier/*
3*64f82e5aSYann Gautier * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
4*64f82e5aSYann Gautier */
5*64f82e5aSYann Gautier
6*64f82e5aSYann Gautier/*
7*64f82e5aSYann Gautier * STM32MP25 LPDDR4 board configuration
8*64f82e5aSYann Gautier * LPDDR4 1x32Gbits 1x32bits 1200MHz
9*64f82e5aSYann Gautier *
10*64f82e5aSYann Gautier * version       2
11*64f82e5aSYann Gautier * memclk        1200MHz  (2x DFI clock)
12*64f82e5aSYann Gautier * width         32       32: full width / 16: half width
13*64f82e5aSYann Gautier * ranks         1        Single or Dual rank
14*64f82e5aSYann Gautier * density       16Gbits  (per 16bit channel)
15*64f82e5aSYann Gautier * Addressing    RBC      row/bank interleaving
16*64f82e5aSYann Gautier * DBI-RD        No       Read DBI
17*64f82e5aSYann Gautier * DBI-WR        No       Write DBI
18*64f82e5aSYann Gautier * RPST          1.5      Read postamble (ck)
19*64f82e5aSYann Gautier * Per_bank_ref  Yes
20*64f82e5aSYann Gautier */
21*64f82e5aSYann Gautier
22*64f82e5aSYann Gautier#define DDR_MEM_NAME	"LPDDR4 1x32Gbits 1x32bits 1200MHz"
23*64f82e5aSYann Gautier#define DDR_MEM_SPEED	1200000
24*64f82e5aSYann Gautier#define DDR_MEM_SIZE	0x100000000
25*64f82e5aSYann Gautier
26*64f82e5aSYann Gautier#define DDR_MSTR 0x01080020
27*64f82e5aSYann Gautier#define DDR_MRCTRL0 0x00000030
28*64f82e5aSYann Gautier#define DDR_MRCTRL1 0x00000000
29*64f82e5aSYann Gautier#define DDR_MRCTRL2 0x00000000
30*64f82e5aSYann Gautier#define DDR_DERATEEN 0x00000203
31*64f82e5aSYann Gautier#define DDR_DERATEINT 0x0124F800
32*64f82e5aSYann Gautier#define DDR_DERATECTL 0x00000000
33*64f82e5aSYann Gautier#define DDR_PWRCTL 0x00000100
34*64f82e5aSYann Gautier#define DDR_PWRTMG 0x00130001
35*64f82e5aSYann Gautier#define DDR_HWLPCTL 0x00000002
36*64f82e5aSYann Gautier#define DDR_RFSHCTL0 0x00210014
37*64f82e5aSYann Gautier#define DDR_RFSHCTL1 0x00000000
38*64f82e5aSYann Gautier#define DDR_RFSHCTL3 0x00000000
39*64f82e5aSYann Gautier#define DDR_RFSHTMG 0x81240072
40*64f82e5aSYann Gautier#define DDR_RFSHTMG1 0x00360000
41*64f82e5aSYann Gautier#define DDR_CRCPARCTL0 0x00000000
42*64f82e5aSYann Gautier#define DDR_CRCPARCTL1 0x00001000
43*64f82e5aSYann Gautier#define DDR_INIT0 0xC0020002
44*64f82e5aSYann Gautier#define DDR_INIT1 0x00010002
45*64f82e5aSYann Gautier#define DDR_INIT2 0x00000D00
46*64f82e5aSYann Gautier#define DDR_INIT3 0x00C40024
47*64f82e5aSYann Gautier#define DDR_INIT4 0x00310008
48*64f82e5aSYann Gautier#define DDR_INIT5 0x00100004
49*64f82e5aSYann Gautier#define DDR_INIT6 0x00660047
50*64f82e5aSYann Gautier#define DDR_INIT7 0x00050047
51*64f82e5aSYann Gautier#define DDR_DIMMCTL 0x00000000
52*64f82e5aSYann Gautier#define DDR_RANKCTL 0x0000066F
53*64f82e5aSYann Gautier#define DDR_RANKCTL1 0x00000011
54*64f82e5aSYann Gautier#define DDR_DRAMTMG0 0x1718141A
55*64f82e5aSYann Gautier#define DDR_DRAMTMG1 0x00050524
56*64f82e5aSYann Gautier#define DDR_DRAMTMG2 0x060C1111
57*64f82e5aSYann Gautier#define DDR_DRAMTMG3 0x0090900C
58*64f82e5aSYann Gautier#define DDR_DRAMTMG4 0x0B04060B
59*64f82e5aSYann Gautier#define DDR_DRAMTMG5 0x02030909
60*64f82e5aSYann Gautier#define DDR_DRAMTMG6 0x02020007
61*64f82e5aSYann Gautier#define DDR_DRAMTMG7 0x00000302
62*64f82e5aSYann Gautier#define DDR_DRAMTMG8 0x03034405
63*64f82e5aSYann Gautier#define DDR_DRAMTMG9 0x0004040D
64*64f82e5aSYann Gautier#define DDR_DRAMTMG10 0x001C180A
65*64f82e5aSYann Gautier#define DDR_DRAMTMG11 0x440C021C
66*64f82e5aSYann Gautier#define DDR_DRAMTMG12 0x1A020010
67*64f82e5aSYann Gautier#define DDR_DRAMTMG13 0x0B100002
68*64f82e5aSYann Gautier#define DDR_DRAMTMG14 0x000000E9
69*64f82e5aSYann Gautier#define DDR_DRAMTMG15 0x00000000
70*64f82e5aSYann Gautier#define DDR_ZQCTL0 0x02580012
71*64f82e5aSYann Gautier#define DDR_ZQCTL1 0x01E0493E
72*64f82e5aSYann Gautier#define DDR_ZQCTL2 0x00000000
73*64f82e5aSYann Gautier#define DDR_DFITMG0 0x0395820A
74*64f82e5aSYann Gautier#define DDR_DFITMG1 0x000A0303
75*64f82e5aSYann Gautier#define DDR_DFILPCFG0 0x07F04111
76*64f82e5aSYann Gautier#define DDR_DFILPCFG1 0x000000F0
77*64f82e5aSYann Gautier#define DDR_DFIUPD0 0x4040000C
78*64f82e5aSYann Gautier#define DDR_DFIUPD1 0x0040007F
79*64f82e5aSYann Gautier#define DDR_DFIUPD2 0x00000000
80*64f82e5aSYann Gautier#define DDR_DFIMISC 0x00000041
81*64f82e5aSYann Gautier#define DDR_DFITMG2 0x0000150A
82*64f82e5aSYann Gautier#define DDR_DFITMG3 0x00000000
83*64f82e5aSYann Gautier#define DDR_DBICTL 0x00000001
84*64f82e5aSYann Gautier#define DDR_DFIPHYMSTR 0x80000001
85*64f82e5aSYann Gautier#define DDR_ADDRMAP0 0x0000001F
86*64f82e5aSYann Gautier#define DDR_ADDRMAP1 0x00080808
87*64f82e5aSYann Gautier#define DDR_ADDRMAP2 0x00000000
88*64f82e5aSYann Gautier#define DDR_ADDRMAP3 0x00000000
89*64f82e5aSYann Gautier#define DDR_ADDRMAP4 0x00001F1F
90*64f82e5aSYann Gautier#define DDR_ADDRMAP5 0x070F0707
91*64f82e5aSYann Gautier#define DDR_ADDRMAP6 0x07070707
92*64f82e5aSYann Gautier#define DDR_ADDRMAP7 0x00000F07
93*64f82e5aSYann Gautier#define DDR_ADDRMAP8 0x00003F3F
94*64f82e5aSYann Gautier#define DDR_ADDRMAP9 0x07070707
95*64f82e5aSYann Gautier#define DDR_ADDRMAP10 0x07070707
96*64f82e5aSYann Gautier#define DDR_ADDRMAP11 0x00000007
97*64f82e5aSYann Gautier#define DDR_ODTCFG 0x04000400
98*64f82e5aSYann Gautier#define DDR_ODTMAP 0x00000000
99*64f82e5aSYann Gautier#define DDR_SCHED 0x80001B00
100*64f82e5aSYann Gautier#define DDR_SCHED1 0x00000000
101*64f82e5aSYann Gautier#define DDR_PERFHPR1 0x04000200
102*64f82e5aSYann Gautier#define DDR_PERFLPR1 0x08000080
103*64f82e5aSYann Gautier#define DDR_PERFWR1 0x08000400
104*64f82e5aSYann Gautier#define DDR_SCHED3 0x04040208
105*64f82e5aSYann Gautier#define DDR_SCHED4 0x08400810
106*64f82e5aSYann Gautier#define DDR_DBG0 0x00000000
107*64f82e5aSYann Gautier#define DDR_DBG1 0x00000000
108*64f82e5aSYann Gautier#define DDR_DBGCMD 0x00000000
109*64f82e5aSYann Gautier#define DDR_SWCTL 0x00000000
110*64f82e5aSYann Gautier#define DDR_SWCTLSTATIC 0x00000000
111*64f82e5aSYann Gautier#define DDR_POISONCFG 0x00000000
112*64f82e5aSYann Gautier#define DDR_PCCFG 0x00000000
113*64f82e5aSYann Gautier#define DDR_PCFGR_0 0x00704100
114*64f82e5aSYann Gautier#define DDR_PCFGW_0 0x00004100
115*64f82e5aSYann Gautier#define DDR_PCTRL_0 0x00000000
116*64f82e5aSYann Gautier#define DDR_PCFGQOS0_0 0x0021000C
117*64f82e5aSYann Gautier#define DDR_PCFGQOS1_0 0x01000080
118*64f82e5aSYann Gautier#define DDR_PCFGWQOS0_0 0x01100C07
119*64f82e5aSYann Gautier#define DDR_PCFGWQOS1_0 0x04000200
120*64f82e5aSYann Gautier#define DDR_PCFGR_1 0x00704100
121*64f82e5aSYann Gautier#define DDR_PCFGW_1 0x00004100
122*64f82e5aSYann Gautier#define DDR_PCTRL_1 0x00000000
123*64f82e5aSYann Gautier#define DDR_PCFGQOS0_1 0x00100007
124*64f82e5aSYann Gautier#define DDR_PCFGQOS1_1 0x01000080
125*64f82e5aSYann Gautier#define DDR_PCFGWQOS0_1 0x01100C07
126*64f82e5aSYann Gautier#define DDR_PCFGWQOS1_1 0x04000200
127*64f82e5aSYann Gautier
128*64f82e5aSYann Gautier#define DDR_UIB_DRAMTYPE 0x00000002
129*64f82e5aSYann Gautier#define DDR_UIB_DIMMTYPE 0x00000004
130*64f82e5aSYann Gautier#define DDR_UIB_LP4XMODE 0x00000000
131*64f82e5aSYann Gautier#define DDR_UIB_NUMDBYTE 0x00000004
132*64f82e5aSYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI0 0x00000002
133*64f82e5aSYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI1 0x00000002
134*64f82e5aSYann Gautier#define DDR_UIB_NUMANIB 0x00000008
135*64f82e5aSYann Gautier#define DDR_UIB_NUMRANK_DFI0 0x00000001
136*64f82e5aSYann Gautier#define DDR_UIB_NUMRANK_DFI1 0x00000001
137*64f82e5aSYann Gautier#define DDR_UIB_DRAMDATAWIDTH 0x00000010
138*64f82e5aSYann Gautier#define DDR_UIB_NUMPSTATES 0x00000001
139*64f82e5aSYann Gautier#define DDR_UIB_FREQUENCY_0 0x000004B0
140*64f82e5aSYann Gautier#define DDR_UIB_PLLBYPASS_0 0x00000000
141*64f82e5aSYann Gautier#define DDR_UIB_DFIFREQRATIO_0 0x00000001
142*64f82e5aSYann Gautier#define DDR_UIB_DFI1EXISTS 0x00000001
143*64f82e5aSYann Gautier#define DDR_UIB_TRAIN2D 0x00000000
144*64f82e5aSYann Gautier#define DDR_UIB_HARDMACROVER 0x00000003
145*64f82e5aSYann Gautier#define DDR_UIB_READDBIENABLE_0 0x00000000
146*64f82e5aSYann Gautier#define DDR_UIB_DFIMODE 0x00000000
147*64f82e5aSYann Gautier
148*64f82e5aSYann Gautier#define DDR_UIA_LP4RXPREAMBLEMODE_0 0x00000000
149*64f82e5aSYann Gautier#define DDR_UIA_LP4POSTAMBLEEXT_0 0x00000001
150*64f82e5aSYann Gautier#define DDR_UIA_D4RXPREAMBLELENGTH_0 0x00000001
151*64f82e5aSYann Gautier#define DDR_UIA_D4TXPREAMBLELENGTH_0 0x00000000
152*64f82e5aSYann Gautier#define DDR_UIA_EXTCALRESVAL 0x00000000
153*64f82e5aSYann Gautier#define DDR_UIA_IS2TTIMING_0 0x00000000
154*64f82e5aSYann Gautier#define DDR_UIA_ODTIMPEDANCE_0 0x00000035
155*64f82e5aSYann Gautier#define DDR_UIA_TXIMPEDANCE_0 0x00000028
156*64f82e5aSYann Gautier#define DDR_UIA_ATXIMPEDANCE 0x00000028
157*64f82e5aSYann Gautier#define DDR_UIA_MEMALERTEN 0x00000000
158*64f82e5aSYann Gautier#define DDR_UIA_MEMALERTPUIMP 0x00000000
159*64f82e5aSYann Gautier#define DDR_UIA_MEMALERTVREFLEVEL 0x00000000
160*64f82e5aSYann Gautier#define DDR_UIA_MEMALERTSYNCBYPASS 0x00000000
161*64f82e5aSYann Gautier#define DDR_UIA_DISDYNADRTRI_0 0x00000001
162*64f82e5aSYann Gautier#define DDR_UIA_PHYMSTRTRAININTERVAL_0 0x0000000A
163*64f82e5aSYann Gautier#define DDR_UIA_PHYMSTRMAXREQTOACK_0 0x00000005
164*64f82e5aSYann Gautier#define DDR_UIA_WDQSEXT 0x00000000
165*64f82e5aSYann Gautier#define DDR_UIA_CALINTERVAL 0x00000009
166*64f82e5aSYann Gautier#define DDR_UIA_CALONCE 0x00000000
167*64f82e5aSYann Gautier#define DDR_UIA_LP4RL_0 0x00000004
168*64f82e5aSYann Gautier#define DDR_UIA_LP4WL_0 0x00000004
169*64f82e5aSYann Gautier#define DDR_UIA_LP4WLS_0 0x00000000
170*64f82e5aSYann Gautier#define DDR_UIA_LP4DBIRD_0 0x00000000
171*64f82e5aSYann Gautier#define DDR_UIA_LP4DBIWR_0 0x00000000
172*64f82e5aSYann Gautier#define DDR_UIA_LP4NWR_0 0x00000004
173*64f82e5aSYann Gautier#define DDR_UIA_LP4LOWPOWERDRV 0x00000000
174*64f82e5aSYann Gautier#define DDR_UIA_DRAMBYTESWAP 0x00000000
175*64f82e5aSYann Gautier#define DDR_UIA_RXENBACKOFF 0x00000000
176*64f82e5aSYann Gautier#define DDR_UIA_TRAINSEQUENCECTRL 0x00000000
177*64f82e5aSYann Gautier#define DDR_UIA_SNPSUMCTLOPT 0x00000000
178*64f82e5aSYann Gautier#define DDR_UIA_SNPSUMCTLF0RC5X_0 0x00000000
179*64f82e5aSYann Gautier#define DDR_UIA_TXSLEWRISEDQ_0 0x0000000F
180*64f82e5aSYann Gautier#define DDR_UIA_TXSLEWFALLDQ_0 0x0000000F
181*64f82e5aSYann Gautier#define DDR_UIA_TXSLEWRISEAC 0x0000000F
182*64f82e5aSYann Gautier#define DDR_UIA_TXSLEWFALLAC 0x0000000F
183*64f82e5aSYann Gautier#define DDR_UIA_DISABLERETRAINING 0x00000000
184*64f82e5aSYann Gautier#define DDR_UIA_DISABLEPHYUPDATE 0x00000001
185*64f82e5aSYann Gautier#define DDR_UIA_ENABLEHIGHCLKSKEWFIX 0x00000000
186*64f82e5aSYann Gautier#define DDR_UIA_DISABLEUNUSEDADDRLNS 0x00000001
187*64f82e5aSYann Gautier#define DDR_UIA_PHYINITSEQUENCENUM 0x00000000
188*64f82e5aSYann Gautier#define DDR_UIA_ENABLEDFICSPOLARITYFIX 0x00000000
189*64f82e5aSYann Gautier#define DDR_UIA_PHYVREF 0x00000014
190*64f82e5aSYann Gautier#define DDR_UIA_SEQUENCECTRL_0 0x0000131F
191*64f82e5aSYann Gautier
192*64f82e5aSYann Gautier#define DDR_UIM_MR0_0 0x00000000
193*64f82e5aSYann Gautier#define DDR_UIM_MR1_0 0x000000C4
194*64f82e5aSYann Gautier#define DDR_UIM_MR2_0 0x00000024
195*64f82e5aSYann Gautier#define DDR_UIM_MR3_0 0x00000031
196*64f82e5aSYann Gautier#define DDR_UIM_MR4_0 0x00000000
197*64f82e5aSYann Gautier#define DDR_UIM_MR5_0 0x00000000
198*64f82e5aSYann Gautier#define DDR_UIM_MR6_0 0x00000000
199*64f82e5aSYann Gautier#define DDR_UIM_MR11_0 0x00000066
200*64f82e5aSYann Gautier#define DDR_UIM_MR12_0 0x00000047
201*64f82e5aSYann Gautier#define DDR_UIM_MR13_0 0x00000008
202*64f82e5aSYann Gautier#define DDR_UIM_MR14_0 0x00000047
203*64f82e5aSYann Gautier#define DDR_UIM_MR22_0 0x00000005
204*64f82e5aSYann Gautier
205*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_0 0x00000003
206*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_1 0x00000002
207*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_2 0x00000000
208*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_3 0x00000001
209*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_4 0x00000006
210*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_5 0x00000007
211*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_6 0x00000005
212*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_7 0x00000004
213*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_8 0x00000005
214*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_9 0x00000004
215*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_10 0x00000007
216*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_11 0x00000006
217*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_12 0x00000000
218*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_13 0x00000003
219*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_14 0x00000002
220*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_15 0x00000001
221*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_16 0x00000005
222*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_17 0x00000007
223*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_18 0x00000006
224*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_19 0x00000004
225*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_20 0x00000000
226*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_21 0x00000001
227*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_22 0x00000003
228*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_23 0x00000002
229*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_24 0x00000007
230*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_25 0x00000004
231*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_26 0x00000005
232*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_27 0x00000006
233*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_28 0x00000002
234*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_29 0x00000003
235*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_30 0x00000001
236*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_31 0x00000000
237*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_32 0x00000000
238*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_33 0x00000001
239*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_34 0x00000002
240*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_35 0x00000003
241*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_36 0x00000004
242*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_37 0x00000005
243*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_38 0x00000000
244*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_39 0x00000001
245*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_40 0x00000002
246*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_41 0x00000003
247*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_42 0x00000004
248*64f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_43 0x00000005
249*64f82e5aSYann Gautier
250*64f82e5aSYann Gautier#include "stm32mp25-ddr.dtsi"
251