Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 1 | |
| 2 | Table of interleaving modes supported in cpu/8xxx/ddr/ |
| 3 | ====================================================== |
| 4 | +-------------+---------------------------------------------------------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 5 | | | 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 Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 10 | +-------------+--------+-----------+-----------+------------+-----------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 11 | |None | Yes | Yes | Yes | Yes | Yes | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 12 | +-------------+--------+-----------+-----------+------------+-----------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 13 | |Cacheline | Yes | Yes | No | No, Only(*)| Yes | |
| 14 | | |CS0 Only| | | {CS0+CS1} | | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 15 | +-------------+--------+-----------+-----------+------------+-----------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 16 | |Page | Yes | Yes | No | No, Only(*)| Yes | |
| 17 | | |CS0 Only| | | {CS0+CS1} | | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 18 | +-------------+--------+-----------+-----------+------------+-----------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 19 | |Bank | Yes | Yes | No | No, Only(*)| Yes | |
| 20 | | |CS0 Only| | | {CS0+CS1} | | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 21 | +-------------+--------+-----------+-----------+------------+-----------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 22 | |Superbank | No | Yes | No | No, Only(*)| Yes | |
| 23 | | | | | | {CS0+CS1} | | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 24 | +-------------+--------+-----------+-----------+------------+-----------+ |
| 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 | |
york | 93799ca | 2010-07-02 22:25:52 +0000 | [diff] [blame] | 30 | For memory controller interleaving, identical DIMMs are suggested. Software |
| 31 | doesn't check the size or organization of interleaved DIMMs. |
| 32 | |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 33 | The ways to configure the ddr interleaving mode |
| 34 | ============================================== |
| 35 | 1. 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 Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 38 | "hwconfig=fsl_ddr:ctlr_intlv=bank" \ |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 39 | ...... |
| 40 | |
| 41 | 2. 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 Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 45 | setenv hwconfig "fsl_ddr:ctlr_intlv=null" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 46 | |
| 47 | # cacheline interleaving |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 48 | setenv hwconfig "fsl_ddr:ctlr_intlv=cacheline" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 49 | |
| 50 | # page interleaving |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 51 | setenv hwconfig "fsl_ddr:ctlr_intlv=page" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 52 | |
| 53 | # bank interleaving |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 54 | setenv hwconfig "fsl_ddr:ctlr_intlv=bank" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 55 | |
| 56 | # superbank |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 57 | setenv hwconfig "fsl_ddr:ctlr_intlv=superbank" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 58 | |
| 59 | # disable bank (chip-select) interleaving |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 60 | setenv hwconfig "fsl_ddr:bank_intlv=null" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 61 | |
| 62 | # bank(chip-select) interleaving cs0+cs1 |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 63 | setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 64 | |
| 65 | # bank(chip-select) interleaving cs2+cs3 |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 66 | setenv hwconfig "fsl_ddr:bank_intlv=cs2_cs3" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 67 | |
| 68 | # bank(chip-select) interleaving (cs0+cs1) and (cs2+cs3) (2x2) |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 69 | setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_and_cs2_cs3" |
Haiying Wang | b834f92 | 2008-10-03 12:37:10 -0400 | [diff] [blame] | 70 | |
| 71 | # bank(chip-select) interleaving (cs0+cs1+cs2+cs3) (4x1) |
Kumar Gala | 6404209 | 2010-07-14 10:04:21 -0500 | [diff] [blame] | 72 | setenv hwconfig "fsl_ddr:bank_intlv=cs0_cs1_cs2_cs3" |
| 73 | |
york | 4260372 | 2010-07-02 22:25:54 +0000 | [diff] [blame] | 74 | Memory controller address hashing |
| 75 | ================================== |
| 76 | If the DDR controller supports address hashing, it can be enabled by hwconfig. |
| 77 | |
| 78 | Syntax is: |
| 79 | hwconfig=fsl_ddr:addr_hash=true |
| 80 | |
York Sun | 0ac71ea | 2011-01-10 12:02:57 +0000 | [diff] [blame] | 81 | Memory controller ECC on/off |
| 82 | ============================ |
| 83 | If ECC is enabled in board configuratoin file, i.e. #define CONFIG_DDR_ECC, |
| 84 | ECC can be turned on/off by hwconfig. |
| 85 | |
| 86 | Syntax is |
| 87 | hwconfig=fsl_ddr:ecc=off |
York Sun | c41b744 | 2010-09-28 15:20:33 -0700 | [diff] [blame] | 88 | |
| 89 | Memory testing options for mpc85xx |
| 90 | ================================== |
| 91 | 1. Memory test can be done once U-boot prompt comes up using mtest, or |
| 92 | 2. 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 | |
york | 4260372 | 2010-07-02 22:25:54 +0000 | [diff] [blame] | 102 | Combination of hwconfig |
| 103 | ======================= |
| 104 | Hwconfig can be combined with multiple parameters, for example, on a supported |
| 105 | platform |
| 106 | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 107 | hwconfig=fsl_ddr:addr_hash=true,ctlr_intlv=cacheline,bank_intlv=cs0_cs1_cs2_cs3,ecc=on |
| 108 | |
| 109 | Table for dynamic ODT for DDR3 |
| 110 | ============================== |
| 111 | For single-slot system with quad-rank DIMM and dual-slot system, dynamic ODT may |
| 112 | be needed, depending on the configuration. The numbers in the following tables are |
| 113 | in Ohms. |
| 114 | |
| 115 | * denotes dynamic ODT |
| 116 | |
| 117 | Two slots system |
| 118 | +-----------------------+----------+---------------+-----------------------------+-----------------------------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 119 | | Configuration | |DRAM controller| Slot 1 | Slot 2 | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 120 | +-----------+-----------+----------+-------+-------+--------------+--------------+--------------+--------------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 121 | | | | | | | 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 Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 124 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 125 | | | | Slot 1 | off | 75 | 120 | off | off | off | off | off | 30 | 30 | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 126 | | Dual Rank | Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 127 | | | | Slot 2 | off | 75 | off | off | 30 | 30 | 120 | off | off | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 128 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 129 | | | | Slot 1 | off | 75 | 120 | off | off | off | 20 | 20 | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 130 | | Dual Rank |Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 131 | | | | Slot 2 | off | 75 | off | off | 20 | 20 | 120 *| off | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 132 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 133 | | | | Slot 1 | off | 75 | 120 *| off | | | off | off | 20 | 20 | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 134 | |Single Rank| Dual Rank |----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 135 | | | | Slot 2 | off | 75 | 20 | 20 | | | 120 | off | off | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 136 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 137 | | | | Slot 1 | off | 75 | 120 *| off | | | 30 | 30 | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 138 | |Single Rank|Single Rank|----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 139 | | | | Slot 2 | off | 75 | 30 | 30 | | | 120 *| off | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 140 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 141 | | Dual Rank | Empty | Slot 1 | off | 75 | 40 | off | off | off | | | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 142 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 143 | | Empty | Dual Rank | Slot 2 | off | 75 | | | | | 40 | off | off | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 144 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 145 | |Single Rank| Empty | Slot 1 | off | 75 | 40 | off | | | | | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 146 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 147 | | Empty |Single Rank| Slot 2 | off | 75 | | | | | 40 | off | | | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 148 | +-----------+-----------+----------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
| 149 | |
| 150 | Single slot system |
| 151 | +-------------+------------+---------------+-----------------------------+-----------------------------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 152 | | | |DRAM controller| Rank 1 | Rank 2 | Rank 3 | Rank 4 | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 153 | |Configuration| Write/Read |-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 154 | | | | Write | Read | Write | Read | Write | Read | Write | Read | Write | Read | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 155 | +-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 156 | | | 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 Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 159 | | Quad Rank |------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 160 | | | 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 Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 163 | +-------------+------------+-------+-------+-------+------+-------+------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 164 | | | R1 | off | 75 | 40 | off | off | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 165 | | Dual Rank |------------+-------+-------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 166 | | | R2 | off | 75 | 40 | off | off | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 167 | +-------------+------------+-------+-------+-------+------+-------+------+ |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 168 | | Single Rank | R1 | off | 75 | 40 | off | |
York Sun | ba0c2eb | 2011-01-10 12:03:00 +0000 | [diff] [blame] | 169 | +-------------+------------+-------+-------+-------+------+ |
| 170 | |
| 171 | Reference http://www.xrosstalkmag.com/mag_issues/xrosstalk_oct08_final.pdf |
Wolfgang Denk | a4de835 | 2011-02-02 22:36:10 +0100 | [diff] [blame^] | 172 | http://download.micron.com/pdf/technotes/ddr3/tn4108_ddr3_design_guide.pdf |