1 #define TRUE 1
2 #define FALSE 0
4 #define ibl_MAGIC_VALUE 0xCEC11EBB
6 #define ibl_HIGHEST_PRIORITY 1
7 #define ibl_LOWEST_PRIORITY 10
8 #define ibl_DEVICE_NOBOOT 20
10 #define ibl_PORT_SWITCH_ALL -2
12 #define SETIP(array,i0,i1,i2,i3) array[0]=(i0); \
13 array[1]=(i1); \
14 array[2]=(i2); \
15 array[3]=(i3)
17 #define ibl_BOOT_MODE_TFTP 10
18 #define ibl_BOOT_MODE_NAND 11
19 #define ibl_BOOT_MODE_NOR 12
20 #define ibl_BOOT_MODE_NONE 13
23 #define ibl_BOOT_FORMAT_AUTO 0
24 #define ibl_BOOT_FORMAT_NAME 1
25 #define ibl_BOOT_FORMAT_BIS 2
26 #define ibl_BOOT_FORMAT_COFF 3
27 #define ibl_BOOT_FORMAT_ELF 4
28 #define ibl_BOOT_FORMAT_BBLOB 5
29 #define ibl_BOOT_FORMAT_BTBL 6
31 #define ibl_PMEM_IF_GPIO 0
33 #define ibl_PMEM_IF_CHIPSEL_2 2 /* EMIF interface using chip select 2, no wait enabled */
34 #define ibl_PMEM_IF_CHIPSEL_3 3 /* EMIF interface using chip select 3, no wait enabled */
35 #define ibl_PMEM_IF_CHIPSEL_4 4 /* EMIF interface using chip select 4 */
36 #define ibl_PMEM_IF_CHIPSEL_5 5 /* EMIF interface using chip select 5 */
38 #define ibl_PMEM_IF_SPI 100 /* Interface through SPI */
41 #define ibl_MAIN_PLL 0
42 #define ibl_DDR_PLL 1
43 #define ibl_NET_PLL 2
45 #define ibl_EMIF4_ENABLE_sdRamConfig (1 << 0)
46 #define ibl_EMIF4_ENABLE_sdRamConfig2 (1 << 1)
47 #define ibl_EMIF4_ENABLE_sdRamRefreshCtl (1 << 2)
48 #define ibl_EMIF4_ENABLE_sdRamTiming1 (1 << 3)
49 #define ibl_EMIF4_ENABLE_sdRamTiming2 (1 << 4)
50 #define ibl_EMIF4_ENABLE_sdRamTiming3 (1 << 5)
51 #define ibl_EMIF4_ENABLE_lpDdrNvmTiming (1 << 6)
52 #define ibl_EMIF4_ENABLE_powerManageCtl (1 << 7)
53 #define ibl_EMIF4_ENABLE_iODFTTestLogic (1 << 8)
54 #define ibl_EMIF4_ENABLE_performCountCfg (1 << 9)
55 #define ibl_EMIF4_ENABLE_performCountMstRegSel (1 << 10)
56 #define ibl_EMIF4_ENABLE_readIdleCtl (1 << 11)
57 #define ibl_EMIF4_ENABLE_sysVbusmIntEnSet (1 << 12)
58 #define ibl_EMIF4_ENABLE_sdRamOutImpdedCalCfg (1 << 13)
59 #define ibl_EMIF4_ENABLE_tempAlterCfg (1 << 14)
60 #define ibl_EMIF4_ENABLE_ddrPhyCtl1 (1 << 15)
61 #define ibl_EMIF4_ENABLE_ddrPhyCtl2 (1 << 16)
62 #define ibl_EMIF4_ENABLE_priClassSvceMap (1 << 17)
63 #define ibl_EMIF4_ENABLE_mstId2ClsSvce1Map (1 << 18)
64 #define ibl_EMIF4_ENABLE_mstId2ClsSvce2Map (1 << 11)
65 #define ibl_EMIF4_ENABLE_eccCtl (1 << 19)
66 #define ibl_EMIF4_ENABLE_eccRange1 (1 << 20)
67 #define ibl_EMIF4_ENABLE_eccRange2 (1 << 21)
68 #define ibl_EMIF4_ENABLE_rdWrtExcThresh (1 << 22)
69 #define ibl_BOOT_EMIF4_ENABLE_ALL 0x007fffff
71 /* @} */
73 menuitem "EVM c6472 IBL";
75 hotmenu setConfig_c6472()
76 {
77 ibl.iblMagic = ibl_MAGIC_VALUE;
79 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
80 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
81 ibl.pllConfig[ibl_MAIN_PLL].mult = 28;
82 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
83 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 700;
85 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
86 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
88 /* The network PLL. The multipliers/dividers are fixed */
89 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
91 /* EMIF configuration. The values are for DDR at 533 MHz */
92 ibl.ddrConfig.configDdr = TRUE;
94 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00538832; /* timing, 32bit wide */
95 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x0000073B; /* Refresh 533Mhz */
96 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x47245BD2; /* Timing 1 */
97 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0125DC44; /* Timing 2 */
98 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
100 /* SGMII not present */
101 ibl.sgmiiConfig[0].configure = FALSE;
102 ibl.sgmiiConfig[1].configure = FALSE;
104 /* MDIO configuration */
105 ibl.mdioConfig.nMdioOps = 8;
106 ibl.mdioConfig.mdioClkDiv = 0x20;
107 ibl.mdioConfig.interDelay = 1400; /* ~2ms at 700 MHz */
109 ibl.mdioConfig.mdio[0] = (1 << 30) | (27 << 21) | (24 << 16) | 0x848b;
110 ibl.mdioConfig.mdio[1] = (1 << 30) | (20 << 21) | (24 << 16) | 0x0ce0;
111 ibl.mdioConfig.mdio[2] = (1 << 30) | (24 << 21) | (24 << 16) | 0x4101;
112 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 0 << 21) | (24 << 16) | 0x9140;
114 ibl.mdioConfig.mdio[4] = (1 << 30) | (27 << 21) | (25 << 16) | 0x848b;
115 ibl.mdioConfig.mdio[5] = (1 << 30) | (20 << 21) | (25 << 16) | 0x0ce0;
116 ibl.mdioConfig.mdio[6] = (1 << 30) | (24 << 21) | (25 << 16) | 0x4101;
117 ibl.mdioConfig.mdio[7] = (1 << 30) | ( 0 << 21) | (25 << 16) | 0x9140;
119 /* spiConfig and emifConfig not needed */
121 /* Ethernet configuration for Boot mode 0 */
122 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
123 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
124 ibl.bootModes[0].port = 0;
126 /* Bootp is disabled. The server and file name are provided here */
127 ibl.bootModes[0].u.ethBoot.doBootp = FALSE;
128 ibl.bootModes[0].u.ethBoot.useBootpServerIp = FALSE;
129 ibl.bootModes[0].u.ethBoot.useBootpFileName = FALSE;
130 ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
132 /* Even though the entire range of DDR2 is chosen, the load will
133 * stop when the ftp reaches the end of the file */
134 ibl.bootModes[0].u.ethBoot.blob.startAddress = 0xe0000000; /* Base address of DDR2 */
135 ibl.bootModes[0].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
136 ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000; /* Base of DDR2 */
138 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr, 158,218,103,200);
139 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp, 158,218,103,58);
140 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,103,1);
141 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask, 255,255,255,0);
143 /* Leave the hardware address as 0 so the e-fuse value will be used */
144 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
145 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
146 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
147 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
148 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
149 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
151 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0] = 'c';
152 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1] = '6';
153 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2] = '4';
154 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3] = '7';
155 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4] = '2';
156 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5] = '-';
157 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6] = 'l';
158 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7] = 'e';
159 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8] = '.';
160 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9] = 'b';
161 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
162 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
163 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
164 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
165 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
167 /* Alternative bootMode not configured for now */
168 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
170 ibl.chkSum = 0;
171 }
174 menuitem "EVM c6474 Mez IBL";
176 hotmenu setConfig_c6474()
177 {
178 ibl.iblMagic = ibl_MAGIC_VALUE;
180 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
181 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
182 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
183 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
184 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
186 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
187 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
189 /* The network PLL. The multipliers/dividers are fixed */
190 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
192 /* EMIF configuration. The values are for DDR at 533 MHz */
193 ibl.ddrConfig.configDdr = TRUE;
195 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
196 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x00000a29; /* Refresh 333Mhz */
197 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
198 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
199 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
201 /* SGMII 0 is present */
202 ibl.sgmiiConfig[0].configure = TRUE;
203 ibl.sgmiiConfig[0].adviseAbility = 0x9801;
204 ibl.sgmiiConfig[0].control = 0x20;
205 ibl.sgmiiConfig[0].txConfig = 0x00000ea3;
206 ibl.sgmiiConfig[0].rxConfig = 0x00081023;
207 ibl.sgmiiConfig[0].auxConfig = 0x0000000b;
209 /* There is no port 1 on the 6474 */
210 ibl.sgmiiConfig[1].configure = FALSE;
212 /* MDIO configuration */
213 ibl.mdioConfig.nMdioOps = 8;
214 ibl.mdioConfig.mdioClkDiv = 0x26;
215 ibl.mdioConfig.interDelay = 2000; /* ~2ms at 1000 MHz */
217 ibl.mdioConfig.mdio[0] = (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
218 ibl.mdioConfig.mdio[1] = (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
219 ibl.mdioConfig.mdio[2] = (1 << 30) | (26 << 21) | (13 << 16) | 0x0047;
220 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
222 ibl.mdioConfig.mdio[4] = (1 << 30) | ( 0 << 21) | (13 << 16) | 0x8140;
223 ibl.mdioConfig.mdio[5] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
224 ibl.mdioConfig.mdio[6] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
225 ibl.mdioConfig.mdio[7] = (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
227 /* spiConfig and emifConfig not needed */
229 /* Ethernet configuration for Boot mode 0 */
230 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
231 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
232 ibl.bootModes[0].port = 0;
234 /* Bootp is disabled. The server and file name are provided here */
235 ibl.bootModes[0].u.ethBoot.doBootp = FALSE;
236 ibl.bootModes[0].u.ethBoot.useBootpServerIp = FALSE;
237 ibl.bootModes[0].u.ethBoot.useBootpFileName = FALSE;
238 ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
240 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr, 10,218,109,35);
241 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp, 10,218,109,196);
242 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 10,218,109,1);
243 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask, 255,255,255,0);
245 /* Set the hardware address as 0 so the e-fuse value will be used */
246 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
247 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
248 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
249 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
250 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
251 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
253 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0] = 'c';
254 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1] = '6';
255 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2] = '4';
256 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3] = '7';
257 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4] = '4';
258 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5] = '-';
259 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6] = 'l';
260 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7] = 'e';
261 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8] = '.';
262 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9] = 'b';
263 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
264 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
265 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
266 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
267 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
269 /* Even though the entire range of DDR2 is chosen, the load will
270 * stop when the ftp reaches the end of the file */
271 ibl.bootModes[0].u.ethBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
272 ibl.bootModes[0].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
273 ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000; /* Base of DDR2 */
275 /* Alternative bootMode not configured for now */
276 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
278 ibl.chkSum = 0;
279 }
281 menuitem "EVM c6474 Lite EVM IBL";
283 hotmenu setConfig_c6474lite()
284 {
285 ibl.iblMagic = ibl_MAGIC_VALUE;
287 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
288 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
289 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
290 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
291 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
293 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
294 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
296 /* The network PLL. The multipliers/dividers are fixed */
297 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
299 /* EMIF configuration. The values are for DDR at 533 MHz */
300 ibl.ddrConfig.configDdr = TRUE;
302 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
303 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x00000a29; /* Refresh 333Mhz */
304 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
305 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
306 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
308 /* SGMII 0 is present */
309 ibl.sgmiiConfig[0].configure = TRUE;
310 ibl.sgmiiConfig[0].adviseAbility = 0x9801;
311 ibl.sgmiiConfig[0].control = 0x20;
312 ibl.sgmiiConfig[0].txConfig = 0x00000e23;
313 ibl.sgmiiConfig[0].rxConfig = 0x00081023;
314 ibl.sgmiiConfig[0].auxConfig = 0x0000000b;
316 /* There is no port 1 on the 6474 */
317 ibl.sgmiiConfig[1].configure = FALSE;
319 /* MDIO configuration */
320 ibl.mdioConfig.nMdioOps = 5;
321 ibl.mdioConfig.mdioClkDiv = 0x20;
322 ibl.mdioConfig.interDelay = 2000; /* ~2ms at 1000 MHz */
324 ibl.mdioConfig.mdio[0] = (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
325 ibl.mdioConfig.mdio[1] = (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
326 ibl.mdioConfig.mdio[2] = (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
328 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
329 ibl.mdioConfig.mdio[4] = (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
331 /* spiConfig and emifConfig not needed */
333 /* Ethernet configuration for Boot mode 0 */
334 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
335 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
336 ibl.bootModes[0].port = 0;
338 /* Bootp is disabled. The server and file name are provided here */
339 ibl.bootModes[0].u.ethBoot.doBootp = FALSE;
340 ibl.bootModes[0].u.ethBoot.useBootpServerIp = FALSE;
341 ibl.bootModes[0].u.ethBoot.useBootpFileName = FALSE;
342 ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
344 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr, 158,218,100,114);
345 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp, 158,218,100,25);
346 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
347 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask, 255,255,255,0);
349 /* Set the hardware address as 0 so the e-fuse value will be used */
350 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
351 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
352 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
353 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
354 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
355 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
358 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0] = 'c';
359 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1] = '6';
360 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2] = '4';
361 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3] = '7';
362 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4] = '4';
363 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5] = 'l';
364 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6] = '-';
365 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7] = 'l';
366 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8] = 'e';
367 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9] = '.';
368 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'b';
369 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'i';
370 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = 'n';
371 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
372 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
375 /* Even though the entire range of DDR2 is chosen, the load will
376 * stop when the ftp reaches the end of the file */
377 ibl.bootModes[0].u.ethBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
378 ibl.bootModes[0].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
379 ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000; /* Base of DDR2 */
381 /* Alternative bootMode not configured for now */
382 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
384 ibl.chkSum = 0;
385 }
387 menuitem "EVM c6457 EVM IBL";
389 hotmenu setConfig_c6457()
390 {
391 ibl.iblMagic = ibl_MAGIC_VALUE;
393 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
394 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
395 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
396 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
397 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
399 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
400 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
402 /* The network PLL. The multipliers/dividers are fixed */
403 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
405 /* EMIF configuration */
406 ibl.ddrConfig.configDdr = TRUE;
408 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
409 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x00000a0e; /* Refresh 333Mhz */
410 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x832474da; /* Timing 1 */
411 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0144c742; /* Timing 2 */
412 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x001800C6;
414 /* SGMII 0 is present */
415 ibl.sgmiiConfig[0].configure = TRUE;
416 ibl.sgmiiConfig[0].adviseAbility = 0x9801;
417 ibl.sgmiiConfig[0].control = 0x20;
418 ibl.sgmiiConfig[0].txConfig = 0x00000e21;
419 ibl.sgmiiConfig[0].rxConfig = 0x00081021;
420 ibl.sgmiiConfig[0].auxConfig = 0x0000000b;
422 /* There is no port 1 on the 6457 */
423 ibl.sgmiiConfig[1].configure = FALSE;
425 /* MDIO configuration */
426 ibl.mdioConfig.nMdioOps = 5;
427 ibl.mdioConfig.mdioClkDiv = 0xa5;
428 ibl.mdioConfig.interDelay = 3000; /* ~2ms at 1000 MHz */
430 ibl.mdioConfig.mdio[0] = (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
431 ibl.mdioConfig.mdio[1] = (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
432 ibl.mdioConfig.mdio[2] = (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
433 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
434 ibl.mdioConfig.mdio[4] = (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x8140;
436 /* spiConfig and emifConfig not needed */
438 /* Ethernet configuration for Boot mode 0 */
439 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
440 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
441 ibl.bootModes[0].port = 0;
443 /* Bootp is disabled. The server and file name are provided here */
444 ibl.bootModes[0].u.ethBoot.doBootp = FALSE;
445 ibl.bootModes[0].u.ethBoot.useBootpServerIp = FALSE;
446 ibl.bootModes[0].u.ethBoot.useBootpFileName = FALSE;
447 ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
449 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr, 158,218,100,115);
450 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp, 158,218,100,25);
451 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
452 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask, 255,255,255,0);
454 /* Set the hardware address as 0 so the e-fuse value will be used */
455 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
456 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
457 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
458 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
459 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
460 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
462 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0] = 'c';
463 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1] = '6';
464 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2] = '4';
465 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3] = '5';
466 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4] = '7';
467 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5] = '-';
468 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6] = 'l';
469 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7] = 'e';
470 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8] = '.';
471 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9] = 'b';
472 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
473 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
474 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
475 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
476 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
479 /* Even though the entire range of DDR2 is chosen, the load will
480 * stop when the ftp reaches the end of the file */
481 ibl.bootModes[0].u.ethBoot.blob.startAddress = 0xe0000000; /* Base address of DDR2 */
482 ibl.bootModes[0].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
483 ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000; /* Base of DDR2 */
485 /* Alternative bootMode not configured for now */
486 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
488 ibl.chkSum = 0;
489 }
491 menuitem "EVM c6455 IBL";
493 hotmenu setConfig_c6455()
494 {
495 ibl.iblMagic = ibl_MAGIC_VALUE;
497 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
498 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
499 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
500 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
501 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
503 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
504 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
506 /* The network PLL. The multipliers/dividers are fixed */
507 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
509 /* EMIF configuration. The values are for DDR at 500 MHz */
510 ibl.ddrConfig.configDdr = TRUE;
512 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00538822; /* timing, 32bit wide */
513 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x000007a2; /* Refresh 500Mhz */
514 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x3edb4b91; /* Timing 1 */
515 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00a2c722; /* Timing 2 */
516 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x00000005; /* PHY read latency for CAS 4 is 4 + 2 - 1 */
518 /* SGMII not present */
519 ibl.sgmiiConfig[0].configure = FALSE;
520 ibl.sgmiiConfig[1].configure = FALSE;
522 /* MDIO configuration */
523 ibl.mdioConfig.nMdioOps = 0;
524 ibl.mdioConfig.mdioClkDiv = 0x20;
525 ibl.mdioConfig.interDelay = 2000; /* ~2ms at 1000 MHz */
527 ibl.mdioConfig.mdio[0] = (1 << 30) | (14 << 21) | (0 << 16) | 0xd5d0;
529 /* spiConfig and emifConfig not needed */
531 /* Ethernet configuration for Boot mode 0 */
532 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
533 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
534 ibl.bootModes[0].port = 0;
536 /* Bootp is disabled. The server and file name are provided here */
537 ibl.bootModes[0].u.ethBoot.doBootp = FALSE;
538 ibl.bootModes[0].u.ethBoot.useBootpServerIp = FALSE;
539 ibl.bootModes[0].u.ethBoot.useBootpFileName = FALSE;
540 ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_BBLOB;
542 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr, 158,218,100,118);
543 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp, 158,218,100,25);
544 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
545 SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask, 255,255,255,0);
547 /* There is no e-fuse mac address. A value must be assigned */
548 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 10;
549 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 224;
550 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 166;
551 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 102;
552 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 87;
553 ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 25;
556 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0] = 'c';
557 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1] = '6';
558 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2] = '4';
559 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3] = '5';
560 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4] = '5';
561 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5] = '-';
562 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6] = 'l';
563 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7] = 'e';
564 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8] = '.';
565 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9] = 'b';
566 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
567 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
568 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
569 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
570 ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
572 /* Even though the entire range of DDR2 is chosen, the load will
573 * stop when the ftp reaches the end of the file */
574 ibl.bootModes[0].u.ethBoot.blob.startAddress = 0xe0000000; /* Base address of DDR2 */
575 ibl.bootModes[0].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
576 ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000; /* Base of DDR2 */
578 /* Alternative bootMode not configured for now */
579 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
581 ibl.chkSum = 0;
582 }
585 menuitem "EVM c6678 IBL";
587 hotmenu setConfig_c6678_main()
588 {
589 ibl.iblMagic = ibl_MAGIC_VALUE;
591 /* Main PLL: 100 MHz reference, 1GHz output */
592 ibl.pllConfig[ibl_MAIN_PLL].doEnable = 1;
593 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
594 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
595 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 2;
596 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
598 /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
599 ibl.pllConfig[ibl_DDR_PLL].doEnable = 1;
600 ibl.pllConfig[ibl_DDR_PLL].prediv = 1;
601 ibl.pllConfig[ibl_DDR_PLL].mult = 12;
602 ibl.pllConfig[ibl_DDR_PLL].postdiv = 2;
603 ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz = 400;
605 /* Net PLL: 100 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 350 MHz to PA) */
606 ibl.pllConfig[ibl_NET_PLL].doEnable = 1;
607 ibl.pllConfig[ibl_NET_PLL].prediv = 1;
608 ibl.pllConfig[ibl_NET_PLL].mult = 21;
609 ibl.pllConfig[ibl_NET_PLL].postdiv = 2;
610 ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz = 1050;
613 ibl.ddrConfig.configDdr = 1;
614 ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
616 ibl.ddrConfig.uEmif.emif4p0.sdRamConfig = 0x63C452B2;
617 ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2 = 0;
618 ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl = 0x000030D4;
619 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1 = 0x0AAAE51B;
620 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2 = 0x2A2F7FDA;
621 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3 = 0x057F82B8;
622 ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming = 0;
623 ibl.ddrConfig.uEmif.emif4p0.powerManageCtl = 0;
624 ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic = 0;
625 ibl.ddrConfig.uEmif.emif4p0.performCountCfg = 0;
626 ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel = 0;
627 ibl.ddrConfig.uEmif.emif4p0.readIdleCtl = 0;
628 ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet = 0;
629 ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg = 0;
630 ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg = 0;
631 ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1 = 0x0010010d;
632 ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2 = 0;
633 ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap = 0;
634 ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map = 0;
635 ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map = 0;
636 ibl.ddrConfig.uEmif.emif4p0.eccCtl = 0;
637 ibl.ddrConfig.uEmif.emif4p0.eccRange1 = 0;
638 ibl.ddrConfig.uEmif.emif4p0.eccRange2 = 0;
639 ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh = 0;
642 ibl.sgmiiConfig[0].configure = 1;
643 ibl.sgmiiConfig[0].adviseAbility = 1;
644 ibl.sgmiiConfig[0].control = 1;
645 ibl.sgmiiConfig[0].txConfig = 0x108a1;
646 ibl.sgmiiConfig[0].rxConfig = 0x700621;
647 ibl.sgmiiConfig[0].auxConfig = 0x41;
649 ibl.sgmiiConfig[1].configure = 1;
650 ibl.sgmiiConfig[1].adviseAbility = 1;
651 ibl.sgmiiConfig[1].control = 1;
652 ibl.sgmiiConfig[1].txConfig = 0x108a1;
653 ibl.sgmiiConfig[1].rxConfig = 0x700621;
654 ibl.sgmiiConfig[1].auxConfig = 0x41;
656 ibl.mdioConfig.nMdioOps = 0;
658 ibl.spiConfig.addrWidth = 24;
659 ibl.spiConfig.nPins = 5;
660 ibl.spiConfig.mode = 1;
661 ibl.spiConfig.csel = 2;
662 ibl.spiConfig.c2tdelay = 1;
663 ibl.spiConfig.busFreqMHz = 20;
665 ibl.emifConfig[0].csSpace = 2;
666 ibl.emifConfig[0].busWidth = 8;
667 ibl.emifConfig[0].waitEnable = 0;
669 ibl.emifConfig[1].csSpace = 0;
670 ibl.emifConfig[1].busWidth = 0;
671 ibl.emifConfig[1].waitEnable = 0;
673 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
674 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
675 ibl.bootModes[0].port = 0;
677 ibl.bootModes[0].u.norBoot.bootFormat = ibl_BOOT_FORMAT_ELF;
678 ibl.bootModes[0].u.norBoot.bootAddress = 0;
679 ibl.bootModes[0].u.norBoot.interface = ibl_PMEM_IF_SPI;
680 ibl.bootModes[0].u.norBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
681 ibl.bootModes[0].u.norBoot.blob.sizeBytes = 0x80000; /* 512 KB */
682 ibl.bootModes[0].u.norBoot.blob.branchAddress = 0x80000000; /* Base address of DDR2 */
684 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_TFTP;
685 ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY+1;
686 ibl.bootModes[1].port = ibl_PORT_SWITCH_ALL;
688 ibl.bootModes[1].u.ethBoot.doBootp = FALSE;
689 ibl.bootModes[1].u.ethBoot.useBootpServerIp = FALSE;
690 ibl.bootModes[1].u.ethBoot.useBootpFileName = FALSE;
691 ibl.bootModes[1].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_ELF;
694 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.ipAddr, 192,168,1,100);
695 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.serverIp, 192,168,1,101);
696 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.gatewayIp, 192,168,1,1);
697 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.netmask, 255,255,255,0);
699 /* Use the e-fuse value */
700 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[0] = 0;
701 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[1] = 0;
702 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[2] = 0;
703 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[3] = 0;
704 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[4] = 0;
705 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[5] = 0;
708 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[0] = 'a';
709 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[1] = 'p';
710 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[2] = 'p';
711 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[3] = '.';
712 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[4] = 'o';
713 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[5] = 'u';
714 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[6] = 't';
715 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[7] = '\0';
716 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[8] = '\0';
717 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[9] = '\0';
718 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[10] = '\0';
719 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[11] = '\0';
720 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[12] = '\0';
721 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[13] = '\0';
722 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[14] = '\0';
724 ibl.bootModes[1].u.ethBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
725 ibl.bootModes[1].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
726 ibl.bootModes[1].u.ethBoot.blob.branchAddress = 0x80000000; /* Base of DDR2 */
728 ibl.chkSum = 0;
729 }
731 hotmenu setConfig_c6678_emac()
732 {
733 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY+1;
734 ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
735 }
737 hotmenu setConfig_c6678_nand()
738 {
739 /* Nand boot is higher priority */
740 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NAND;
741 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
742 ibl.bootModes[0].port = 0;
744 ibl.bootModes[0].u.nandBoot.bootFormat = ibl_BOOT_FORMAT_ELF;
745 ibl.bootModes[0].u.nandBoot.bootAddress = 0;
746 ibl.bootModes[0].u.nandBoot.interface = ibl_PMEM_IF_CHIPSEL_2;
747 ibl.bootModes[0].u.nandBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
748 ibl.bootModes[0].u.nandBoot.blob.sizeBytes = 0x80000; /* 512 KB */
749 ibl.bootModes[0].u.nandBoot.blob.branchAddress = 0x80000000; /* Base address of DDR2 */
751 ibl.bootModes[0].u.nandBoot.nandInfo.busWidthBits = 8;
752 ibl.bootModes[0].u.nandBoot.nandInfo.pageSizeBytes = 512;
753 ibl.bootModes[0].u.nandBoot.nandInfo.pageEccBytes = 16;
754 ibl.bootModes[0].u.nandBoot.nandInfo.pagesPerBlock = 32;
755 ibl.bootModes[0].u.nandBoot.nandInfo.totalBlocks = 4096;
757 ibl.bootModes[0].u.nandBoot.nandInfo.addressBytes = 4;
758 ibl.bootModes[0].u.nandBoot.nandInfo.lsbFirst = TRUE;
759 ibl.bootModes[0].u.nandBoot.nandInfo.blockOffset = 14;
760 ibl.bootModes[0].u.nandBoot.nandInfo.pageOffset = 9;
761 ibl.bootModes[0].u.nandBoot.nandInfo.columnOffset = 0;
763 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[0] = 0;
764 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[1] = 1;
765 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[2] = 2;
766 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[3] = 3;
767 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[4] = 6;
768 ibl.bootModes[0].u.nandBoot.nandInfo.eccBytesIdx[5] = 7;
770 ibl.bootModes[0].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
771 ibl.bootModes[0].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xffff;
773 ibl.bootModes[0].u.nandBoot.nandInfo.resetCommand = 0xff;
774 ibl.bootModes[0].u.nandBoot.nandInfo.readCommandPre = 0;
775 ibl.bootModes[0].u.nandBoot.nandInfo.readCommandPost = 0;
776 ibl.bootModes[0].u.nandBoot.nandInfo.postCommand = FALSE;
777 }
779 menuitem "EVM c6670 IBL";
781 hotmenu setConfig_c6670_main()
782 {
783 ibl.iblMagic = ibl_MAGIC_VALUE;
785 /* Main PLL: 122.88 MHz reference, 983 MHz output */
786 ibl.pllConfig[ibl_MAIN_PLL].doEnable = 1;
787 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
788 ibl.pllConfig[ibl_MAIN_PLL].mult = 16;
789 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 2;
790 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 983;
792 /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
793 ibl.pllConfig[ibl_DDR_PLL].doEnable = 1;
794 ibl.pllConfig[ibl_DDR_PLL].prediv = 1;
795 ibl.pllConfig[ibl_DDR_PLL].mult = 12;
796 ibl.pllConfig[ibl_DDR_PLL].postdiv = 2;
797 ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz = 400;
799 /* Net PLL: 122.88 MHz reference, 1044 MHz output (followed by a built in divide by 3 to give 348 MHz to PA) */
800 ibl.pllConfig[ibl_NET_PLL].doEnable = 1;
801 ibl.pllConfig[ibl_NET_PLL].prediv = 1;
802 ibl.pllConfig[ibl_NET_PLL].mult = 17;
803 ibl.pllConfig[ibl_NET_PLL].postdiv = 2;
804 ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz = 1044;
807 ibl.ddrConfig.configDdr = 1;
808 ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
810 ibl.ddrConfig.uEmif.emif4p0.sdRamConfig = 0x63C452B2;
811 ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2 = 0;
812 ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl = 0x000030D4;
813 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1 = 0x0AAAE51B;
814 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2 = 0x2A2F7FDA;
815 ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3 = 0x057F82B8;
816 ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming = 0;
817 ibl.ddrConfig.uEmif.emif4p0.powerManageCtl = 0;
818 ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic = 0;
819 ibl.ddrConfig.uEmif.emif4p0.performCountCfg = 0;
820 ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel = 0;
821 ibl.ddrConfig.uEmif.emif4p0.readIdleCtl = 0;
822 ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet = 0;
823 ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg = 0;
824 ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg = 0;
825 ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1 = 0x0010010d;
826 ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2 = 0;
827 ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap = 0;
828 ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map = 0;
829 ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map = 0;
830 ibl.ddrConfig.uEmif.emif4p0.eccCtl = 0;
831 ibl.ddrConfig.uEmif.emif4p0.eccRange1 = 0;
832 ibl.ddrConfig.uEmif.emif4p0.eccRange2 = 0;
833 ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh = 0;
836 ibl.sgmiiConfig[0].configure = 1;
837 ibl.sgmiiConfig[0].adviseAbility = 1;
838 ibl.sgmiiConfig[0].control = 1;
839 ibl.sgmiiConfig[0].txConfig = 0x108a1;
840 ibl.sgmiiConfig[0].rxConfig = 0x700621;
841 ibl.sgmiiConfig[0].auxConfig = 0x41;
843 ibl.sgmiiConfig[1].configure = 1;
844 ibl.sgmiiConfig[1].adviseAbility = 1;
845 ibl.sgmiiConfig[1].control = 1;
846 ibl.sgmiiConfig[1].txConfig = 0x108a1;
847 ibl.sgmiiConfig[1].rxConfig = 0x700621;
848 ibl.sgmiiConfig[1].auxConfig = 0x51;
850 ibl.mdioConfig.nMdioOps = 0;
852 ibl.spiConfig.addrWidth = 24;
853 ibl.spiConfig.nPins = 5;
854 ibl.spiConfig.mode = 1;
855 ibl.spiConfig.csel = 2;
856 ibl.spiConfig.c2tdelay = 1;
857 ibl.spiConfig.busFreqMHz = 20;
859 ibl.emifConfig[0].csSpace = 2;
860 ibl.emifConfig[0].busWidth = 8;
861 ibl.emifConfig[0].waitEnable = 0;
863 ibl.emifConfig[1].csSpace = 0;
864 ibl.emifConfig[1].busWidth = 0;
865 ibl.emifConfig[1].waitEnable = 0;
867 ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
868 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
869 ibl.bootModes[0].port = 0;
871 ibl.bootModes[0].u.norBoot.bootFormat = ibl_BOOT_FORMAT_ELF;
872 ibl.bootModes[0].u.norBoot.bootAddress = 0;
873 ibl.bootModes[0].u.norBoot.interface = ibl_PMEM_IF_SPI;
874 ibl.bootModes[0].u.norBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
875 ibl.bootModes[0].u.norBoot.blob.sizeBytes = 0x80000; /* 512 KB */
876 ibl.bootModes[0].u.norBoot.blob.branchAddress = 0x80000000; /* Base address of DDR2 */
878 ibl.bootModes[1].bootMode = ibl_BOOT_MODE_TFTP;
879 ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY+1;
880 ibl.bootModes[1].port = ibl_PORT_SWITCH_ALL;
882 ibl.bootModes[1].u.ethBoot.doBootp = FALSE;
883 ibl.bootModes[1].u.ethBoot.useBootpServerIp = FALSE;
884 ibl.bootModes[1].u.ethBoot.useBootpFileName = FALSE;
885 ibl.bootModes[1].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_ELF;
888 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.ipAddr, 192,168,1,100);
889 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.serverIp, 192,168,1,101);
890 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.gatewayIp, 192,168,1,1);
891 SETIP(ibl.bootModes[1].u.ethBoot.ethInfo.netmask, 255,255,255,0);
893 /* Use the e-fuse value */
894 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[0] = 0;
895 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[1] = 0;
896 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[2] = 0;
897 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[3] = 0;
898 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[4] = 0;
899 ibl.bootModes[1].u.ethBoot.ethInfo.hwAddress[5] = 0;
902 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[0] = 'a';
903 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[1] = 'p';
904 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[2] = 'p';
905 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[3] = '.';
906 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[4] = 'o';
907 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[5] = 'u';
908 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[6] = 't';
909 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[7] = '\0';
910 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[8] = '\0';
911 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[9] = '\0';
912 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[10] = '\0';
913 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[11] = '\0';
914 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[12] = '\0';
915 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[13] = '\0';
916 ibl.bootModes[1].u.ethBoot.ethInfo.fileName[14] = '\0';
918 ibl.bootModes[1].u.ethBoot.blob.startAddress = 0x80000000; /* Base address of DDR2 */
919 ibl.bootModes[1].u.ethBoot.blob.sizeBytes = 0x20000000; /* All of DDR2 */
920 ibl.bootModes[1].u.ethBoot.blob.branchAddress = 0x80000000; /* Base of DDR2 */
922 ibl.chkSum = 0;
923 }
925 hotmenu setConfig_c6670_emac()
926 {
927 ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY+1;
928 ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
929 }