Blame view

doc/README.fsl-ddr 9.39 KB
c9ffd839b   Haiying Wang   Check DDR interle...
1
2
3
4
  
  Table of interleaving modes supported in cpu/8xxx/ddr/
  ======================================================
    +-------------+---------------------------------------------------------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
5
6
7
8
9
    |		|		    Rank Interleaving			  |
    |		+--------+-----------+-----------+------------+-----------+
    |Memory	|	 |	     |		 |    2x2     |    4x1	  |
    |Controller	|  None  | 2x1 lower | 2x1 upper | {CS0+CS1}, | {CS0+CS1+ |
    |Interleaving |	 | {CS0+CS1} | {CS2+CS3} | {CS2+CS3}  |  CS2+CS3} |
c9ffd839b   Haiying Wang   Check DDR interle...
10
    +-------------+--------+-----------+-----------+------------+-----------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
11
    |None		|  Yes	 | Yes	     | Yes	 | Yes	      | Yes	  |
c9ffd839b   Haiying Wang   Check DDR interle...
12
    +-------------+--------+-----------+-----------+------------+-----------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
13
14
    |Cacheline	|  Yes	 | Yes	     | No	 | No, Only(*)| Yes	  |
    |		|CS0 Only|	     |		 | {CS0+CS1}  |		  |
c9ffd839b   Haiying Wang   Check DDR interle...
15
    +-------------+--------+-----------+-----------+------------+-----------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
16
17
    |Page		|  Yes	 | Yes	     | No	 | No, Only(*)| Yes	  |
    |		|CS0 Only|	     |		 | {CS0+CS1}  |		  |
c9ffd839b   Haiying Wang   Check DDR interle...
18
    +-------------+--------+-----------+-----------+------------+-----------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
19
20
    |Bank		|  Yes	 | Yes	     | No	 | No, Only(*)| Yes	  |
    |		|CS0 Only|	     |		 | {CS0+CS1}  |		  |
c9ffd839b   Haiying Wang   Check DDR interle...
21
    +-------------+--------+-----------+-----------+------------+-----------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
22
23
    |Superbank	|  No	 | Yes	     | No	 | No, Only(*)| Yes	  |
    |		|	 |	     |		 | {CS0+CS1}  |		  |
c9ffd839b   Haiying Wang   Check DDR interle...
24
25
26
27
28
    +-------------+--------+-----------+-----------+------------+-----------+
   (*) Although the hardware can be configured with memory controller
   interleaving using "2x2" rank interleaving, it only interleaves {CS0+CS1}
   from each controller. {CS2+CS3} on each controller are only rank
   interleaved on that controller.
076bff8f4   york   powerpc/8xxx: Fix...
29
30
   For memory controller interleaving, identical DIMMs are suggested. Software
   doesn't check the size or organization of interleaved DIMMs.
c9ffd839b   Haiying Wang   Check DDR interle...
31
32
33
34
35
  The ways to configure the ddr interleaving mode
  ==============================================
  1. In board header file(e.g.MPC8572DS.h), add default interleaving setting
     under "CONFIG_EXTRA_ENV_SETTINGS", like:
  	#define CONFIG_EXTRA_ENV_SETTINGS				\
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
36
  	 "hwconfig=fsl_ddr:ctlr_intlv=bank"			\
c9ffd839b   Haiying Wang   Check DDR interle...
37
38
39
40
41
42
  	 ......
  
  2. Run u-boot "setenv" command to configure the memory interleaving mode.
     Either numerical or string value is accepted.
  
    # disable memory controller interleaving
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
43
    setenv hwconfig "fsl_ddr:ctlr_intlv=null"
c9ffd839b   Haiying Wang   Check DDR interle...
44
45
  
    # cacheline interleaving
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
46
    setenv hwconfig "fsl_ddr:ctlr_intlv=cacheline"
c9ffd839b   Haiying Wang   Check DDR interle...
47
48
  
    # page interleaving
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
49
    setenv hwconfig "fsl_ddr:ctlr_intlv=page"
c9ffd839b   Haiying Wang   Check DDR interle...
50
51
  
    # bank interleaving
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
52
    setenv hwconfig "fsl_ddr:ctlr_intlv=bank"
c9ffd839b   Haiying Wang   Check DDR interle...
53
54
  
    # superbank
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
55
    setenv hwconfig "fsl_ddr:ctlr_intlv=superbank"
c9ffd839b   Haiying Wang   Check DDR interle...
56
57
  
    # disable bank (chip-select) interleaving
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
58
    setenv hwconfig "fsl_ddr:bank_intlv=null"
c9ffd839b   Haiying Wang   Check DDR interle...
59
60
  
    # bank(chip-select) interleaving cs0+cs1
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
61
    setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1"
c9ffd839b   Haiying Wang   Check DDR interle...
62
63
  
    # bank(chip-select) interleaving cs2+cs3
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
64
    setenv hwconfig "fsl_ddr:bank_intlv=cs2_cs3"
c9ffd839b   Haiying Wang   Check DDR interle...
65
66
  
    # bank(chip-select) interleaving (cs0+cs1) and (cs2+cs3)  (2x2)
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
67
    setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_and_cs2_cs3"
c9ffd839b   Haiying Wang   Check DDR interle...
68
69
  
    # bank(chip-select) interleaving (cs0+cs1+cs2+cs3) (4x1)
79e4e6480   Kumar Gala   powerpc/8xxx: Ena...
70
    setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_cs2_cs3"
7fd101c97   york   powerpc/8xxx: Ena...
71
72
73
74
75
76
  Memory controller address hashing
  ==================================
  If the DDR controller supports address hashing, it can be enabled by hwconfig.
  
  Syntax is:
  hwconfig=fsl_ddr:addr_hash=true
47df8f03f   York Sun   mpc8xxx: Enable E...
77
78
79
80
81
82
83
  Memory controller ECC on/off
  ============================
  If ECC is enabled in board configuratoin file, i.e. #define CONFIG_DDR_ECC,
  ECC can be turned on/off by hwconfig.
  
  Syntax is
  hwconfig=fsl_ddr:ecc=off
ebbe11dd3   York Sun   Add memory test f...
84
85
86
87
88
89
90
91
92
93
94
95
96
  
  Memory testing options for mpc85xx
  ==================================
  1. Memory test can be done once U-boot prompt comes up using mtest, or
  2. Memory test can be done with Power-On-Self-Test function, activated at
     compile time.
  
     In order to enable the POST memory test, CONFIG_POST needs to be
     defined in board configuraiton header file. By default, POST memory test
     performs a fast test. A slow test can be enabled by changing the flag at
     compiling time. To test memory bigger than 2GB, 36BIT support is needed.
     Memory is tested within a 2GB window. TLBs are used to map the virtual 2GB
     window to physical address so that all physical memory can be tested.
7fd101c97   york   powerpc/8xxx: Ena...
97
98
99
100
  Combination of hwconfig
  =======================
  Hwconfig can be combined with multiple parameters, for example, on a supported
  platform
e1fd16b6f   York Sun   mpc85xx: Enable u...
101
102
103
104
105
106
107
108
109
110
111
112
  hwconfig=fsl_ddr:addr_hash=true,ctlr_intlv=cacheline,bank_intlv=cs0_cs1_cs2_cs3,ecc=on
  
  Table for dynamic ODT for DDR3
  ==============================
  For single-slot system with quad-rank DIMM and dual-slot system, dynamic ODT may
  be needed, depending on the configuration. The numbers in the following tables are
  in Ohms.
  
  * denotes dynamic ODT
  
  Two slots system
  +-----------------------+----------+---------------+-----------------------------+-----------------------------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
113
  |     Configuration	|	   |DRAM controller|	       Slot 1		 |	      Slot 2	       |
e1fd16b6f   York Sun   mpc85xx: Enable u...
114
  +-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
115
116
117
  |	    |		|	   |	   |	   |	 Rank 1   |	Rank 2	 |   Rank 1	|    Rank 2    |
  +  Slot 1   |	Slot 2	|Write/Read| Write | Read  |-------+------+-------+------+-------+------+-------+------+
  |	    |		|	   |	   |	   | Write | Read | Write | Read | Write | Read | Write | Read |
e1fd16b6f   York Sun   mpc85xx: Enable u...
118
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
119
  |	    |		|  Slot 1  |  off  | 75    | 120   | off  | off   | off  | off	 | off	| 30	| 30   |
e1fd16b6f   York Sun   mpc85xx: Enable u...
120
  | Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
121
  |	    |		|  Slot 2  |  off  | 75    | off   | off  | 30	  | 30	 | 120	 | off	| off	| off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
122
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
123
  |	    |		|  Slot 1  |  off  | 75    | 120   | off  | off   | off  | 20	 | 20	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
124
  | Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
125
  |	    |		|  Slot 2  |  off  | 75    | off   | off  | 20	  | 20	 | 120	*| off	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
126
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
127
  |	    |		|  Slot 1  |  off  | 75    | 120  *| off  |	  |	 | off	 | off	| 20	| 20   |
e1fd16b6f   York Sun   mpc85xx: Enable u...
128
  |Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
129
  |	    |		|  Slot 2  |  off  | 75    | 20    | 20   |	  |	 | 120	 | off	| off	| off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
130
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
131
  |	    |		|  Slot 1  |  off  | 75    | 120  *| off  |	  |	 | 30	 | 30	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
132
  |Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
133
  |	    |		|  Slot 2  |  off  | 75    | 30    | 30   |	  |	 | 120	*| off	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
134
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
135
  | Dual Rank |	Empty	|  Slot 1  |  off  | 75    | 40    | off  | off   | off  |	 |	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
136
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
137
  |   Empty   | Dual Rank |  Slot 2  |  off  | 75    |	   |	  |	  |	 | 40	 | off	| off	| off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
138
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
139
  |Single Rank|	Empty	|  Slot 1  |  off  | 75    | 40    | off  |	  |	 |	 |	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
140
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
141
  |   Empty   |Single Rank|  Slot 2  |  off  | 75    |	   |	  |	  |	 | 40	 | off	|	|      |
e1fd16b6f   York Sun   mpc85xx: Enable u...
142
143
144
145
  +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+
  
  Single slot system
  +-------------+------------+---------------+-----------------------------+-----------------------------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
146
  |	      |		   |DRAM controller|	 Rank 1   |    Rank 2	 |    Rank 3	|    Rank 4    |
e1fd16b6f   York Sun   mpc85xx: Enable u...
147
  |Configuration| Write/Read |-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
148
  |	      |		   | Write | Read  | Write | Read | Write | Read | Write | Read | Write | Read |
e1fd16b6f   York Sun   mpc85xx: Enable u...
149
  +-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
150
151
152
  |	      |   R1	   | off   | 75    | 120  *| off  | off   | off  | 20	 | 20	| off	| off  |
  |	      |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
  |	      |   R2	   | off   | 75    | off   | 20   | 120   | off  | 20	 | 20	| off	| off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
153
  |  Quad Rank  |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
154
155
156
  |	      |   R3	   | off   | 75    | 20    | 20   | off   | off  | 120	*| off	| off	| off  |
  |	      |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
  |	      |   R4	   | off   | 75    | 20    | 20   | off   | off  | off	 | 20	| 120	| off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
157
  +-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
158
  |	      |   R1	   | off   | 75    | 40    | off  | off   | off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
159
  |  Dual Rank  |------------+-------+-------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
160
  |	      |   R2	   | off   | 75    | 40    | off  | off   | off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
161
  +-------------+------------+-------+-------+-------+------+-------+------+
d1a24f061   Wolfgang Denk   Minor Coding Styl...
162
  | Single Rank |   R1	   | off   | 75    | 40    | off  |
e1fd16b6f   York Sun   mpc85xx: Enable u...
163
164
165
  +-------------+------------+-------+-------+-------+------+
  
  Reference http://www.xrosstalkmag.com/mag_issues/xrosstalk_oct08_final.pdf
d1a24f061   Wolfgang Denk   Minor Coding Styl...
166
  	  http://download.micron.com/pdf/technotes/ddr3/tn4108_ddr3_design_guide.pdf