blob: c1ee0a68a8b4ad732a7cea316f2d12d09c97ed32 [file] [log] [blame]
Haiying Wangc9ffd832008-10-03 12:37:10 -04001
2Table of interleaving modes supported in cpu/8xxx/ddr/
3======================================================
4 +-------------+---------------------------------------------------------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +01005 | | Rank Interleaving |
6 | +--------+-----------+-----------+------------+-----------+
7 |Memory | | | | 2x2 | 4x1 |
8 |Controller | None | 2x1 lower | 2x1 upper | {CS0+CS1}, | {CS0+CS1+ |
9 |Interleaving | | {CS0+CS1} | {CS2+CS3} | {CS2+CS3} | CS2+CS3} |
Haiying Wangc9ffd832008-10-03 12:37:10 -040010 +-------------+--------+-----------+-----------+------------+-----------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +010011 |None | Yes | Yes | Yes | Yes | Yes |
Haiying Wangc9ffd832008-10-03 12:37:10 -040012 +-------------+--------+-----------+-----------+------------+-----------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +010013 |Cacheline | Yes | Yes | No | No, Only(*)| Yes |
14 | |CS0 Only| | | {CS0+CS1} | |
Haiying Wangc9ffd832008-10-03 12:37:10 -040015 +-------------+--------+-----------+-----------+------------+-----------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +010016 |Page | Yes | Yes | No | No, Only(*)| Yes |
17 | |CS0 Only| | | {CS0+CS1} | |
Haiying Wangc9ffd832008-10-03 12:37:10 -040018 +-------------+--------+-----------+-----------+------------+-----------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +010019 |Bank | Yes | Yes | No | No, Only(*)| Yes |
20 | |CS0 Only| | | {CS0+CS1} | |
Haiying Wangc9ffd832008-10-03 12:37:10 -040021 +-------------+--------+-----------+-----------+------------+-----------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +010022 |Superbank | No | Yes | No | No, Only(*)| Yes |
23 | | | | | {CS0+CS1} | |
Haiying Wangc9ffd832008-10-03 12:37:10 -040024 +-------------+--------+-----------+-----------+------------+-----------+
25 (*) Although the hardware can be configured with memory controller
26 interleaving using "2x2" rank interleaving, it only interleaves {CS0+CS1}
27 from each controller. {CS2+CS3} on each controller are only rank
28 interleaved on that controller.
29
york076bff82010-07-02 22:25:52 +000030 For memory controller interleaving, identical DIMMs are suggested. Software
31 doesn't check the size or organization of interleaved DIMMs.
32
Haiying Wangc9ffd832008-10-03 12:37:10 -040033The ways to configure the ddr interleaving mode
34==============================================
351. In board header file(e.g.MPC8572DS.h), add default interleaving setting
36 under "CONFIG_EXTRA_ENV_SETTINGS", like:
37 #define CONFIG_EXTRA_ENV_SETTINGS \
Kumar Gala79e4e642010-07-14 10:04:21 -050038 "hwconfig=fsl_ddr:ctlr_intlv=bank" \
Haiying Wangc9ffd832008-10-03 12:37:10 -040039 ......
40
412. Run u-boot "setenv" command to configure the memory interleaving mode.
42 Either numerical or string value is accepted.
43
44 # disable memory controller interleaving
Kumar Gala79e4e642010-07-14 10:04:21 -050045 setenv hwconfig "fsl_ddr:ctlr_intlv=null"
Haiying Wangc9ffd832008-10-03 12:37:10 -040046
47 # cacheline interleaving
Kumar Gala79e4e642010-07-14 10:04:21 -050048 setenv hwconfig "fsl_ddr:ctlr_intlv=cacheline"
Haiying Wangc9ffd832008-10-03 12:37:10 -040049
50 # page interleaving
Kumar Gala79e4e642010-07-14 10:04:21 -050051 setenv hwconfig "fsl_ddr:ctlr_intlv=page"
Haiying Wangc9ffd832008-10-03 12:37:10 -040052
53 # bank interleaving
Kumar Gala79e4e642010-07-14 10:04:21 -050054 setenv hwconfig "fsl_ddr:ctlr_intlv=bank"
Haiying Wangc9ffd832008-10-03 12:37:10 -040055
56 # superbank
Kumar Gala79e4e642010-07-14 10:04:21 -050057 setenv hwconfig "fsl_ddr:ctlr_intlv=superbank"
Haiying Wangc9ffd832008-10-03 12:37:10 -040058
59 # disable bank (chip-select) interleaving
Kumar Gala79e4e642010-07-14 10:04:21 -050060 setenv hwconfig "fsl_ddr:bank_intlv=null"
Haiying Wangc9ffd832008-10-03 12:37:10 -040061
62 # bank(chip-select) interleaving cs0+cs1
Kumar Gala79e4e642010-07-14 10:04:21 -050063 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1"
Haiying Wangc9ffd832008-10-03 12:37:10 -040064
65 # bank(chip-select) interleaving cs2+cs3
Kumar Gala79e4e642010-07-14 10:04:21 -050066 setenv hwconfig "fsl_ddr:bank_intlv=cs2_cs3"
Haiying Wangc9ffd832008-10-03 12:37:10 -040067
68 # bank(chip-select) interleaving (cs0+cs1) and (cs2+cs3) (2x2)
Kumar Gala79e4e642010-07-14 10:04:21 -050069 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_and_cs2_cs3"
Haiying Wangc9ffd832008-10-03 12:37:10 -040070
71 # bank(chip-select) interleaving (cs0+cs1+cs2+cs3) (4x1)
Kumar Gala79e4e642010-07-14 10:04:21 -050072 setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_cs2_cs3"
73
york7fd101c2010-07-02 22:25:54 +000074Memory controller address hashing
75==================================
76If the DDR controller supports address hashing, it can be enabled by hwconfig.
77
78Syntax is:
79hwconfig=fsl_ddr:addr_hash=true
80
York Sun47df8f02011-01-10 12:02:57 +000081Memory controller ECC on/off
82============================
83If ECC is enabled in board configuratoin file, i.e. #define CONFIG_DDR_ECC,
84ECC can be turned on/off by hwconfig.
85
86Syntax is
87hwconfig=fsl_ddr:ecc=off
York Sunebbe11d2010-09-28 15:20:33 -070088
89Memory testing options for mpc85xx
90==================================
911. Memory test can be done once U-boot prompt comes up using mtest, or
922. Memory test can be done with Power-On-Self-Test function, activated at
93 compile time.
94
95 In order to enable the POST memory test, CONFIG_POST needs to be
96 defined in board configuraiton header file. By default, POST memory test
97 performs a fast test. A slow test can be enabled by changing the flag at
98 compiling time. To test memory bigger than 2GB, 36BIT support is needed.
99 Memory is tested within a 2GB window. TLBs are used to map the virtual 2GB
100 window to physical address so that all physical memory can be tested.
101
york7fd101c2010-07-02 22:25:54 +0000102Combination of hwconfig
103=======================
104Hwconfig can be combined with multiple parameters, for example, on a supported
105platform
106
York Sune1fd16b2011-01-10 12:03:00 +0000107hwconfig=fsl_ddr:addr_hash=true,ctlr_intlv=cacheline,bank_intlv=cs0_cs1_cs2_cs3,ecc=on
108
109Table for dynamic ODT for DDR3
110==============================
111For single-slot system with quad-rank DIMM and dual-slot system, dynamic ODT may
112be needed, depending on the configuration. The numbers in the following tables are
113in Ohms.
114
115* denotes dynamic ODT
116
117Two slots system
118+-----------------------+----------+---------------+-----------------------------+-----------------------------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100119| Configuration | |DRAM controller| Slot 1 | Slot 2 |
York Sune1fd16b2011-01-10 12:03:00 +0000120+-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100121| | | | | | Rank 1 | Rank 2 | Rank 1 | Rank 2 |
122+ Slot 1 | Slot 2 |Write/Read| Write | Read |-------+------+-------+------+-------+------+-------+------+
123| | | | | | Write | Read | Write | Read | Write | Read | Write | Read |
York Sune1fd16b2011-01-10 12:03:00 +0000124+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100125| | | Slot 1 | off | 75 | 120 | off | off | off | off | off | 30 | 30 |
York Sune1fd16b2011-01-10 12:03:00 +0000126| Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100127| | | Slot 2 | off | 75 | off | off | 30 | 30 | 120 | off | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000128+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100129| | | Slot 1 | off | 75 | 120 | off | off | off | 20 | 20 | | |
York Sune1fd16b2011-01-10 12:03:00 +0000130| Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100131| | | Slot 2 | off | 75 | off | off | 20 | 20 | 120 *| off | | |
York Sune1fd16b2011-01-10 12:03:00 +0000132+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100133| | | Slot 1 | off | 75 | 120 *| off | | | off | off | 20 | 20 |
York Sune1fd16b2011-01-10 12:03:00 +0000134|Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100135| | | Slot 2 | off | 75 | 20 | 20 | | | 120 | off | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000136+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100137| | | Slot 1 | off | 75 | 120 *| off | | | 30 | 30 | | |
York Sune1fd16b2011-01-10 12:03:00 +0000138|Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100139| | | Slot 2 | off | 75 | 30 | 30 | | | 120 *| off | | |
York Sune1fd16b2011-01-10 12:03:00 +0000140+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100141| Dual Rank | Empty | Slot 1 | off | 75 | 40 | off | off | off | | | | |
York Sune1fd16b2011-01-10 12:03:00 +0000142+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100143| Empty | Dual Rank | Slot 2 | off | 75 | | | | | 40 | off | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000144+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100145|Single Rank| Empty | Slot 1 | off | 75 | 40 | off | | | | | | |
York Sune1fd16b2011-01-10 12:03:00 +0000146+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100147| Empty |Single Rank| Slot 2 | off | 75 | | | | | 40 | off | | |
York Sune1fd16b2011-01-10 12:03:00 +0000148+-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
149
150Single slot system
151+-------------+------------+---------------+-----------------------------+-----------------------------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100152| | |DRAM controller| Rank 1 | Rank 2 | Rank 3 | Rank 4 |
York Sune1fd16b2011-01-10 12:03:00 +0000153|Configuration| Write/Read |-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100154| | | Write | Read | Write | Read | Write | Read | Write | Read | Write | Read |
York Sune1fd16b2011-01-10 12:03:00 +0000155+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100156| | R1 | off | 75 | 120 *| off | off | off | 20 | 20 | off | off |
157| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
158| | R2 | off | 75 | off | 20 | 120 | off | 20 | 20 | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000159| Quad Rank |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100160| | R3 | off | 75 | 20 | 20 | off | off | 120 *| off | off | off |
161| |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
162| | R4 | off | 75 | 20 | 20 | off | off | off | 20 | 120 | off |
York Sune1fd16b2011-01-10 12:03:00 +0000163+-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100164| | R1 | off | 75 | 40 | off | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000165| Dual Rank |------------+-------+-------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100166| | R2 | off | 75 | 40 | off | off | off |
York Sune1fd16b2011-01-10 12:03:00 +0000167+-------------+------------+-------+-------+-------+------+-------+------+
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100168| Single Rank | R1 | off | 75 | 40 | off |
York Sune1fd16b2011-01-10 12:03:00 +0000169+-------------+------------+-------+-------+-------+------+
170
171Reference http://www.xrosstalkmag.com/mag_issues/xrosstalk_oct08_final.pdf
Wolfgang Denkd1a24f02011-02-02 22:36:10 +0100172 http://download.micron.com/pdf/technotes/ddr3/tn4108_ddr3_design_guide.pdf