]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/util/i2cConfig/i2cConfig.gel
Merge branch 'nysh_multi_boot'
[keystone-rtos/ibl.git] / src / util / i2cConfig / i2cConfig.gel
1 #define TRUE  1
2 #define FALSE 0
4 #define ibl_MAGIC_VALUE                  0xCEC11EBC
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
72 #define ibl_EVM_C6455L  0x10    /**< C6455 Low Cost EVM */
73 #define ibl_EVM_C6457L  0x20    /**< C6457 Low Cost EVM */
74 #define ibl_EVM_C6472L  0x30    /**< C6472 Low Cost EVM */
75 #define ibl_EVM_C6474L  0x40    /**< C6474 Low Cost EVM */
76 #define ibl_EVM_C6474M  0x41    /**< C6474 Mez EVM */
77 #define ibl_EVM_C6670L  0x50    /**< C6670 Low Cost EVM */
78 #define ibl_EVM_C6678L  0x60    /**< C6678 Low Cost EVM */
79     
80 /* @} */  
82 menuitem "EVM c6472 IBL";
84 hotmenu setConfig_c6472()
85 {
86     ibl.iblMagic = ibl_MAGIC_VALUE;
87     ibl.iblEvmType = ibl_EVM_C6472L;
89     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
90     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
91     ibl.pllConfig[ibl_MAIN_PLL].mult          = 28;
92     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
93     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 700;
95     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
96     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
98     /* The network PLL. The multipliers/dividers are fixed */
99     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
101     /* EMIF configuration. The values are for DDR at 533 MHz  */
102     ibl.ddrConfig.configDdr = TRUE;
104     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00538832; /* timing, 32bit wide */
105     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x0000073B; /* Refresh 533Mhz */ 
106     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x47245BD2; /* Timing 1 */
107     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0125DC44; /* Timing 2 */
108     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
110     /* SGMII not present */
111     ibl.sgmiiConfig[0].configure = FALSE;
112     ibl.sgmiiConfig[1].configure = FALSE;
114     /* MDIO configuration */
115     ibl.mdioConfig.nMdioOps = 8;
116     ibl.mdioConfig.mdioClkDiv = 0x20;
117     ibl.mdioConfig.interDelay = 1400;   /* ~2ms at 700 MHz */
119     ibl.mdioConfig.mdio[0] =  (1 << 30) | (27 << 21) | (24 << 16) | 0x848b;
120     ibl.mdioConfig.mdio[1] =  (1 << 30) | (20 << 21) | (24 << 16) | 0x0ce0;
121     ibl.mdioConfig.mdio[2] =  (1 << 30) | (24 << 21) | (24 << 16) | 0x4101;
122     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 0 << 21) | (24 << 16) | 0x9140;
124     ibl.mdioConfig.mdio[4] =  (1 << 30) | (27 << 21) | (25 << 16) | 0x848b;
125     ibl.mdioConfig.mdio[5] =  (1 << 30) | (20 << 21) | (25 << 16) | 0x0ce0;
126     ibl.mdioConfig.mdio[6] =  (1 << 30) | (24 << 21) | (25 << 16) | 0x4101;
127     ibl.mdioConfig.mdio[7] =  (1 << 30) | ( 0 << 21) | (25 << 16) | 0x9140;
129     /* spiConfig and emifConfig not needed */
131     /* Ethernet configuration for Boot mode 0 */
132     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
133     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
134     ibl.bootModes[0].port     = 0;
136     /* Bootp is disabled. The server and file name are provided here */
137     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
138     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
139     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
140     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
142     /* Even though the entire range of DDR2 is chosen, the load will
143      * stop when the ftp reaches the end of the file */
144     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
145     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
146     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
148     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,103,200);
149     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,103,58);
150     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,103,1);
151     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
153     /* Leave the hardware address as 0 so the e-fuse value will be used */
154     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
155     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
156     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
157     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
158     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
159     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
161     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
162     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
163     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
164     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
165     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '2';
166     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
167     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
168     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
169     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
170     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
171     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
172     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
173     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
174     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
175     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
177     /* Alternative bootMode not configured for now */
178     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
180     ibl.chkSum = 0;
184 menuitem "EVM c6474 Mez IBL";
186 hotmenu setConfig_c6474()
188     ibl.iblMagic = ibl_MAGIC_VALUE;
189     ibl.iblEvmType = ibl_EVM_C6474M;
191     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
192     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
193     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
194     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
195     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
197     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
198     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
200     /* The network PLL. The multipliers/dividers are fixed */
201     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
203     /* EMIF configuration. The values are for DDR at 533 MHz  */
204     ibl.ddrConfig.configDdr = TRUE;
206     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
207     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
208     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
209     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
210     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
212     /* SGMII 0 is present */
213     ibl.sgmiiConfig[0].configure = TRUE;
214     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
215     ibl.sgmiiConfig[0].control       = 0x20;
216     ibl.sgmiiConfig[0].txConfig      = 0x00000ea3;
217     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
218     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
220     /* There is no port 1 on the 6474 */
221     ibl.sgmiiConfig[1].configure = FALSE;
223     /* MDIO configuration */
224     ibl.mdioConfig.nMdioOps = 8;
225     ibl.mdioConfig.mdioClkDiv = 0x26;
226     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
228     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
229     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
230     ibl.mdioConfig.mdio[2] =  (1 << 30) | (26 << 21) | (13 << 16) | 0x0047;
231     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
233     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | (13 << 16) | 0x8140;
234     ibl.mdioConfig.mdio[5] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
235     ibl.mdioConfig.mdio[6] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
236     ibl.mdioConfig.mdio[7] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
238     /* spiConfig and emifConfig not needed */
240     /* Ethernet configuration for Boot mode 0 */
241     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
242     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
243     ibl.bootModes[0].port     = 0;
245     /* Bootp is disabled. The server and file name are provided here */
246     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
247     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
248     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
249     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
251     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    10,218,109,35);
252     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  10,218,109,196);
253     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 10,218,109,1);
254     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
256     /* Set the hardware address as 0 so the e-fuse value will be used */
257     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
258     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
259     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
260     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
261     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
262     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
264     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
265     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
266     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
267     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
268     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
269     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
270     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
271     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
272     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
273     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
274     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
275     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
276     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
277     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
278     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
280     /* Even though the entire range of DDR2 is chosen, the load will
281      * stop when the ftp reaches the end of the file */
282     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
283     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
284     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
286     /* Alternative bootMode not configured for now */
287     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
289     ibl.chkSum = 0;
292 menuitem "EVM c6474 Lite EVM IBL";
294 hotmenu setConfig_c6474lite()
296     ibl.iblMagic = ibl_MAGIC_VALUE;
297     ibl.iblEvmType = ibl_EVM_C6474L;
299     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
300     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
301     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
302     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
303     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
305     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
306     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
308     /* The network PLL. The multipliers/dividers are fixed */
309     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
311     /* EMIF configuration. The values are for DDR at 533 MHz  */
312     ibl.ddrConfig.configDdr = TRUE;
314     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
315     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
316     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
317     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
318     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
320     /* SGMII 0 is present */
321     ibl.sgmiiConfig[0].configure = TRUE;
322     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
323     ibl.sgmiiConfig[0].control       = 0x20;
324     ibl.sgmiiConfig[0].txConfig      = 0x00000e23;
325     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
326     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
328     /* There is no port 1 on the 6474 */
329     ibl.sgmiiConfig[1].configure = FALSE;
331     /* MDIO configuration */
332     ibl.mdioConfig.nMdioOps = 5;
333     ibl.mdioConfig.mdioClkDiv = 0x20;
334     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
336     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
337     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
338     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
340     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
341     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
343     /* spiConfig and emifConfig not needed */
345     /* Ethernet configuration for Boot mode 0 */
346     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
347     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
348     ibl.bootModes[0].port     = 0;
350     /* Bootp is disabled. The server and file name are provided here */
351     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
352     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
353     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
354     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
356     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,114);
357     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
358     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
359     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
361     /* Set the hardware address as 0 so the e-fuse value will be used */
362     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
363     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
364     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
365     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
366     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
367     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
370     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
371     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
372     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
373     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
374     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
375     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = 'l';
376     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = '-';
377     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'l';
378     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = 'e';
379     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = '.';
380     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'b';
381     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'i';
382     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = 'n';
383     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
384     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
387     /* Even though the entire range of DDR2 is chosen, the load will
388      * stop when the ftp reaches the end of the file */
389     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
390     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
391     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
393     /* Alternative bootMode not configured for now */
394     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
396     ibl.chkSum = 0;
399 menuitem "EVM c6457 EVM IBL";
401 hotmenu setConfig_c6457()
403     ibl.iblMagic = ibl_MAGIC_VALUE;
404     ibl.iblEvmType = ibl_EVM_C6457L;
406     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
407     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
408     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
409     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
410     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
412     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
413     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
415     /* The network PLL. The multipliers/dividers are fixed */
416     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
418     /* EMIF configuration */
419     ibl.ddrConfig.configDdr = TRUE;
421     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
422     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a0e; /* Refresh 333Mhz */ 
423     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x832474da; /* Timing 1 */
424     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0144c742; /* Timing 2 */
425     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x001800C6;
427     /* SGMII 0 is present */
428     ibl.sgmiiConfig[0].configure = TRUE;
429     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
430     ibl.sgmiiConfig[0].control       = 0x20;
431     ibl.sgmiiConfig[0].txConfig      = 0x00000e21;
432     ibl.sgmiiConfig[0].rxConfig      = 0x00081021;
433     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
435     /* There is no port 1 on the 6457 */
436     ibl.sgmiiConfig[1].configure = FALSE;
438     /* MDIO configuration */
439     ibl.mdioConfig.nMdioOps = 5;
440     ibl.mdioConfig.mdioClkDiv = 0xa5;
441     ibl.mdioConfig.interDelay = 3000;   /* ~2ms at 1000 MHz */
443     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
444     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
445     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
446     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
447     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x8140;
449     /* spiConfig and emifConfig not needed */
451     /* Ethernet configuration for Boot mode 0 */
452     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
453     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
454     ibl.bootModes[0].port = 0;
456     /* Bootp is disabled. The server and file name are provided here */
457     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
458     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
459     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
460     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
462     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,115);
463     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
464     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
465     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
467     /* Set the hardware address as 0 so the e-fuse value will be used */
468     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
469     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
470     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
471     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
472     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
473     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
475     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
476     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
477     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
478     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
479     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '7';
480     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
481     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
482     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
483     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
484     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
485     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
486     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
487     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
488     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
489     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
492     /* Even though the entire range of DDR2 is chosen, the load will
493      * stop when the ftp reaches the end of the file */
494     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
495     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
496     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
498     /* Alternative bootMode not configured for now */
499     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
501     ibl.chkSum = 0;
504 menuitem "EVM c6455 IBL";
506 hotmenu setConfig_c6455()
508     ibl.iblMagic = ibl_MAGIC_VALUE;
509     ibl.iblEvmType = ibl_EVM_C6455L;
511     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
512     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
513     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
514     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
515     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
517     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
518     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
520     /* The network PLL. The multipliers/dividers are fixed */
521     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
523     /* EMIF configuration. The values are for DDR at 500 MHz  */
524     ibl.ddrConfig.configDdr = TRUE;
526     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00538822; /* timing, 32bit wide */
527     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x000007a2; /* Refresh 500Mhz */ 
528     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x3edb4b91; /* Timing 1 */
529     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00a2c722; /* Timing 2 */
530     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x00000005; /* PHY read latency for CAS 4 is 4 + 2 - 1 */
532     /* SGMII not present */
533     ibl.sgmiiConfig[0].configure = FALSE;
534     ibl.sgmiiConfig[1].configure = FALSE;
536     /* MDIO configuration */
537     ibl.mdioConfig.nMdioOps = 0;
538     ibl.mdioConfig.mdioClkDiv = 0x20;
539     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
541     ibl.mdioConfig.mdio[0] =  (1 << 30) | (14 << 21) | (0 << 16) | 0xd5d0;
543     /* spiConfig and emifConfig not needed */
545     /* Ethernet configuration for Boot mode 0 */
546     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
547     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
548     ibl.bootModes[0].port     = 0;
550     /* Bootp is disabled. The server and file name are provided here */
551     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
552     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
553     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
554     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
556     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,118);
557     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
558     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
559     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
561     /* There is no e-fuse mac address. A value must be assigned */
562     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 10;
563     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 224;
564     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 166;
565     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 102;
566     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 87;
567     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 25;
570     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
571     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
572     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
573     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
574     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '5';
575     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
576     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
577     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
578     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
579     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
580     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
581     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
582     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
583     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
584     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
586     /* Even though the entire range of DDR2 is chosen, the load will
587      * stop when the ftp reaches the end of the file */
588     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
589     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
590     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
592     /* Alternative bootMode not configured for now */
593     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
595     ibl.chkSum = 0;
599 menuitem "EVM c6678 IBL";
601 hotmenu setConfig_c6678_main()
603         ibl.iblMagic = ibl_MAGIC_VALUE;
604         ibl.iblEvmType = ibl_EVM_C6678L;
606         /* Main PLL: 100 MHz reference, 1GHz output */
607         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
608         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
609         ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
610         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
611         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
613         /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
614         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 0; 
615         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
616         ibl.pllConfig[ibl_DDR_PLL].mult           = 12;
617         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
618         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 400;
620     /* Net PLL: 100 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 350 MHz to PA) */
621         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
622         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
623         ibl.pllConfig[ibl_NET_PLL].mult                   = 21;
624         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
625         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1050;
628         ibl.ddrConfig.configDdr = 1;
629         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;
631         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
632         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
633         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
634         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
635         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
636         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
637         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
638         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
639         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
640         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
641         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
642         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
643         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
644         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
645         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
646         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
647         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
648         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
649         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
650         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
651         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
652         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
653         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
654         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
657         ibl.sgmiiConfig[0].configure     = 1;
658         ibl.sgmiiConfig[0].adviseAbility = 1;
659         ibl.sgmiiConfig[0].control               = 1;
660         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
661         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
662         ibl.sgmiiConfig[0].auxConfig     = 0x41;
664         ibl.sgmiiConfig[1].configure     = 1;
665         ibl.sgmiiConfig[1].adviseAbility = 1;
666         ibl.sgmiiConfig[1].control               = 1;
667         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
668         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
669         ibl.sgmiiConfig[1].auxConfig     = 0x41;
671         ibl.mdioConfig.nMdioOps = 0;
673         ibl.spiConfig.addrWidth  = 24;
674         ibl.spiConfig.nPins      = 5;
675         ibl.spiConfig.mode       = 1;
676         ibl.spiConfig.csel       = 2;
677         ibl.spiConfig.c2tdelay   = 1;
678         ibl.spiConfig.busFreqMHz = 20;
680         ibl.emifConfig[0].csSpace    = 2;
681         ibl.emifConfig[0].busWidth   = 8;
682         ibl.emifConfig[0].waitEnable = 0;
684         ibl.emifConfig[1].csSpace    = 0;
685         ibl.emifConfig[1].busWidth   = 0;
686         ibl.emifConfig[1].waitEnable = 0;
688         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
689         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
690         ibl.bootModes[0].port     = 0;
692         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
693         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;
694         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;
695         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
696     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
697     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* 10 MB */
698     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
699     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
700     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* 10 MB */
701     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
703     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
704     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
705     ibl.bootModes[1].port     = 0;
707     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
708     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;
709     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;
710     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_CHIPSEL_2;
712     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
713     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* 10 MB */
714     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
715     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
716     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* 10 MB */
717     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
719     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
720     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
721     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
722     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
723     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
725     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
726     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
727     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
728     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
729     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
731     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
732     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
733     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
734     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
735     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
736     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
737     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
738     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
739     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
740     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
741     
742     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
743     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
745     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
746     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
747     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
748     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
749     
750         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
751         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
752         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
754         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
755         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
756         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
757         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
760     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
761     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
762     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
763     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
765     /* Use the e-fuse value */
766     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
767     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
768     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
769     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
770     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
771     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
774     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
775     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
776     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
777     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
778     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
779     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
780     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
781     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
782     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
783     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
784     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
785     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
786     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
787     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
788     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
790     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
791     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0xA00000;         /* 10 MB */
792     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
794     ibl.chkSum = 0;
797 menuitem "EVM c6670 IBL";
799 hotmenu setConfig_c6670_main()
801         ibl.iblMagic = ibl_MAGIC_VALUE;
802         ibl.iblEvmType = ibl_EVM_C6670L;
804         /* Main PLL: 122.88 MHz reference, 983 MHz output */
805         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
806         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
807         ibl.pllConfig[ibl_MAIN_PLL].mult          = 16;
808         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
809         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 983;
811         /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
812         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 1; 
813         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
814         ibl.pllConfig[ibl_DDR_PLL].mult           = 12;
815         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
816         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 400;
818     /* Net PLL: 122.88 MHz reference, 1044 MHz output (followed by a built in divide by 3 to give 348 MHz to PA) */
819         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
820         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
821         ibl.pllConfig[ibl_NET_PLL].mult           = 17;
822         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
823         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1044;
826         ibl.ddrConfig.configDdr = 1;
827         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;
829         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
830         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
831         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
832         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
833         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
834         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
835         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
836         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
837         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
838         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
839         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
840         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
841         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
842         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
843         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
844         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
845         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
846         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
847         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
848         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
849         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
850         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
851         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
852         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
855         ibl.sgmiiConfig[0].configure     = 1;
856         ibl.sgmiiConfig[0].adviseAbility = 1;
857         ibl.sgmiiConfig[0].control               = 1;
858         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
859         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
860         ibl.sgmiiConfig[0].auxConfig     = 0x41;
862         ibl.sgmiiConfig[1].configure     = 1;
863         ibl.sgmiiConfig[1].adviseAbility = 1;
864         ibl.sgmiiConfig[1].control               = 1;
865         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
866         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
867         ibl.sgmiiConfig[1].auxConfig     = 0x51;
869         ibl.mdioConfig.nMdioOps = 0;
871         ibl.spiConfig.addrWidth  = 24;
872         ibl.spiConfig.nPins      = 5;
873         ibl.spiConfig.mode       = 1;
874         ibl.spiConfig.csel       = 2;
875         ibl.spiConfig.c2tdelay   = 1;
876         ibl.spiConfig.busFreqMHz = 20;
878         ibl.emifConfig[0].csSpace    = 2;
879         ibl.emifConfig[0].busWidth   = 8;
880         ibl.emifConfig[0].waitEnable = 0;
882         ibl.emifConfig[1].csSpace    = 0;
883         ibl.emifConfig[1].busWidth   = 0;
884         ibl.emifConfig[1].waitEnable = 0;
886         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
887         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
888         ibl.bootModes[0].port     = 0;
890         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
891         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;
892         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;
893         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
894     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
895     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* 10 MB */
896     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
897     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
898     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* 10 MB */
899     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
901     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
902     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
903     ibl.bootModes[1].port     = 0;
905     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
906     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;
907     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;
908     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
910     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
911     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* 10 MB */
912     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
913     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Base address of DDR2 */
914     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* 10 MB */
915     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Base address of DDR2 */
917     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
918     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
919     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
920     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
921     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
923     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
924     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
925     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
926     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
927     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
929     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
930     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
931     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
932     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
933     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
934     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
935     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
936     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
937     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
938     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
940     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
941     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
943     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
944     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
945     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
946     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
947     
948         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
949         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
950         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
952         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
953         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
954         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
955         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
958     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
959     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
960     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
961     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
963     /* Use the e-fuse value */
964     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
965     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
966     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
967     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
968     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
969     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
972     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
973     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
974     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
975     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
976     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
977     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
978     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
979     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
980     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
981     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
982     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
983     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
984     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
985     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
986     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
988     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
989     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0xA00000;         /* 10 MB */
990     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
992     ibl.chkSum = 0;