xref: /rk3399_ARM-atf/fdts/stm32mp25-lpddr4-1x32Gbits-1x32bits-1200MHz.dtsi (revision aac3e34f62db488ad4e8f9a44a10f057b2430beb)
164f82e5aSYann Gautier// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
264f82e5aSYann Gautier/*
364f82e5aSYann Gautier * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
464f82e5aSYann Gautier */
564f82e5aSYann Gautier
664f82e5aSYann Gautier/*
764f82e5aSYann Gautier * STM32MP25 LPDDR4 board configuration
864f82e5aSYann Gautier * LPDDR4 1x32Gbits 1x32bits 1200MHz
964f82e5aSYann Gautier *
1064f82e5aSYann Gautier * version       2
1164f82e5aSYann Gautier * memclk        1200MHz  (2x DFI clock)
1264f82e5aSYann Gautier * width         32       32: full width / 16: half width
1364f82e5aSYann Gautier * ranks         1        Single or Dual rank
1464f82e5aSYann Gautier * density       16Gbits  (per 16bit channel)
1564f82e5aSYann Gautier * Addressing    RBC      row/bank interleaving
1664f82e5aSYann Gautier * DBI-RD        No       Read DBI
1764f82e5aSYann Gautier * DBI-WR        No       Write DBI
1864f82e5aSYann Gautier * RPST          1.5      Read postamble (ck)
1964f82e5aSYann Gautier * Per_bank_ref  Yes
2064f82e5aSYann Gautier */
2164f82e5aSYann Gautier
2264f82e5aSYann Gautier#define DDR_MEM_NAME	"LPDDR4 1x32Gbits 1x32bits 1200MHz"
2364f82e5aSYann Gautier#define DDR_MEM_SPEED	1200000
2464f82e5aSYann Gautier#define DDR_MEM_SIZE	0x100000000
2564f82e5aSYann Gautier
2664f82e5aSYann Gautier#define DDR_MSTR 0x01080020
2764f82e5aSYann Gautier#define DDR_MRCTRL0 0x00000030
2864f82e5aSYann Gautier#define DDR_MRCTRL1 0x00000000
2964f82e5aSYann Gautier#define DDR_MRCTRL2 0x00000000
3064f82e5aSYann Gautier#define DDR_DERATEEN 0x00000203
3164f82e5aSYann Gautier#define DDR_DERATEINT 0x0124F800
3264f82e5aSYann Gautier#define DDR_DERATECTL 0x00000000
3364f82e5aSYann Gautier#define DDR_PWRCTL 0x00000100
3464f82e5aSYann Gautier#define DDR_PWRTMG 0x00130001
3564f82e5aSYann Gautier#define DDR_HWLPCTL 0x00000002
3664f82e5aSYann Gautier#define DDR_RFSHCTL0 0x00210014
3764f82e5aSYann Gautier#define DDR_RFSHCTL1 0x00000000
3864f82e5aSYann Gautier#define DDR_RFSHCTL3 0x00000000
3964f82e5aSYann Gautier#define DDR_RFSHTMG 0x81240072
4064f82e5aSYann Gautier#define DDR_RFSHTMG1 0x00360000
4164f82e5aSYann Gautier#define DDR_CRCPARCTL0 0x00000000
4264f82e5aSYann Gautier#define DDR_CRCPARCTL1 0x00001000
4364f82e5aSYann Gautier#define DDR_INIT0 0xC0020002
4464f82e5aSYann Gautier#define DDR_INIT1 0x00010002
4564f82e5aSYann Gautier#define DDR_INIT2 0x00000D00
4664f82e5aSYann Gautier#define DDR_INIT3 0x00C40024
4764f82e5aSYann Gautier#define DDR_INIT4 0x00310008
4864f82e5aSYann Gautier#define DDR_INIT5 0x00100004
4964f82e5aSYann Gautier#define DDR_INIT6 0x00660047
5064f82e5aSYann Gautier#define DDR_INIT7 0x00050047
5164f82e5aSYann Gautier#define DDR_DIMMCTL 0x00000000
5264f82e5aSYann Gautier#define DDR_RANKCTL 0x0000066F
5364f82e5aSYann Gautier#define DDR_RANKCTL1 0x00000011
5464f82e5aSYann Gautier#define DDR_DRAMTMG0 0x1718141A
5564f82e5aSYann Gautier#define DDR_DRAMTMG1 0x00050524
5664f82e5aSYann Gautier#define DDR_DRAMTMG2 0x060C1111
5764f82e5aSYann Gautier#define DDR_DRAMTMG3 0x0090900C
5864f82e5aSYann Gautier#define DDR_DRAMTMG4 0x0B04060B
5964f82e5aSYann Gautier#define DDR_DRAMTMG5 0x02030909
6064f82e5aSYann Gautier#define DDR_DRAMTMG6 0x02020007
6164f82e5aSYann Gautier#define DDR_DRAMTMG7 0x00000302
6264f82e5aSYann Gautier#define DDR_DRAMTMG8 0x03034405
6364f82e5aSYann Gautier#define DDR_DRAMTMG9 0x0004040D
6464f82e5aSYann Gautier#define DDR_DRAMTMG10 0x001C180A
6564f82e5aSYann Gautier#define DDR_DRAMTMG11 0x440C021C
6664f82e5aSYann Gautier#define DDR_DRAMTMG12 0x1A020010
6764f82e5aSYann Gautier#define DDR_DRAMTMG13 0x0B100002
6864f82e5aSYann Gautier#define DDR_DRAMTMG14 0x000000E9
6964f82e5aSYann Gautier#define DDR_DRAMTMG15 0x00000000
7064f82e5aSYann Gautier#define DDR_ZQCTL0 0x02580012
7164f82e5aSYann Gautier#define DDR_ZQCTL1 0x01E0493E
7264f82e5aSYann Gautier#define DDR_ZQCTL2 0x00000000
7364f82e5aSYann Gautier#define DDR_DFITMG0 0x0395820A
7464f82e5aSYann Gautier#define DDR_DFITMG1 0x000A0303
7564f82e5aSYann Gautier#define DDR_DFILPCFG0 0x07F04111
7664f82e5aSYann Gautier#define DDR_DFILPCFG1 0x000000F0
7764f82e5aSYann Gautier#define DDR_DFIUPD0 0x4040000C
7864f82e5aSYann Gautier#define DDR_DFIUPD1 0x0040007F
7964f82e5aSYann Gautier#define DDR_DFIUPD2 0x00000000
8064f82e5aSYann Gautier#define DDR_DFIMISC 0x00000041
8164f82e5aSYann Gautier#define DDR_DFITMG2 0x0000150A
8264f82e5aSYann Gautier#define DDR_DFITMG3 0x00000000
8364f82e5aSYann Gautier#define DDR_DBICTL 0x00000001
8464f82e5aSYann Gautier#define DDR_DFIPHYMSTR 0x80000001
8564f82e5aSYann Gautier#define DDR_ADDRMAP0 0x0000001F
8664f82e5aSYann Gautier#define DDR_ADDRMAP1 0x00080808
8764f82e5aSYann Gautier#define DDR_ADDRMAP2 0x00000000
8864f82e5aSYann Gautier#define DDR_ADDRMAP3 0x00000000
8964f82e5aSYann Gautier#define DDR_ADDRMAP4 0x00001F1F
9064f82e5aSYann Gautier#define DDR_ADDRMAP5 0x070F0707
9164f82e5aSYann Gautier#define DDR_ADDRMAP6 0x07070707
9264f82e5aSYann Gautier#define DDR_ADDRMAP7 0x00000F07
9364f82e5aSYann Gautier#define DDR_ADDRMAP8 0x00003F3F
9464f82e5aSYann Gautier#define DDR_ADDRMAP9 0x07070707
9564f82e5aSYann Gautier#define DDR_ADDRMAP10 0x07070707
9664f82e5aSYann Gautier#define DDR_ADDRMAP11 0x00000007
9764f82e5aSYann Gautier#define DDR_ODTCFG 0x04000400
9864f82e5aSYann Gautier#define DDR_ODTMAP 0x00000000
9964f82e5aSYann Gautier#define DDR_SCHED 0x80001B00
10064f82e5aSYann Gautier#define DDR_SCHED1 0x00000000
10164f82e5aSYann Gautier#define DDR_PERFHPR1 0x04000200
10264f82e5aSYann Gautier#define DDR_PERFLPR1 0x08000080
10364f82e5aSYann Gautier#define DDR_PERFWR1 0x08000400
10464f82e5aSYann Gautier#define DDR_SCHED3 0x04040208
10564f82e5aSYann Gautier#define DDR_SCHED4 0x08400810
10664f82e5aSYann Gautier#define DDR_DBG0 0x00000000
10764f82e5aSYann Gautier#define DDR_DBG1 0x00000000
10864f82e5aSYann Gautier#define DDR_DBGCMD 0x00000000
10964f82e5aSYann Gautier#define DDR_SWCTL 0x00000000
11064f82e5aSYann Gautier#define DDR_SWCTLSTATIC 0x00000000
11164f82e5aSYann Gautier#define DDR_POISONCFG 0x00000000
11264f82e5aSYann Gautier#define DDR_PCCFG 0x00000000
11364f82e5aSYann Gautier#define DDR_PCFGR_0 0x00704100
11464f82e5aSYann Gautier#define DDR_PCFGW_0 0x00004100
11564f82e5aSYann Gautier#define DDR_PCTRL_0 0x00000000
11664f82e5aSYann Gautier#define DDR_PCFGQOS0_0 0x0021000C
11764f82e5aSYann Gautier#define DDR_PCFGQOS1_0 0x01000080
11864f82e5aSYann Gautier#define DDR_PCFGWQOS0_0 0x01100C07
11964f82e5aSYann Gautier#define DDR_PCFGWQOS1_0 0x04000200
12064f82e5aSYann Gautier#define DDR_PCFGR_1 0x00704100
12164f82e5aSYann Gautier#define DDR_PCFGW_1 0x00004100
12264f82e5aSYann Gautier#define DDR_PCTRL_1 0x00000000
12364f82e5aSYann Gautier#define DDR_PCFGQOS0_1 0x00100007
12464f82e5aSYann Gautier#define DDR_PCFGQOS1_1 0x01000080
12564f82e5aSYann Gautier#define DDR_PCFGWQOS0_1 0x01100C07
12664f82e5aSYann Gautier#define DDR_PCFGWQOS1_1 0x04000200
12764f82e5aSYann Gautier
12864f82e5aSYann Gautier#define DDR_UIB_DRAMTYPE 0x00000002
12964f82e5aSYann Gautier#define DDR_UIB_DIMMTYPE 0x00000004
13064f82e5aSYann Gautier#define DDR_UIB_LP4XMODE 0x00000000
13164f82e5aSYann Gautier#define DDR_UIB_NUMDBYTE 0x00000004
13264f82e5aSYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI0 0x00000002
13364f82e5aSYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI1 0x00000002
13464f82e5aSYann Gautier#define DDR_UIB_NUMANIB 0x00000008
13564f82e5aSYann Gautier#define DDR_UIB_NUMRANK_DFI0 0x00000001
13664f82e5aSYann Gautier#define DDR_UIB_NUMRANK_DFI1 0x00000001
13764f82e5aSYann Gautier#define DDR_UIB_DRAMDATAWIDTH 0x00000010
13864f82e5aSYann Gautier#define DDR_UIB_NUMPSTATES 0x00000001
13964f82e5aSYann Gautier#define DDR_UIB_FREQUENCY_0 0x000004B0
14064f82e5aSYann Gautier#define DDR_UIB_PLLBYPASS_0 0x00000000
14164f82e5aSYann Gautier#define DDR_UIB_DFIFREQRATIO_0 0x00000001
14264f82e5aSYann Gautier#define DDR_UIB_DFI1EXISTS 0x00000001
14364f82e5aSYann Gautier#define DDR_UIB_TRAIN2D 0x00000000
14464f82e5aSYann Gautier#define DDR_UIB_HARDMACROVER 0x00000003
14564f82e5aSYann Gautier#define DDR_UIB_READDBIENABLE_0 0x00000000
14664f82e5aSYann Gautier#define DDR_UIB_DFIMODE 0x00000000
14764f82e5aSYann Gautier
14864f82e5aSYann Gautier#define DDR_UIA_LP4RXPREAMBLEMODE_0 0x00000000
14964f82e5aSYann Gautier#define DDR_UIA_LP4POSTAMBLEEXT_0 0x00000001
15064f82e5aSYann Gautier#define DDR_UIA_D4RXPREAMBLELENGTH_0 0x00000001
15164f82e5aSYann Gautier#define DDR_UIA_D4TXPREAMBLELENGTH_0 0x00000000
15264f82e5aSYann Gautier#define DDR_UIA_EXTCALRESVAL 0x00000000
15364f82e5aSYann Gautier#define DDR_UIA_IS2TTIMING_0 0x00000000
15464f82e5aSYann Gautier#define DDR_UIA_ODTIMPEDANCE_0 0x00000035
15564f82e5aSYann Gautier#define DDR_UIA_TXIMPEDANCE_0 0x00000028
15664f82e5aSYann Gautier#define DDR_UIA_ATXIMPEDANCE 0x00000028
15764f82e5aSYann Gautier#define DDR_UIA_MEMALERTEN 0x00000000
15864f82e5aSYann Gautier#define DDR_UIA_MEMALERTPUIMP 0x00000000
15964f82e5aSYann Gautier#define DDR_UIA_MEMALERTVREFLEVEL 0x00000000
16064f82e5aSYann Gautier#define DDR_UIA_MEMALERTSYNCBYPASS 0x00000000
16164f82e5aSYann Gautier#define DDR_UIA_DISDYNADRTRI_0 0x00000001
16264f82e5aSYann Gautier#define DDR_UIA_PHYMSTRTRAININTERVAL_0 0x0000000A
16364f82e5aSYann Gautier#define DDR_UIA_PHYMSTRMAXREQTOACK_0 0x00000005
164*29917d3aSNicolas Le Bayon#define DDR_UIA_WDQSEXT 0x00000001
16564f82e5aSYann Gautier#define DDR_UIA_CALINTERVAL 0x00000009
16664f82e5aSYann Gautier#define DDR_UIA_CALONCE 0x00000000
16764f82e5aSYann Gautier#define DDR_UIA_LP4RL_0 0x00000004
16864f82e5aSYann Gautier#define DDR_UIA_LP4WL_0 0x00000004
16964f82e5aSYann Gautier#define DDR_UIA_LP4WLS_0 0x00000000
17064f82e5aSYann Gautier#define DDR_UIA_LP4DBIRD_0 0x00000000
17164f82e5aSYann Gautier#define DDR_UIA_LP4DBIWR_0 0x00000000
17264f82e5aSYann Gautier#define DDR_UIA_LP4NWR_0 0x00000004
17364f82e5aSYann Gautier#define DDR_UIA_LP4LOWPOWERDRV 0x00000000
17464f82e5aSYann Gautier#define DDR_UIA_DRAMBYTESWAP 0x00000000
17564f82e5aSYann Gautier#define DDR_UIA_RXENBACKOFF 0x00000000
17664f82e5aSYann Gautier#define DDR_UIA_TRAINSEQUENCECTRL 0x00000000
17764f82e5aSYann Gautier#define DDR_UIA_SNPSUMCTLOPT 0x00000000
17864f82e5aSYann Gautier#define DDR_UIA_SNPSUMCTLF0RC5X_0 0x00000000
17964f82e5aSYann Gautier#define DDR_UIA_TXSLEWRISEDQ_0 0x0000000F
18064f82e5aSYann Gautier#define DDR_UIA_TXSLEWFALLDQ_0 0x0000000F
18164f82e5aSYann Gautier#define DDR_UIA_TXSLEWRISEAC 0x0000000F
18264f82e5aSYann Gautier#define DDR_UIA_TXSLEWFALLAC 0x0000000F
18364f82e5aSYann Gautier#define DDR_UIA_DISABLERETRAINING 0x00000000
18464f82e5aSYann Gautier#define DDR_UIA_DISABLEPHYUPDATE 0x00000001
18564f82e5aSYann Gautier#define DDR_UIA_ENABLEHIGHCLKSKEWFIX 0x00000000
18664f82e5aSYann Gautier#define DDR_UIA_DISABLEUNUSEDADDRLNS 0x00000001
18764f82e5aSYann Gautier#define DDR_UIA_PHYINITSEQUENCENUM 0x00000000
18864f82e5aSYann Gautier#define DDR_UIA_ENABLEDFICSPOLARITYFIX 0x00000000
18964f82e5aSYann Gautier#define DDR_UIA_PHYVREF 0x00000014
19064f82e5aSYann Gautier#define DDR_UIA_SEQUENCECTRL_0 0x0000131F
19164f82e5aSYann Gautier
19264f82e5aSYann Gautier#define DDR_UIM_MR0_0 0x00000000
19364f82e5aSYann Gautier#define DDR_UIM_MR1_0 0x000000C4
19464f82e5aSYann Gautier#define DDR_UIM_MR2_0 0x00000024
19564f82e5aSYann Gautier#define DDR_UIM_MR3_0 0x00000031
19664f82e5aSYann Gautier#define DDR_UIM_MR4_0 0x00000000
19764f82e5aSYann Gautier#define DDR_UIM_MR5_0 0x00000000
19864f82e5aSYann Gautier#define DDR_UIM_MR6_0 0x00000000
19964f82e5aSYann Gautier#define DDR_UIM_MR11_0 0x00000066
20064f82e5aSYann Gautier#define DDR_UIM_MR12_0 0x00000047
20164f82e5aSYann Gautier#define DDR_UIM_MR13_0 0x00000008
20264f82e5aSYann Gautier#define DDR_UIM_MR14_0 0x00000047
20364f82e5aSYann Gautier#define DDR_UIM_MR22_0 0x00000005
20464f82e5aSYann Gautier
20564f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_0 0x00000003
20664f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_1 0x00000002
20764f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_2 0x00000000
20864f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_3 0x00000001
20964f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_4 0x00000006
21064f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_5 0x00000007
21164f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_6 0x00000005
21264f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_7 0x00000004
21364f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_8 0x00000005
21464f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_9 0x00000004
21564f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_10 0x00000007
21664f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_11 0x00000006
21764f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_12 0x00000000
21864f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_13 0x00000003
21964f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_14 0x00000002
22064f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_15 0x00000001
22164f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_16 0x00000005
22264f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_17 0x00000007
22364f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_18 0x00000006
22464f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_19 0x00000004
22564f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_20 0x00000000
22664f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_21 0x00000001
22764f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_22 0x00000003
22864f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_23 0x00000002
22964f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_24 0x00000007
23064f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_25 0x00000004
23164f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_26 0x00000005
23264f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_27 0x00000006
23364f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_28 0x00000002
23464f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_29 0x00000003
23564f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_30 0x00000001
23664f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_31 0x00000000
23764f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_32 0x00000000
23864f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_33 0x00000001
23964f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_34 0x00000002
24064f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_35 0x00000003
24164f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_36 0x00000004
24264f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_37 0x00000005
24364f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_38 0x00000000
24464f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_39 0x00000001
24564f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_40 0x00000002
24664f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_41 0x00000003
24764f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_42 0x00000004
24864f82e5aSYann Gautier#define DDR_UIS_SWIZZLE_43 0x00000005
24964f82e5aSYann Gautier
25064f82e5aSYann Gautier#include "stm32mp25-ddr.dtsi"
251