1*4882a593SmuzhiyunTable of interleaving 2-4 controllers 2*4882a593Smuzhiyun===================================== 3*4882a593Smuzhiyun +--------------+-----------------------------------------------------------+ 4*4882a593Smuzhiyun |Configuration | Memory Controller | 5*4882a593Smuzhiyun | | 1 2 3 4 | 6*4882a593Smuzhiyun |--------------+--------------+--------------+-----------------------------+ 7*4882a593Smuzhiyun | Two memory | Not Intlv'ed | Not Intlv'ed | | 8*4882a593Smuzhiyun | complexes +--------------+--------------+ | 9*4882a593Smuzhiyun | | 2-way Intlv'ed | | 10*4882a593Smuzhiyun |--------------+--------------+--------------+--------------+ | 11*4882a593Smuzhiyun | | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed | | 12*4882a593Smuzhiyun | Three memory +--------------+--------------+--------------+ | 13*4882a593Smuzhiyun | complexes | 2-way Intlv'ed | Not Intlv'ed | | 14*4882a593Smuzhiyun | +-----------------------------+--------------+ | 15*4882a593Smuzhiyun | | 3-way Intlv'ed | | 16*4882a593Smuzhiyun +--------------+--------------+--------------+--------------+--------------+ 17*4882a593Smuzhiyun | | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed | Not Intlv'ed | 18*4882a593Smuzhiyun | Four memory +--------------+--------------+--------------+--------------+ 19*4882a593Smuzhiyun | complexes | 2-way Intlv'ed | 2-way Intlv'ed | 20*4882a593Smuzhiyun | +-----------------------------+-----------------------------+ 21*4882a593Smuzhiyun | | 4-way Intlv'ed | 22*4882a593Smuzhiyun +--------------+-----------------------------------------------------------+ 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunTable of 2-way interleaving modes supported in cpu/8xxx/ddr/ 26*4882a593Smuzhiyun====================================================== 27*4882a593Smuzhiyun +-------------+---------------------------------------------------------+ 28*4882a593Smuzhiyun | | Rank Interleaving | 29*4882a593Smuzhiyun | +--------+-----------+-----------+------------+-----------+ 30*4882a593Smuzhiyun |Memory | | | | 2x2 | 4x1 | 31*4882a593Smuzhiyun |Controller | None | 2x1 lower | 2x1 upper | {CS0+CS1}, | {CS0+CS1+ | 32*4882a593Smuzhiyun |Interleaving | | {CS0+CS1} | {CS2+CS3} | {CS2+CS3} | CS2+CS3} | 33*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 34*4882a593Smuzhiyun |None | Yes | Yes | Yes | Yes | Yes | 35*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 36*4882a593Smuzhiyun |Cacheline | Yes | Yes | No | No, Only(*)| Yes | 37*4882a593Smuzhiyun | |CS0 Only| | | {CS0+CS1} | | 38*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 39*4882a593Smuzhiyun |Page | Yes | Yes | No | No, Only(*)| Yes | 40*4882a593Smuzhiyun | |CS0 Only| | | {CS0+CS1} | | 41*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 42*4882a593Smuzhiyun |Bank | Yes | Yes | No | No, Only(*)| Yes | 43*4882a593Smuzhiyun | |CS0 Only| | | {CS0+CS1} | | 44*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 45*4882a593Smuzhiyun |Superbank | No | Yes | No | No, Only(*)| Yes | 46*4882a593Smuzhiyun | | | | | {CS0+CS1} | | 47*4882a593Smuzhiyun +-------------+--------+-----------+-----------+------------+-----------+ 48*4882a593Smuzhiyun (*) Although the hardware can be configured with memory controller 49*4882a593Smuzhiyun interleaving using "2x2" rank interleaving, it only interleaves {CS0+CS1} 50*4882a593Smuzhiyun from each controller. {CS2+CS3} on each controller are only rank 51*4882a593Smuzhiyun interleaved on that controller. 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun For memory controller interleaving, identical DIMMs are suggested. Software 54*4882a593Smuzhiyun doesn't check the size or organization of interleaved DIMMs. 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunThe ways to configure the ddr interleaving mode 57*4882a593Smuzhiyun============================================== 58*4882a593Smuzhiyun1. In board header file(e.g.MPC8572DS.h), add default interleaving setting 59*4882a593Smuzhiyun under "CONFIG_EXTRA_ENV_SETTINGS", like: 60*4882a593Smuzhiyun #define CONFIG_EXTRA_ENV_SETTINGS \ 61*4882a593Smuzhiyun "hwconfig=fsl_ddr:ctlr_intlv=bank" \ 62*4882a593Smuzhiyun ...... 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun2. Run U-Boot "setenv" command to configure the memory interleaving mode. 65*4882a593Smuzhiyun Either numerical or string value is accepted. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun # disable memory controller interleaving 68*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=null" 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun # cacheline interleaving 71*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=cacheline" 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun # page interleaving 74*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=page" 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun # bank interleaving 77*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=bank" 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun # superbank 80*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=superbank" 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun # 1KB 3-way interleaving 83*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=3way_1KB" 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun # 4KB 3-way interleaving 86*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=3way_4KB" 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun # 8KB 3-way interleaving 89*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:ctlr_intlv=3way_8KB" 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun # disable bank (chip-select) interleaving 92*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=null" 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun # bank(chip-select) interleaving cs0+cs1 95*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1" 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun # bank(chip-select) interleaving cs2+cs3 98*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=cs2_cs3" 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun # bank(chip-select) interleaving (cs0+cs1) and (cs2+cs3) (2x2) 101*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_and_cs2_cs3" 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun # bank(chip-select) interleaving (cs0+cs1+cs2+cs3) (4x1) 104*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_cs2_cs3" 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun # bank(chip-select) interleaving (auto) 107*4882a593Smuzhiyun setenv hwconfig "fsl_ddr:bank_intlv=auto" 108*4882a593Smuzhiyun This auto mode only select from cs0_cs1_cs2_cs3, cs0_cs1, null dependings 109*4882a593Smuzhiyun on DIMMs. 110*4882a593Smuzhiyun 111*4882a593SmuzhiyunMemory controller address hashing 112*4882a593Smuzhiyun================================== 113*4882a593SmuzhiyunIf the DDR controller supports address hashing, it can be enabled by hwconfig. 114*4882a593Smuzhiyun 115*4882a593SmuzhiyunSyntax is: 116*4882a593Smuzhiyunhwconfig=fsl_ddr:addr_hash=true 117*4882a593Smuzhiyun 118*4882a593SmuzhiyunMemory controller ECC on/off 119*4882a593Smuzhiyun============================ 120*4882a593SmuzhiyunIf ECC is enabled in board configuratoin file, i.e. #define CONFIG_DDR_ECC, 121*4882a593SmuzhiyunECC can be turned on/off by hwconfig. 122*4882a593Smuzhiyun 123*4882a593SmuzhiyunSyntax is 124*4882a593Smuzhiyunhwconfig=fsl_ddr:ecc=off 125*4882a593Smuzhiyun 126*4882a593Smuzhiyun 127*4882a593SmuzhiyunMemory address parity on/off 128*4882a593Smuzhiyun============================ 129*4882a593Smuzhiyunaddress parity can be turned on/off by hwconfig. 130*4882a593SmuzhiyunSyntax is: 131*4882a593Smuzhiyunhwconfig=fsl_ddr:parity=on 132*4882a593Smuzhiyun 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunMemory testing options for mpc85xx 135*4882a593Smuzhiyun================================== 136*4882a593Smuzhiyun1. Memory test can be done once U-Boot prompt comes up using mtest, or 137*4882a593Smuzhiyun2. Memory test can be done with Power-On-Self-Test function, activated at 138*4882a593Smuzhiyun compile time. 139*4882a593Smuzhiyun 140*4882a593Smuzhiyun In order to enable the POST memory test, CONFIG_POST needs to be 141*4882a593Smuzhiyun defined in board configuraiton header file. By default, POST memory test 142*4882a593Smuzhiyun performs a fast test. A slow test can be enabled by changing the flag at 143*4882a593Smuzhiyun compiling time. To test memory bigger than 2GB, 36BIT support is needed. 144*4882a593Smuzhiyun Memory is tested within a 2GB window. TLBs are used to map the virtual 2GB 145*4882a593Smuzhiyun window to physical address so that all physical memory can be tested. 146*4882a593Smuzhiyun 147*4882a593SmuzhiyunCombination of hwconfig 148*4882a593Smuzhiyun======================= 149*4882a593SmuzhiyunHwconfig can be combined with multiple parameters, for example, on a supported 150*4882a593Smuzhiyunplatform 151*4882a593Smuzhiyun 152*4882a593Smuzhiyunhwconfig=fsl_ddr:addr_hash=true,ctlr_intlv=cacheline,bank_intlv=cs0_cs1_cs2_cs3,ecc=on 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun 155*4882a593SmuzhiyunTable for dynamic ODT for DDR3 156*4882a593Smuzhiyun============================== 157*4882a593SmuzhiyunFor single-slot system with quad-rank DIMM and dual-slot system, dynamic ODT may 158*4882a593Smuzhiyunbe needed, depending on the configuration. The numbers in the following tables are 159*4882a593Smuzhiyunin Ohms. 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun* denotes dynamic ODT 162*4882a593Smuzhiyun 163*4882a593SmuzhiyunTwo slots system 164*4882a593Smuzhiyun+-----------------------+----------+---------------+-----------------------------+-----------------------------+ 165*4882a593Smuzhiyun| Configuration | |DRAM controller| Slot 1 | Slot 2 | 166*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+ 167*4882a593Smuzhiyun| | | | | | Rank 1 | Rank 2 | Rank 1 | Rank 2 | 168*4882a593Smuzhiyun+ Slot 1 | Slot 2 |Write/Read| Write | Read |-------+------+-------+------+-------+------+-------+------+ 169*4882a593Smuzhiyun| | | | | | Write | Read | Write | Read | Write | Read | Write | Read | 170*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 171*4882a593Smuzhiyun| | | Slot 1 | off | 75 | 120 | off | off | off | off | off | 30 | 30 | 172*4882a593Smuzhiyun| Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 173*4882a593Smuzhiyun| | | Slot 2 | off | 75 | off | off | 30 | 30 | 120 | off | off | off | 174*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 175*4882a593Smuzhiyun| | | Slot 1 | off | 75 | 120 | off | off | off | 20 | 20 | | | 176*4882a593Smuzhiyun| Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 177*4882a593Smuzhiyun| | | Slot 2 | off | 75 | off | off | 20 | 20 | 120 *| off | | | 178*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 179*4882a593Smuzhiyun| | | Slot 1 | off | 75 | 120 *| off | | | off | off | 20 | 20 | 180*4882a593Smuzhiyun|Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 181*4882a593Smuzhiyun| | | Slot 2 | off | 75 | 20 | 20 | | | 120 | off | off | off | 182*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 183*4882a593Smuzhiyun| | | Slot 1 | off | 75 | 120 *| off | | | 30 | 30 | | | 184*4882a593Smuzhiyun|Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 185*4882a593Smuzhiyun| | | Slot 2 | off | 75 | 30 | 30 | | | 120 *| off | | | 186*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 187*4882a593Smuzhiyun| Dual Rank | Empty | Slot 1 | off | 75 | 40 | off | off | off | | | | | 188*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 189*4882a593Smuzhiyun| Empty | Dual Rank | Slot 2 | off | 75 | | | | | 40 | off | off | off | 190*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 191*4882a593Smuzhiyun|Single Rank| Empty | Slot 1 | off | 75 | 40 | off | | | | | | | 192*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 193*4882a593Smuzhiyun| Empty |Single Rank| Slot 2 | off | 75 | | | | | 40 | off | | | 194*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 195*4882a593Smuzhiyun 196*4882a593SmuzhiyunSingle slot system 197*4882a593Smuzhiyun+-------------+------------+---------------+-----------------------------+-----------------------------+ 198*4882a593Smuzhiyun| | |DRAM controller| Rank 1 | Rank 2 | Rank 3 | Rank 4 | 199*4882a593Smuzhiyun|Configuration| Write/Read |-------+-------+-------+------+-------+------+-------+------+-------+------+ 200*4882a593Smuzhiyun| | | Write | Read | Write | Read | Write | Read | Write | Read | Write | Read | 201*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 202*4882a593Smuzhiyun| | R1 | off | 75 | 120 *| off | off | off | 20 | 20 | off | off | 203*4882a593Smuzhiyun| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 204*4882a593Smuzhiyun| | R2 | off | 75 | off | 20 | 120 | off | 20 | 20 | off | off | 205*4882a593Smuzhiyun| Quad Rank |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 206*4882a593Smuzhiyun| | R3 | off | 75 | 20 | 20 | off | off | 120 *| off | off | off | 207*4882a593Smuzhiyun| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 208*4882a593Smuzhiyun| | R4 | off | 75 | 20 | 20 | off | off | off | 20 | 120 | off | 209*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 210*4882a593Smuzhiyun| | R1 | off | 75 | 40 | off | off | off | 211*4882a593Smuzhiyun| Dual Rank |------------+-------+-------+-------+------+-------+------+ 212*4882a593Smuzhiyun| | R2 | off | 75 | 40 | off | off | off | 213*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+-------+------+ 214*4882a593Smuzhiyun| Single Rank | R1 | off | 75 | 40 | off | 215*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+ 216*4882a593Smuzhiyun 217*4882a593SmuzhiyunReference http://www.xrosstalkmag.com/mag_issues/xrosstalk_oct08_final.pdf 218*4882a593Smuzhiyun http://download.micron.com/pdf/technotes/ddr3/tn4108_ddr3_design_guide.pdf 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun 221*4882a593SmuzhiyunTable for ODT for DDR2 222*4882a593Smuzhiyun====================== 223*4882a593SmuzhiyunTwo slots system 224*4882a593Smuzhiyun+-----------------------+----------+---------------+-----------------------------+-----------------------------+ 225*4882a593Smuzhiyun| Configuration | |DRAM controller| Slot 1 | Slot 2 | 226*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+ 227*4882a593Smuzhiyun| | | | | | Rank 1 | Rank 2 | Rank 1 | Rank 2 | 228*4882a593Smuzhiyun+ Slot 1 | Slot 2 |Write/Read| Write | Read |-------+------+-------+------+-------+------+-------+------+ 229*4882a593Smuzhiyun| | | | | | Write | Read | Write | Read | Write | Read | Write | Read | 230*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 231*4882a593Smuzhiyun| | | Slot 1 | off | 150 | off | off | off | off | 75 | 75 | off | off | 232*4882a593Smuzhiyun| Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 233*4882a593Smuzhiyun| | | Slot 2 | off | 150 | 75 | 75 | off | off | off | off | off | off | 234*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 235*4882a593Smuzhiyun| | | Slot 1 | off | 150 | off | off | off | off | 75 | 75 | | | 236*4882a593Smuzhiyun| Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 237*4882a593Smuzhiyun| | | Slot 2 | off | 150 | 75 | 75 | off | off | off | off | | | 238*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 239*4882a593Smuzhiyun| | | Slot 1 | off | 150 | off | off | | | 75 | 75 | off | off | 240*4882a593Smuzhiyun|Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 241*4882a593Smuzhiyun| | | Slot 2 | off | 150 | 75 | 75 | | | off | off | off | off | 242*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 243*4882a593Smuzhiyun| | | Slot 1 | off | 150 | off | off | | | 75 | 75 | | | 244*4882a593Smuzhiyun|Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 245*4882a593Smuzhiyun| | | Slot 2 | off | 150 | 75 | 75 | | | off | off | | | 246*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 247*4882a593Smuzhiyun| Dual Rank | Empty | Slot 1 | off | 75 | 150 | off | off | off | | | | | 248*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 249*4882a593Smuzhiyun| Empty | Dual Rank | Slot 2 | off | 75 | | | | | 150 | off | off | off | 250*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 251*4882a593Smuzhiyun|Single Rank| Empty | Slot 1 | off | 75 | 150 | off | | | | | | | 252*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 253*4882a593Smuzhiyun| Empty |Single Rank| Slot 2 | off | 75 | | | | | 150 | off | | | 254*4882a593Smuzhiyun+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ 255*4882a593Smuzhiyun 256*4882a593SmuzhiyunSingle slot system 257*4882a593Smuzhiyun+-------------+------------+---------------+-----------------------------+ 258*4882a593Smuzhiyun| | |DRAM controller| Rank 1 | Rank 2 | 259*4882a593Smuzhiyun|Configuration| Write/Read |-------+-------+-------+------+-------+------+ 260*4882a593Smuzhiyun| | | Write | Read | Write | Read | Write | Read | 261*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+-------+------+ 262*4882a593Smuzhiyun| | R1 | off | 75 | 150 | off | off | off | 263*4882a593Smuzhiyun| Dual Rank |------------+-------+-------+-------+------+-------+------+ 264*4882a593Smuzhiyun| | R2 | off | 75 | 150 | off | off | off | 265*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+-------+------+ 266*4882a593Smuzhiyun| Single Rank | R1 | off | 75 | 150 | off | 267*4882a593Smuzhiyun+-------------+------------+-------+-------+-------+------+ 268*4882a593Smuzhiyun 269*4882a593SmuzhiyunReference http://www.samsung.com/global/business/semiconductor/products/dram/downloads/applicationnote/ddr2_odt_control_200603.pdf 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun 272*4882a593SmuzhiyunInteractive DDR debugging 273*4882a593Smuzhiyun=========================== 274*4882a593Smuzhiyun 275*4882a593SmuzhiyunFor DDR parameter tuning up and debugging, the interactive DDR debugger can 276*4882a593Smuzhiyunbe activated by setting the environment variable "ddr_interactive" to any 277*4882a593Smuzhiyunvalue. (The value of ddr_interactive may have a meaning in the future, but, 278*4882a593Smuzhiyunfor now, the presence of the variable will cause the debugger to run.) Once 279*4882a593Smuzhiyunactivated, U-Boot will show the prompt "FSL DDR>" before enabling the DDR 280*4882a593Smuzhiyuncontroller. The available commands are printed by typing "help". 281*4882a593Smuzhiyun 282*4882a593SmuzhiyunAnother way to enter the interactive DDR debugger without setting the 283*4882a593Smuzhiyunenvironment variable is to send the 'd' character early during the boot 284*4882a593Smuzhiyunprocess. To save booting time, no additional delay is added, so the window 285*4882a593Smuzhiyunto send the key press is very short -- basically, it is the time before the 286*4882a593Smuzhiyunmemory controller code starts to run. For example, when rebooting from 287*4882a593Smuzhiyunwithin U-Boot, the user must press 'd' IMMEDIATELY after hitting enter to 288*4882a593Smuzhiyuninitiate a 'reset' command. In case of power on/reset, the user can hold 289*4882a593Smuzhiyundown the 'd' key while applying power or hitting the board's reset button. 290*4882a593Smuzhiyun 291*4882a593SmuzhiyunThe example flow of using interactive debugging is 292*4882a593Smuzhiyuntype command "compute" to calculate the parameters from the default 293*4882a593Smuzhiyuntype command "print" with arguments to show SPD, options, registers 294*4882a593Smuzhiyuntype command "edit" with arguments to change any if desired 295*4882a593Smuzhiyuntype command "copy" with arguments to copy controller/dimm settings 296*4882a593Smuzhiyuntype command "go" to continue calculation and enable DDR controller 297*4882a593Smuzhiyun 298*4882a593SmuzhiyunAdditional commands to restart the debugging are: 299*4882a593Smuzhiyuntype command "reset" to reset the board 300*4882a593Smuzhiyuntype command "recompute" to reload SPD and start over 301*4882a593Smuzhiyun 302*4882a593SmuzhiyunNote, check "next_step" to show the flow. For example, after edit opts, the 303*4882a593Smuzhiyunnext_step is STEP_ASSIGN_ADDRESSES. After editing registers, the next_step is 304*4882a593SmuzhiyunSTEP_PROGRAM_REGS. Upon issuing command "go", the debugger will program the 305*4882a593SmuzhiyunDDR controller with the current setting without further calculation and then 306*4882a593Smuzhiyunexit to resume the booting of the machine. 307*4882a593Smuzhiyun 308*4882a593SmuzhiyunThe detail syntax for each commands are 309*4882a593Smuzhiyun 310*4882a593Smuzhiyunprint [c<n>] [d<n>] [spd] [dimmparms] [commonparms] [opts] [addresses] [regs] 311*4882a593Smuzhiyun c<n> - the controller number, eg. c0, c1 312*4882a593Smuzhiyun d<n> - the DIMM number, eg. d0, d1 313*4882a593Smuzhiyun spd - print SPD data 314*4882a593Smuzhiyun dimmparms - DIMM parameters, calculated from SPD 315*4882a593Smuzhiyun commonparms - lowest common parameters for all DIMMs 316*4882a593Smuzhiyun opts - options 317*4882a593Smuzhiyun addresses - address assignment (not implemented yet) 318*4882a593Smuzhiyun regs - controller registers 319*4882a593Smuzhiyun 320*4882a593Smuzhiyunedit <c#> <d#> <spd|dimmparms|commonparms|opts|addresses|regs> <element> <value> 321*4882a593Smuzhiyun c<n> - the controller number, eg. c0, c1 322*4882a593Smuzhiyun d<n> - the DIMM number, eg. d0, d1 323*4882a593Smuzhiyun spd - print SPD data 324*4882a593Smuzhiyun dimmparms - DIMM parameters, calculated from SPD 325*4882a593Smuzhiyun commonparms - lowest common parameters for all DIMMs 326*4882a593Smuzhiyun opts - options 327*4882a593Smuzhiyun addresses - address assignment (not implemented yet) 328*4882a593Smuzhiyun regs - controller registers 329*4882a593Smuzhiyun <element> - name of the modified element 330*4882a593Smuzhiyun byte number if the object is SPD 331*4882a593Smuzhiyun <value> - decimal or heximal (prefixed with 0x) numbers 332*4882a593Smuzhiyun 333*4882a593Smuzhiyuncopy <src c#> <src d#> <spd|dimmparms|commonparms|opts|addresses|regs> <dst c#> <dst d#> 334*4882a593Smuzhiyun same as for "edit" command 335*4882a593Smuzhiyun DIMM numbers ignored for commonparms, opts, and regs 336*4882a593Smuzhiyun 337*4882a593Smuzhiyunreset 338*4882a593Smuzhiyun no arguement - reset the board 339*4882a593Smuzhiyun 340*4882a593Smuzhiyunrecompute 341*4882a593Smuzhiyun no argument - reload SPD and start over 342*4882a593Smuzhiyun 343*4882a593Smuzhiyuncompute 344*4882a593Smuzhiyun no argument - recompute from current next_step 345*4882a593Smuzhiyun 346*4882a593Smuzhiyunnext_step 347*4882a593Smuzhiyun no argument - show current next_step 348*4882a593Smuzhiyun 349*4882a593Smuzhiyunhelp 350*4882a593Smuzhiyun no argument - print a list of all commands 351*4882a593Smuzhiyun 352*4882a593Smuzhiyungo 353*4882a593Smuzhiyun no argument - program memory controller(s) and continue with U-Boot 354*4882a593Smuzhiyun 355*4882a593SmuzhiyunExamples of debugging flow 356*4882a593Smuzhiyun 357*4882a593Smuzhiyun FSL DDR>compute 358*4882a593Smuzhiyun Detected UDIMM UG51U6400N8SU-ACF 359*4882a593Smuzhiyun FSL DDR>print 360*4882a593Smuzhiyun print [c<n>] [d<n>] [spd] [dimmparms] [commonparms] [opts] [addresses] [regs] 361*4882a593Smuzhiyun FSL DDR>print dimmparms 362*4882a593Smuzhiyun DIMM parameters: Controller=0 DIMM=0 363*4882a593Smuzhiyun DIMM organization parameters: 364*4882a593Smuzhiyun module part name = UG51U6400N8SU-ACF 365*4882a593Smuzhiyun rank_density = 2147483648 bytes (2048 megabytes) 366*4882a593Smuzhiyun capacity = 4294967296 bytes (4096 megabytes) 367*4882a593Smuzhiyun burst_lengths_bitmask = 0C 368*4882a593Smuzhiyun base_addresss = 0 (00000000 00000000) 369*4882a593Smuzhiyun n_ranks = 2 370*4882a593Smuzhiyun data_width = 64 371*4882a593Smuzhiyun primary_sdram_width = 64 372*4882a593Smuzhiyun ec_sdram_width = 0 373*4882a593Smuzhiyun registered_dimm = 0 374*4882a593Smuzhiyun n_row_addr = 15 375*4882a593Smuzhiyun n_col_addr = 10 376*4882a593Smuzhiyun edc_config = 0 377*4882a593Smuzhiyun n_banks_per_sdram_device = 8 378*4882a593Smuzhiyun tCKmin_X_ps = 1500 379*4882a593Smuzhiyun tCKmin_X_minus_1_ps = 0 380*4882a593Smuzhiyun tCKmin_X_minus_2_ps = 0 381*4882a593Smuzhiyun tCKmax_ps = 0 382*4882a593Smuzhiyun caslat_X = 960 383*4882a593Smuzhiyun tAA_ps = 13125 384*4882a593Smuzhiyun caslat_X_minus_1 = 0 385*4882a593Smuzhiyun caslat_X_minus_2 = 0 386*4882a593Smuzhiyun caslat_lowest_derated = 0 387*4882a593Smuzhiyun tRCD_ps = 13125 388*4882a593Smuzhiyun tRP_ps = 13125 389*4882a593Smuzhiyun tRAS_ps = 36000 390*4882a593Smuzhiyun tWR_ps = 15000 391*4882a593Smuzhiyun tWTR_ps = 7500 392*4882a593Smuzhiyun tRFC_ps = 160000 393*4882a593Smuzhiyun tRRD_ps = 6000 394*4882a593Smuzhiyun tRC_ps = 49125 395*4882a593Smuzhiyun refresh_rate_ps = 7800000 396*4882a593Smuzhiyun tIS_ps = 0 397*4882a593Smuzhiyun tIH_ps = 0 398*4882a593Smuzhiyun tDS_ps = 0 399*4882a593Smuzhiyun tDH_ps = 0 400*4882a593Smuzhiyun tRTP_ps = 7500 401*4882a593Smuzhiyun tDQSQ_max_ps = 0 402*4882a593Smuzhiyun tQHS_ps = 0 403*4882a593Smuzhiyun FSL DDR>edit c0 opts ECC_mode 0 404*4882a593Smuzhiyun FSL DDR>edit c0 regs cs0_bnds 0x000000FF 405*4882a593Smuzhiyun FSL DDR>go 406*4882a593Smuzhiyun 2 GiB left unmapped 407*4882a593Smuzhiyun 4 GiB (DDR3, 64-bit, CL=9, ECC off) 408*4882a593Smuzhiyun DDR Chip-Select Interleaving Mode: CS0+CS1 409*4882a593Smuzhiyun Testing 0x00000000 - 0x7fffffff 410*4882a593Smuzhiyun Testing 0x80000000 - 0xffffffff 411*4882a593Smuzhiyun Remap DDR 2 GiB left unmapped 412*4882a593Smuzhiyun 413*4882a593Smuzhiyun POST memory PASSED 414*4882a593Smuzhiyun Flash: 128 MiB 415*4882a593Smuzhiyun L2: 128 KB enabled 416*4882a593Smuzhiyun Corenet Platform Cache: 1024 KB enabled 417*4882a593Smuzhiyun SERDES: timeout resetting bank 3 418*4882a593Smuzhiyun SRIO1: disabled 419*4882a593Smuzhiyun SRIO2: disabled 420*4882a593Smuzhiyun MMC: FSL_ESDHC: 0 421*4882a593Smuzhiyun EEPROM: Invalid ID (ff ff ff ff) 422*4882a593Smuzhiyun PCIe1: disabled 423*4882a593Smuzhiyun PCIe2: Root Complex, x1, regs @ 0xfe201000 424*4882a593Smuzhiyun 01:00.0 - 8086:10d3 - Network controller 425*4882a593Smuzhiyun PCIe2: Bus 00 - 01 426*4882a593Smuzhiyun PCIe3: disabled 427*4882a593Smuzhiyun In: serial 428*4882a593Smuzhiyun Out: serial 429*4882a593Smuzhiyun Err: serial 430*4882a593Smuzhiyun Net: Initializing Fman 431*4882a593Smuzhiyun Fman1: Uploading microcode version 101.8.0 432*4882a593Smuzhiyun e1000: 00:1b:21:81:d2:e0 433*4882a593Smuzhiyun FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5, e1000#0 [PRIME] 434*4882a593Smuzhiyun Warning: e1000#0 MAC addresses don't match: 435*4882a593Smuzhiyun Address in SROM is 00:1b:21:81:d2:e0 436*4882a593Smuzhiyun Address in environment is 00:e0:0c:00:ea:05 437*4882a593Smuzhiyun 438*4882a593Smuzhiyun Hit any key to stop autoboot: 0 439*4882a593Smuzhiyun => 440