]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/util/i2cConfig/i2cConfig.gel
c66x: Update MAIN PLL config
[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,100,113);
149     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
150     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
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     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
178     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
179     ibl.bootModes[1].port     = 0;
181     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
182     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
183     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
184     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
185     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
186     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
188     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0xe0000000;       /* Image 0 load start address in LE mode */
189     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
190     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in LE mode */
191     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0xe0000000;       /* Image 1 load start address in LE mode */
192     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
193     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in LE mode */
194     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0xe0000000;       /* Image 0 load start address in BE mode */
195     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
196     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in BE mode */
197     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0xe0000000;       /* Image 1 load start address in BE mode */
198     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
199     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in BE mode */
202     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
203     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
204     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
205     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
206     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
208     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
209     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
210     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
211     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
212     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
214     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
215     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
216     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
217     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
218     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
219     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
220     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
221     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
222     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
223     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
225     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
226     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
228     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
229     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
230     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
231     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
233     /* bootMode[2] not configured */
234     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
235     
236     ibl.chkSum = 0;
240 menuitem "EVM c6474 Mez IBL";
242 hotmenu setConfig_c6474()
244     ibl.iblMagic = ibl_MAGIC_VALUE;
245     ibl.iblEvmType = ibl_EVM_C6474M;
247     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
248     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
249     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
250     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
251     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
253     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
254     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
256     /* The network PLL. The multipliers/dividers are fixed */
257     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
259     /* EMIF configuration. The values are for DDR at 533 MHz  */
260     ibl.ddrConfig.configDdr = TRUE;
262     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
263     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
264     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
265     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
266     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
268     /* SGMII 0 is present */
269     ibl.sgmiiConfig[0].configure = TRUE;
270     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
271     ibl.sgmiiConfig[0].control       = 0x20;
272     ibl.sgmiiConfig[0].txConfig      = 0x00000ea3;
273     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
274     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
276     /* There is no port 1 on the 6474 */
277     ibl.sgmiiConfig[1].configure = FALSE;
279     /* MDIO configuration */
280     ibl.mdioConfig.nMdioOps = 8;
281     ibl.mdioConfig.mdioClkDiv = 0x26;
282     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
284     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
285     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
286     ibl.mdioConfig.mdio[2] =  (1 << 30) | (26 << 21) | (13 << 16) | 0x0047;
287     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
289     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | (13 << 16) | 0x8140;
290     ibl.mdioConfig.mdio[5] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
291     ibl.mdioConfig.mdio[6] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
292     ibl.mdioConfig.mdio[7] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
294     /* spiConfig and emifConfig not needed */
296     /* Ethernet configuration for Boot mode 0 */
297     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
298     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
299     ibl.bootModes[0].port     = 0;
301     /* Bootp is disabled. The server and file name are provided here */
302     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
303     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
304     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
305     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
307     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    10,218,109,35);
308     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  10,218,109,196);
309     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 10,218,109,1);
310     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
312     /* Set the hardware address as 0 so the e-fuse value will be used */
313     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
314     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
315     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
316     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
317     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
318     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
320     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
321     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
322     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
323     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
324     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
325     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
326     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
327     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
328     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
329     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
330     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
331     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
332     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
333     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
334     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
336     /* Even though the entire range of DDR2 is chosen, the load will
337      * stop when the ftp reaches the end of the file */
338     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
339     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
340     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
342     /* Alternative bootMode not configured for now */
343     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
345     ibl.chkSum = 0;
348 menuitem "EVM c6474 Lite EVM IBL";
350 hotmenu setConfig_c6474lite()
352     ibl.iblMagic = ibl_MAGIC_VALUE;
353     ibl.iblEvmType = ibl_EVM_C6474L;
355     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
356     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
357     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
358     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
359     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
361     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
362     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
364     /* The network PLL. The multipliers/dividers are fixed */
365     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
367     /* EMIF configuration. The values are for DDR at 533 MHz  */
368     ibl.ddrConfig.configDdr = TRUE;
370     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
371     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
372     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
373     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
374     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
376     /* SGMII 0 is present */
377     ibl.sgmiiConfig[0].configure = TRUE;
378     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
379     ibl.sgmiiConfig[0].control       = 0x20;
380     ibl.sgmiiConfig[0].txConfig      = 0x00000e23;
381     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
382     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
384     /* There is no port 1 on the 6474 */
385     ibl.sgmiiConfig[1].configure = FALSE;
387     /* MDIO configuration */
388     ibl.mdioConfig.nMdioOps = 5;
389     ibl.mdioConfig.mdioClkDiv = 0x20;
390     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
392     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
393     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
394     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
396     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
397     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
399     /* spiConfig and emifConfig not needed */
401     /* Ethernet configuration for Boot mode 0 */
402     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
403     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
404     ibl.bootModes[0].port     = 0;
406     /* Bootp is disabled. The server and file name are provided here */
407     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
408     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
409     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
410     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
412     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,114);
413     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
414     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
415     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
417     /* Set the hardware address as 0 so the e-fuse value will be used */
418     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
419     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
420     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
421     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
422     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
423     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
426     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
427     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
428     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
429     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
430     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
431     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = 'l';
432     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = '-';
433     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'l';
434     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = 'e';
435     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = '.';
436     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'b';
437     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'i';
438     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = 'n';
439     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
440     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
443     /* Even though the entire range of DDR2 is chosen, the load will
444      * stop when the ftp reaches the end of the file */
445     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
446     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
447     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
449     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
450     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
451     ibl.bootModes[1].port     = 0;
453     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
454     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
455     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
456     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
457     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
458     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
459     
460     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
461     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
462     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
463     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
464     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
465     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
466     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
467     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
468     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
469     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
470     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
471     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
474     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
475     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
476     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
477     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
478     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
480     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
481     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
482     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
483     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
484     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
486     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
487     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
488     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
489     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
490     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
491     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
492     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
493     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
494     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
495     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
497     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
498     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
500     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
501     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
502     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
503     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
506     /* bootMode[2] not configured */
507     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
509     ibl.chkSum = 0;
512 menuitem "EVM c6457 EVM IBL";
514 hotmenu setConfig_c6457()
516     ibl.iblMagic = ibl_MAGIC_VALUE;
517     ibl.iblEvmType = ibl_EVM_C6457L;
519     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
520     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
521     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
522     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
523     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
525     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
526     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
528     /* The network PLL. The multipliers/dividers are fixed */
529     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
531     /* EMIF configuration */
532     ibl.ddrConfig.configDdr = TRUE;
534     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
535     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a0e; /* Refresh 333Mhz */ 
536     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x832474da; /* Timing 1 */
537     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0144c742; /* Timing 2 */
538     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x001800C6;
540     /* SGMII 0 is present */
541     ibl.sgmiiConfig[0].configure = TRUE;
542     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
543     ibl.sgmiiConfig[0].control       = 0x20;
544     ibl.sgmiiConfig[0].txConfig      = 0x00000e21;
545     ibl.sgmiiConfig[0].rxConfig      = 0x00081021;
546     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
548     /* There is no port 1 on the 6457 */
549     ibl.sgmiiConfig[1].configure = FALSE;
551     /* MDIO configuration */
552     ibl.mdioConfig.nMdioOps = 5;
553     ibl.mdioConfig.mdioClkDiv = 0xa5;
554     ibl.mdioConfig.interDelay = 3000;   /* ~2ms at 1000 MHz */
556     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
557     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
558     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
559     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
560     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
562     /* spiConfig and emifConfig not needed */
564     /* Ethernet configuration for Boot mode 0 */
565     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
566     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
567     ibl.bootModes[0].port = 0;
569     /* Bootp is disabled. The server and file name are provided here */
570     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
571     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
572     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
573     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
575     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,115);
576     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
577     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
578     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
580     /* Set the hardware address as 0 so the e-fuse value will be used */
581     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
582     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
583     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
584     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
585     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
586     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
588     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
589     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
590     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
591     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
592     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '7';
593     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
594     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
595     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
596     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
597     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
598     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
599     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
600     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
601     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
602     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
605     /* Even though the entire range of DDR2 is chosen, the load will
606      * stop when the ftp reaches the end of the file */
607     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
608     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
609     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
611     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
612     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
613     ibl.bootModes[1].port     = 0;
615     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
616     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
617     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
618     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
619     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
620     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
621     
622     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0xe0000000;       /* Image 0 load start address in LE mode */
623     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
624     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in LE mode */
625     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0xe0000000;       /* Image 1 load start address in LE mode */
626     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
627     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in LE mode */
628     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0xe0000000;       /* Image 0 load start address in BE mode */
629     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
630     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in BE mode */
631     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0xe0000000;       /* Image 1 load start address in BE mode */
632     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
633     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in BE mode */
636     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
637     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
638     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
639     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
640     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
642     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
643     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
644     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
645     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
646     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
648     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
649     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
650     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
651     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
652     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
653     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
654     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
655     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
656     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
657     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
659     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
660     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
662     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
663     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
664     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
665     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
668     /* bootMode[2] not configured */
669     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
671     ibl.chkSum = 0;
674 menuitem "EVM c6455 IBL";
676 hotmenu setConfig_c6455()
678     ibl.iblMagic = ibl_MAGIC_VALUE;
679     ibl.iblEvmType = ibl_EVM_C6455L;
681     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
682     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
683     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
684     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
685     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
687     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
688     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
690     /* The network PLL. The multipliers/dividers are fixed */
691     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
693     /* EMIF configuration. The values are for DDR at 500 MHz  */
694     ibl.ddrConfig.configDdr = TRUE;
696     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00538822; /* timing, 32bit wide */
697     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x000007a2; /* Refresh 500Mhz */ 
698     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x3edb4b91; /* Timing 1 */
699     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00a2c722; /* Timing 2 */
700     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x00000005; /* PHY read latency for CAS 4 is 4 + 2 - 1 */
702     /* SGMII not present */
703     ibl.sgmiiConfig[0].configure = FALSE;
704     ibl.sgmiiConfig[1].configure = FALSE;
706     /* MDIO configuration */
707     ibl.mdioConfig.nMdioOps = 0;
708     ibl.mdioConfig.mdioClkDiv = 0x20;
709     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
711     ibl.mdioConfig.mdio[0] =  (1 << 30) | (14 << 21) | (0 << 16) | 0xd5d0;
713     /* spiConfig and emifConfig not needed */
715     /* Ethernet configuration for Boot mode 0 */
716     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
717     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
718     ibl.bootModes[0].port     = 0;
720     /* Bootp is disabled. The server and file name are provided here */
721     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
722     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
723     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
724     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
726     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,118);
727     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
728     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
729     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
731     /* There is no e-fuse mac address. A value must be assigned */
732     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 10;
733     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 224;
734     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 166;
735     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 102;
736     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 87;
737     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 25;
740     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
741     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
742     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
743     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
744     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '5';
745     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
746     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
747     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
748     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
749     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
750     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
751     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
752     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
753     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
754     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
756     /* Even though the entire range of DDR2 is chosen, the load will
757      * stop when the ftp reaches the end of the file */
758     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
759     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
760     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
762     /* Alternative bootMode not configured for now */
763     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
765     ibl.chkSum = 0;
769 menuitem "EVM c6678 IBL";
771 hotmenu setConfig_c6678_main()
773         ibl.iblMagic = ibl_MAGIC_VALUE;
774         ibl.iblEvmType = ibl_EVM_C6678L;
776         /* Main PLL: 100 MHz reference, 1GHz output */
777         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
778         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
779         ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
780         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
781         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
783         /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
784         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 0; 
785         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
786         ibl.pllConfig[ibl_DDR_PLL].mult           = 12;
787         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
788         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 400;
790     /* Net PLL: 100 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 350 MHz to PA) */
791         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
792         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
793         ibl.pllConfig[ibl_NET_PLL].mult                   = 21;
794         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
795         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1050;
798         ibl.ddrConfig.configDdr = 1;
799         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;
801         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
802         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
803         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
804         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
805         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
806         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
807         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
808         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
809         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
810         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
811         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
812         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
813         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
814         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
815         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
816         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
817         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
818         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
819         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
820         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
821         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
822         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
823         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
824         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
827         ibl.sgmiiConfig[0].configure     = 1;
828         ibl.sgmiiConfig[0].adviseAbility = 1;
829         ibl.sgmiiConfig[0].control               = 1;
830         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
831         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
832         ibl.sgmiiConfig[0].auxConfig     = 0x41;
834         ibl.sgmiiConfig[1].configure     = 1;
835         ibl.sgmiiConfig[1].adviseAbility = 1;
836         ibl.sgmiiConfig[1].control               = 1;
837         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
838         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
839         ibl.sgmiiConfig[1].auxConfig     = 0x41;
841         ibl.mdioConfig.nMdioOps = 0;
843         ibl.spiConfig.addrWidth  = 24;
844         ibl.spiConfig.nPins      = 5;
845         ibl.spiConfig.mode       = 1;
846         ibl.spiConfig.csel       = 2;
847         ibl.spiConfig.c2tdelay   = 1;
848         ibl.spiConfig.busFreqMHz = 20;
850         ibl.emifConfig[0].csSpace    = 2;
851         ibl.emifConfig[0].busWidth   = 8;
852         ibl.emifConfig[0].waitEnable = 0;
854         ibl.emifConfig[1].csSpace    = 0;
855         ibl.emifConfig[1].busWidth   = 0;
856         ibl.emifConfig[1].waitEnable = 0;
858         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
859         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
860         ibl.bootModes[0].port     = 0;
862         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
863         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
864         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
865         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
866         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
867         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
868     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
869     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
870     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
871     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
872     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
873     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
874     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
875     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
876     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
877     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
878     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
879     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
881     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
882     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
883     ibl.bootModes[1].port     = 0;
885     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
886     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in LE mode */
887     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
888     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in BE mode */
889     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
890     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_CHIPSEL_2;
892     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
893     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
894     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
895     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
896     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
897     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
898     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
899     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size in BE mode */
900     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
901     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
902     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
903     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
906     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
907     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
908     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
909     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
910     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
912     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
913     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
914     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
915     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
916     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
918     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
919     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
920     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
921     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
922     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
923     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
924     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
925     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
926     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
927     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
928     
929     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
930     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
932     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
933     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
934     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
935     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
936     
937         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
938         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
939         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
941         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
942         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
943         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
944         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
947     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
948     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
949     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
950     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
952     /* Use the e-fuse value */
953     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
954     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
955     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
956     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
957     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
958     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
961     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
962     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
963     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
964     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
965     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
966     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
967     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
968     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
969     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
970     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
971     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
972     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
973     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
974     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
975     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
977     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
978     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
979     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
981     ibl.chkSum = 0;
984 menuitem "EVM c6670 IBL";
986 hotmenu setConfig_c6670_main()
988         ibl.iblMagic = ibl_MAGIC_VALUE;
989         ibl.iblEvmType = ibl_EVM_C6670L;
991         /* Main PLL: 122.88 MHz reference, 983 MHz output */
992         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
993         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
994         ibl.pllConfig[ibl_MAIN_PLL].mult          = 16;
995         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
996         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 983;
998         /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
999         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 0;
1000         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
1001         ibl.pllConfig[ibl_DDR_PLL].mult           = 12;
1002         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
1003         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 400;
1005     /* Net PLL: 122.88 MHz reference, 1044 MHz output (followed by a built in divide by 3 to give 348 MHz to PA) */
1006         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
1007         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
1008         ibl.pllConfig[ibl_NET_PLL].mult           = 17;
1009         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
1010         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1044;
1013         ibl.ddrConfig.configDdr = 1;
1014         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;
1016         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
1017         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
1018         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
1019         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
1020         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
1021         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
1022         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
1023         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
1024         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
1025         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
1026         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
1027         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
1028         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
1029         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
1030         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
1031         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
1032         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
1033         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
1034         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
1035         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
1036         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
1037         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
1038         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
1039         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
1042         ibl.sgmiiConfig[0].configure     = 1;
1043         ibl.sgmiiConfig[0].adviseAbility = 1;
1044         ibl.sgmiiConfig[0].control               = 1;
1045         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
1046         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
1047         ibl.sgmiiConfig[0].auxConfig     = 0x41;
1049         ibl.sgmiiConfig[1].configure     = 1;
1050         ibl.sgmiiConfig[1].adviseAbility = 1;
1051         ibl.sgmiiConfig[1].control               = 1;
1052         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
1053         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
1054         ibl.sgmiiConfig[1].auxConfig     = 0x51;
1056         ibl.mdioConfig.nMdioOps = 0;
1058         ibl.spiConfig.addrWidth  = 24;
1059         ibl.spiConfig.nPins      = 5;
1060         ibl.spiConfig.mode       = 1;
1061         ibl.spiConfig.csel       = 2;
1062         ibl.spiConfig.c2tdelay   = 1;
1063         ibl.spiConfig.busFreqMHz = 20;
1065         ibl.emifConfig[0].csSpace    = 2;
1066         ibl.emifConfig[0].busWidth   = 8;
1067         ibl.emifConfig[0].waitEnable = 0;
1069         ibl.emifConfig[1].csSpace    = 0;
1070         ibl.emifConfig[1].busWidth   = 0;
1071         ibl.emifConfig[1].waitEnable = 0;
1073         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
1074         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
1075         ibl.bootModes[0].port     = 0;
1077         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
1078         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
1079         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
1080         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
1081         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
1082         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
1083     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1084     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
1085     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1086     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1087     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
1088     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1089     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1090     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
1091     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1092     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1093     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
1094     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1096     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
1097     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
1098     ibl.bootModes[1].port     = 0;
1100     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
1101     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in LE mode */
1102     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
1103     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in BE mode */
1104     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
1105     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
1107     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1108     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
1109     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1110     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1111     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
1112     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1113     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1114     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size mode */
1115     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1116     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1117     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
1118     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1121     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
1122     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
1123     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
1124     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
1125     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
1127     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
1128     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
1129     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
1130     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
1131     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
1133     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
1134     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
1135     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
1136     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
1137     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
1138     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
1139     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
1140     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
1141     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
1142     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
1144     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
1145     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
1147     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
1148     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
1149     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
1150     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
1151     
1152         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
1153         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
1154         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
1156         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
1157         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
1158         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
1159         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
1162     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
1163     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
1164     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
1165     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
1167     /* Use the e-fuse value */
1168     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
1169     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
1170     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
1171     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
1172     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
1173     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
1176     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
1177     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
1178     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
1179     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
1180     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
1181     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
1182     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
1183     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
1184     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
1185     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
1186     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
1187     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
1188     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
1189     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
1190     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
1192     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
1193     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
1194     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
1196     ibl.chkSum = 0;