1178aef69SYann Gautier// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 2178aef69SYann Gautier/* 3*f42f2e73SNicolas Le Bayon * Copyright (C) 2022-2025, STMicroelectronics - All Rights Reserved 4178aef69SYann Gautier */ 5178aef69SYann Gautier 6178aef69SYann Gautier/* 7178aef69SYann Gautier * STM32MP25 DDR4 board configuration 8178aef69SYann Gautier * DDR4 2x16Gbits 2x16bits 1200MHz 9178aef69SYann Gautier * 10178aef69SYann Gautier * version 2 11178aef69SYann Gautier * package 1 Package selection (14x14 and 18x18) 12178aef69SYann Gautier * memclk 1200MHz (2x DFI clock) + range check 13178aef69SYann Gautier * Speed_Bin Worse from JEDEC 14178aef69SYann Gautier * device_width 16 x16 by default 15178aef69SYann Gautier * width 32 32: full width / 16: half width 16*f42f2e73SNicolas Le Bayon * density 16Gbits (per device) 17178aef69SYann Gautier * Addressing RBC row/bank interleaving 18178aef69SYann Gautier * RDBI No Read DBI 19178aef69SYann Gautier */ 20178aef69SYann Gautier 21178aef69SYann Gautier#define DDR_MEM_NAME "DDR4 2x16Gbits 2x16bits 1200MHz" 22178aef69SYann Gautier#define DDR_MEM_SPEED 1200000 23178aef69SYann Gautier#define DDR_MEM_SIZE 0x100000000 24178aef69SYann Gautier 25178aef69SYann Gautier#define DDR_MSTR 0x01040010 26178aef69SYann Gautier#define DDR_MRCTRL0 0x00000030 27178aef69SYann Gautier#define DDR_MRCTRL1 0x00000000 28178aef69SYann Gautier#define DDR_MRCTRL2 0x00000000 29178aef69SYann Gautier#define DDR_DERATEEN 0x00000000 30178aef69SYann Gautier#define DDR_DERATEINT 0x00000000 31178aef69SYann Gautier#define DDR_DERATECTL 0x00000000 32178aef69SYann Gautier#define DDR_PWRCTL 0x00000000 33178aef69SYann Gautier#define DDR_PWRTMG 0x00130001 34178aef69SYann Gautier#define DDR_HWLPCTL 0x00000002 35178aef69SYann Gautier#define DDR_RFSHCTL0 0x00210010 36178aef69SYann Gautier#define DDR_RFSHCTL1 0x00000000 37178aef69SYann Gautier#define DDR_RFSHCTL3 0x00000000 38178aef69SYann Gautier#define DDR_RFSHTMG 0x0092014A 39178aef69SYann Gautier#define DDR_RFSHTMG1 0x008C0000 40178aef69SYann Gautier#define DDR_CRCPARCTL0 0x00000000 41178aef69SYann Gautier#define DDR_CRCPARCTL1 0x00001000 42178aef69SYann Gautier#define DDR_INIT0 0xC0020002 43178aef69SYann Gautier#define DDR_INIT1 0x00010002 44178aef69SYann Gautier#define DDR_INIT2 0x00000D00 45178aef69SYann Gautier#define DDR_INIT3 0x09400103 46178aef69SYann Gautier#define DDR_INIT4 0x00180000 47178aef69SYann Gautier#define DDR_INIT5 0x00100004 48178aef69SYann Gautier#define DDR_INIT6 0x00080460 49178aef69SYann Gautier#define DDR_INIT7 0x00000C16 50178aef69SYann Gautier#define DDR_DIMMCTL 0x00000000 51178aef69SYann Gautier#define DDR_RANKCTL 0x0000066F 52178aef69SYann Gautier#define DDR_RANKCTL1 0x0000000D 53178aef69SYann Gautier#define DDR_DRAMTMG0 0x11152815 54178aef69SYann Gautier#define DDR_DRAMTMG1 0x0004051E 55178aef69SYann Gautier#define DDR_DRAMTMG2 0x0609060D 56178aef69SYann Gautier#define DDR_DRAMTMG3 0x0050400C 57178aef69SYann Gautier#define DDR_DRAMTMG4 0x0904050A 58178aef69SYann Gautier#define DDR_DRAMTMG5 0x06060403 59178aef69SYann Gautier#define DDR_DRAMTMG6 0x02020005 60178aef69SYann Gautier#define DDR_DRAMTMG7 0x00000202 61178aef69SYann Gautier#define DDR_DRAMTMG8 0x0606100B 62178aef69SYann Gautier#define DDR_DRAMTMG9 0x0002040A 63178aef69SYann Gautier#define DDR_DRAMTMG10 0x001C180A 64178aef69SYann Gautier#define DDR_DRAMTMG11 0x4408021C 65178aef69SYann Gautier#define DDR_DRAMTMG12 0x0C020010 66178aef69SYann Gautier#define DDR_DRAMTMG13 0x1C200004 67178aef69SYann Gautier#define DDR_DRAMTMG14 0x000000A0 68178aef69SYann Gautier#define DDR_DRAMTMG15 0x00000000 69178aef69SYann Gautier#define DDR_ZQCTL0 0x01000040 70178aef69SYann Gautier#define DDR_ZQCTL1 0x2000493E 71178aef69SYann Gautier#define DDR_ZQCTL2 0x00000000 72178aef69SYann Gautier#define DDR_DFITMG0 0x038F8209 73178aef69SYann Gautier#define DDR_DFITMG1 0x00080303 74178aef69SYann Gautier#define DDR_DFILPCFG0 0x07004111 75178aef69SYann Gautier#define DDR_DFILPCFG1 0x00000000 76178aef69SYann Gautier#define DDR_DFIUPD0 0xC0300018 77178aef69SYann Gautier#define DDR_DFIUPD1 0x005700B4 78178aef69SYann Gautier#define DDR_DFIUPD2 0x80000000 79178aef69SYann Gautier#define DDR_DFIMISC 0x00000041 80178aef69SYann Gautier#define DDR_DFITMG2 0x00000F09 81178aef69SYann Gautier#define DDR_DFITMG3 0x00000000 82178aef69SYann Gautier#define DDR_DBICTL 0x00000001 83178aef69SYann Gautier#define DDR_DFIPHYMSTR 0x80000000 84178aef69SYann Gautier#define DDR_ADDRMAP0 0x0000001F 85178aef69SYann Gautier#define DDR_ADDRMAP1 0x003F0909 86178aef69SYann Gautier#define DDR_ADDRMAP2 0x00000700 87178aef69SYann Gautier#define DDR_ADDRMAP3 0x00000000 88178aef69SYann Gautier#define DDR_ADDRMAP4 0x00001F1F 89178aef69SYann Gautier#define DDR_ADDRMAP5 0x070F0707 90178aef69SYann Gautier#define DDR_ADDRMAP6 0x07070707 91178aef69SYann Gautier#define DDR_ADDRMAP7 0x00000F07 92178aef69SYann Gautier#define DDR_ADDRMAP8 0x00003F01 93178aef69SYann Gautier#define DDR_ADDRMAP9 0x07070707 94178aef69SYann Gautier#define DDR_ADDRMAP10 0x07070707 95178aef69SYann Gautier#define DDR_ADDRMAP11 0x00000007 96178aef69SYann Gautier#define DDR_ODTCFG 0x06000618 97178aef69SYann Gautier#define DDR_ODTMAP 0x00000001 98178aef69SYann Gautier#define DDR_SCHED 0x80001B00 99178aef69SYann Gautier#define DDR_SCHED1 0x00000000 100178aef69SYann Gautier#define DDR_PERFHPR1 0x04000200 101178aef69SYann Gautier#define DDR_PERFLPR1 0x08000080 102178aef69SYann Gautier#define DDR_PERFWR1 0x08000400 103178aef69SYann Gautier#define DDR_SCHED3 0x04040208 104178aef69SYann Gautier#define DDR_SCHED4 0x08400810 105178aef69SYann Gautier#define DDR_DBG0 0x00000000 106178aef69SYann Gautier#define DDR_DBG1 0x00000000 107178aef69SYann Gautier#define DDR_DBGCMD 0x00000000 108178aef69SYann Gautier#define DDR_SWCTL 0x00000000 109178aef69SYann Gautier#define DDR_SWCTLSTATIC 0x00000000 110178aef69SYann Gautier#define DDR_POISONCFG 0x00000000 111178aef69SYann Gautier#define DDR_PCCFG 0x00000000 112178aef69SYann Gautier#define DDR_PCFGR_0 0x00704100 113178aef69SYann Gautier#define DDR_PCFGW_0 0x00004100 114178aef69SYann Gautier#define DDR_PCTRL_0 0x00000000 115178aef69SYann Gautier#define DDR_PCFGQOS0_0 0x0021000C 116178aef69SYann Gautier#define DDR_PCFGQOS1_0 0x01000080 117178aef69SYann Gautier#define DDR_PCFGWQOS0_0 0x01100C07 118178aef69SYann Gautier#define DDR_PCFGWQOS1_0 0x04000200 119178aef69SYann Gautier#define DDR_PCFGR_1 0x00704100 120178aef69SYann Gautier#define DDR_PCFGW_1 0x00004100 121178aef69SYann Gautier#define DDR_PCTRL_1 0x00000000 122178aef69SYann Gautier#define DDR_PCFGQOS0_1 0x00100007 123178aef69SYann Gautier#define DDR_PCFGQOS1_1 0x01000080 124178aef69SYann Gautier#define DDR_PCFGWQOS0_1 0x01100C07 125178aef69SYann Gautier#define DDR_PCFGWQOS1_1 0x04000200 126178aef69SYann Gautier 127178aef69SYann Gautier#define DDR_UIB_DRAMTYPE 0x00000000 128178aef69SYann Gautier#define DDR_UIB_DIMMTYPE 0x00000004 129178aef69SYann Gautier#define DDR_UIB_LP4XMODE 0x00000000 130178aef69SYann Gautier#define DDR_UIB_NUMDBYTE 0x00000004 131178aef69SYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI0 0x00000004 132178aef69SYann Gautier#define DDR_UIB_NUMACTIVEDBYTEDFI1 0x00000000 133178aef69SYann Gautier#define DDR_UIB_NUMANIB 0x00000008 134178aef69SYann Gautier#define DDR_UIB_NUMRANK_DFI0 0x00000001 135178aef69SYann Gautier#define DDR_UIB_NUMRANK_DFI1 0x00000001 136178aef69SYann Gautier#define DDR_UIB_DRAMDATAWIDTH 0x00000010 137178aef69SYann Gautier#define DDR_UIB_NUMPSTATES 0x00000001 138178aef69SYann Gautier#define DDR_UIB_FREQUENCY_0 0x000004B0 139178aef69SYann Gautier#define DDR_UIB_PLLBYPASS_0 0x00000000 140178aef69SYann Gautier#define DDR_UIB_DFIFREQRATIO_0 0x00000001 141178aef69SYann Gautier#define DDR_UIB_DFI1EXISTS 0x00000001 142178aef69SYann Gautier#define DDR_UIB_TRAIN2D 0x00000000 143178aef69SYann Gautier#define DDR_UIB_HARDMACROVER 0x00000003 144178aef69SYann Gautier#define DDR_UIB_READDBIENABLE_0 0x00000000 145178aef69SYann Gautier#define DDR_UIB_DFIMODE 0x00000000 146178aef69SYann Gautier 147178aef69SYann Gautier#define DDR_UIA_LP4RXPREAMBLEMODE_0 0x00000000 148178aef69SYann Gautier#define DDR_UIA_LP4POSTAMBLEEXT_0 0x00000000 149178aef69SYann Gautier#define DDR_UIA_D4RXPREAMBLELENGTH_0 0x00000000 150178aef69SYann Gautier#define DDR_UIA_D4TXPREAMBLELENGTH_0 0x00000000 151178aef69SYann Gautier#define DDR_UIA_EXTCALRESVAL 0x00000000 152178aef69SYann Gautier#define DDR_UIA_IS2TTIMING_0 0x00000000 153178aef69SYann Gautier#define DDR_UIA_ODTIMPEDANCE_0 0x00000035 154178aef69SYann Gautier#define DDR_UIA_TXIMPEDANCE_0 0x00000028 155178aef69SYann Gautier#define DDR_UIA_ATXIMPEDANCE 0x00000028 156178aef69SYann Gautier#define DDR_UIA_MEMALERTEN 0x00000000 157178aef69SYann Gautier#define DDR_UIA_MEMALERTPUIMP 0x00000000 158178aef69SYann Gautier#define DDR_UIA_MEMALERTVREFLEVEL 0x00000000 159178aef69SYann Gautier#define DDR_UIA_MEMALERTSYNCBYPASS 0x00000000 160178aef69SYann Gautier#define DDR_UIA_DISDYNADRTRI_0 0x00000001 161178aef69SYann Gautier#define DDR_UIA_PHYMSTRTRAININTERVAL_0 0x00000000 162178aef69SYann Gautier#define DDR_UIA_PHYMSTRMAXREQTOACK_0 0x00000000 163178aef69SYann Gautier#define DDR_UIA_WDQSEXT 0x00000000 164178aef69SYann Gautier#define DDR_UIA_CALINTERVAL 0x00000009 165178aef69SYann Gautier#define DDR_UIA_CALONCE 0x00000000 166178aef69SYann Gautier#define DDR_UIA_LP4RL_0 0x00000000 167178aef69SYann Gautier#define DDR_UIA_LP4WL_0 0x00000000 168178aef69SYann Gautier#define DDR_UIA_LP4WLS_0 0x00000000 169178aef69SYann Gautier#define DDR_UIA_LP4DBIRD_0 0x00000000 170178aef69SYann Gautier#define DDR_UIA_LP4DBIWR_0 0x00000000 171178aef69SYann Gautier#define DDR_UIA_LP4NWR_0 0x00000000 172178aef69SYann Gautier#define DDR_UIA_LP4LOWPOWERDRV 0x00000000 173178aef69SYann Gautier#define DDR_UIA_DRAMBYTESWAP 0x00000000 174178aef69SYann Gautier#define DDR_UIA_RXENBACKOFF 0x00000000 175178aef69SYann Gautier#define DDR_UIA_TRAINSEQUENCECTRL 0x00000000 176178aef69SYann Gautier#define DDR_UIA_SNPSUMCTLOPT 0x00000000 177178aef69SYann Gautier#define DDR_UIA_SNPSUMCTLF0RC5X_0 0x00000000 178178aef69SYann Gautier#define DDR_UIA_TXSLEWRISEDQ_0 0x0000000F 179178aef69SYann Gautier#define DDR_UIA_TXSLEWFALLDQ_0 0x0000000F 180178aef69SYann Gautier#define DDR_UIA_TXSLEWRISEAC 0x0000000F 181178aef69SYann Gautier#define DDR_UIA_TXSLEWFALLAC 0x0000000F 182178aef69SYann Gautier#define DDR_UIA_DISABLERETRAINING 0x00000001 183178aef69SYann Gautier#define DDR_UIA_DISABLEPHYUPDATE 0x00000000 184178aef69SYann Gautier#define DDR_UIA_ENABLEHIGHCLKSKEWFIX 0x00000000 185178aef69SYann Gautier#define DDR_UIA_DISABLEUNUSEDADDRLNS 0x00000001 186178aef69SYann Gautier#define DDR_UIA_PHYINITSEQUENCENUM 0x00000000 187178aef69SYann Gautier#define DDR_UIA_ENABLEDFICSPOLARITYFIX 0x00000000 188178aef69SYann Gautier#define DDR_UIA_PHYVREF 0x0000005E 189178aef69SYann Gautier#define DDR_UIA_SEQUENCECTRL_0 0x0000031F 190178aef69SYann Gautier 191178aef69SYann Gautier#define DDR_UIM_MR0_0 0x00000940 192178aef69SYann Gautier#define DDR_UIM_MR1_0 0x00000103 193178aef69SYann Gautier#define DDR_UIM_MR2_0 0x00000018 194178aef69SYann Gautier#define DDR_UIM_MR3_0 0x00000000 195178aef69SYann Gautier#define DDR_UIM_MR4_0 0x00000008 196178aef69SYann Gautier#define DDR_UIM_MR5_0 0x00000460 197178aef69SYann Gautier#define DDR_UIM_MR6_0 0x00000C16 198178aef69SYann Gautier#define DDR_UIM_MR11_0 0x00000000 199178aef69SYann Gautier#define DDR_UIM_MR12_0 0x00000000 200178aef69SYann Gautier#define DDR_UIM_MR13_0 0x00000000 201178aef69SYann Gautier#define DDR_UIM_MR14_0 0x00000000 202178aef69SYann Gautier#define DDR_UIM_MR22_0 0x00000000 203178aef69SYann Gautier 204178aef69SYann Gautier#define DDR_UIS_SWIZZLE_0 0x0000000C 205178aef69SYann Gautier#define DDR_UIS_SWIZZLE_1 0x00000005 206178aef69SYann Gautier#define DDR_UIS_SWIZZLE_2 0x00000013 207178aef69SYann Gautier#define DDR_UIS_SWIZZLE_3 0x0000001A 208178aef69SYann Gautier#define DDR_UIS_SWIZZLE_4 0x00000009 209178aef69SYann Gautier#define DDR_UIS_SWIZZLE_5 0x00000003 210178aef69SYann Gautier#define DDR_UIS_SWIZZLE_6 0x00000001 211178aef69SYann Gautier#define DDR_UIS_SWIZZLE_7 0x00000019 212178aef69SYann Gautier#define DDR_UIS_SWIZZLE_8 0x00000007 213178aef69SYann Gautier#define DDR_UIS_SWIZZLE_9 0x00000004 214178aef69SYann Gautier#define DDR_UIS_SWIZZLE_10 0x0000000A 215178aef69SYann Gautier#define DDR_UIS_SWIZZLE_11 0x0000000D 216178aef69SYann Gautier#define DDR_UIS_SWIZZLE_12 0x00000014 217178aef69SYann Gautier#define DDR_UIS_SWIZZLE_13 0x00000000 218178aef69SYann Gautier#define DDR_UIS_SWIZZLE_14 0x00000000 219178aef69SYann Gautier#define DDR_UIS_SWIZZLE_15 0x00000000 220178aef69SYann Gautier#define DDR_UIS_SWIZZLE_16 0x00000000 221178aef69SYann Gautier#define DDR_UIS_SWIZZLE_17 0x00000000 222178aef69SYann Gautier#define DDR_UIS_SWIZZLE_18 0x00000006 223178aef69SYann Gautier#define DDR_UIS_SWIZZLE_19 0x0000000B 224178aef69SYann Gautier#define DDR_UIS_SWIZZLE_20 0x00000000 225178aef69SYann Gautier#define DDR_UIS_SWIZZLE_21 0x00000000 226*f42f2e73SNicolas Le Bayon#define DDR_UIS_SWIZZLE_22 0x00000011 227178aef69SYann Gautier#define DDR_UIS_SWIZZLE_23 0x00000008 228178aef69SYann Gautier#define DDR_UIS_SWIZZLE_24 0x00000002 229178aef69SYann Gautier#define DDR_UIS_SWIZZLE_25 0x00000018 230178aef69SYann Gautier#define DDR_UIS_SWIZZLE_26 0x1A13050C 231178aef69SYann Gautier#define DDR_UIS_SWIZZLE_27 0x19010309 232178aef69SYann Gautier#define DDR_UIS_SWIZZLE_28 0x0D0A0407 233178aef69SYann Gautier#define DDR_UIS_SWIZZLE_29 0x00000014 234178aef69SYann Gautier#define DDR_UIS_SWIZZLE_30 0x000B0600 235*f42f2e73SNicolas Le Bayon#define DDR_UIS_SWIZZLE_31 0x02081100 236178aef69SYann Gautier#define DDR_UIS_SWIZZLE_32 0x00000018 237178aef69SYann Gautier#define DDR_UIS_SWIZZLE_33 0x00000000 238178aef69SYann Gautier#define DDR_UIS_SWIZZLE_34 0x00000000 239178aef69SYann Gautier#define DDR_UIS_SWIZZLE_35 0x00000000 240178aef69SYann Gautier#define DDR_UIS_SWIZZLE_36 0x00000000 241178aef69SYann Gautier#define DDR_UIS_SWIZZLE_37 0x00000000 242178aef69SYann Gautier#define DDR_UIS_SWIZZLE_38 0x00000000 243178aef69SYann Gautier#define DDR_UIS_SWIZZLE_39 0x00000000 244178aef69SYann Gautier#define DDR_UIS_SWIZZLE_40 0x00000000 245178aef69SYann Gautier#define DDR_UIS_SWIZZLE_41 0x00000000 246178aef69SYann Gautier#define DDR_UIS_SWIZZLE_42 0x00000000 247178aef69SYann Gautier#define DDR_UIS_SWIZZLE_43 0x00000000 248178aef69SYann Gautier 249178aef69SYann Gautier#include "stm32mp25-ddr.dtsi" 250