include/configs/[H-N]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_...
[platform/kernel/u-boot.git] / include / configs / PM520.h
1 /*
2  * (C) Copyright 2003-2005
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  * MA 02111-1307 USA
22  */
23
24 #ifndef __CONFIG_H
25 #define __CONFIG_H
26
27 /*
28  * High Level Configuration Options
29  * (easy to change)
30  */
31
32 #define CONFIG_MPC5200
33 #define CONFIG_MPC5xxx          1       /* This is an MPC5xxx CPU */
34 #define CONFIG_PM520            1       /* ... on PM520 board */
35
36 #define CFG_MPC5XXX_CLKIN       33000000 /* ... running at 33MHz */
37
38 #define CONFIG_MISC_INIT_R
39
40 #define BOOTFLAG_COLD           0x01    /* Normal Power-On: Boot from FLASH  */
41 #define BOOTFLAG_WARM           0x02    /* Software reboot           */
42
43 /*
44  * Serial console configuration
45  */
46 #define CONFIG_PSC_CONSOLE      1       /* console is on PSC1 */
47 #define CONFIG_BAUDRATE         9600    /* ... at 9600 bps */
48 #define CFG_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200, 230400 }
49
50
51 #ifdef CONFIG_MPC5200   /* MPC5100 PCI is not supported yet. */
52 /*
53  * PCI Mapping:
54  * 0x40000000 - 0x4fffffff - PCI Memory
55  * 0x50000000 - 0x50ffffff - PCI IO Space
56  */
57 #define CONFIG_PCI              1
58 #define CONFIG_PCI_PNP          1
59 #define CONFIG_PCI_SCAN_SHOW    1
60
61 #define CONFIG_PCI_MEM_BUS      0x40000000
62 #define CONFIG_PCI_MEM_PHYS     CONFIG_PCI_MEM_BUS
63 #define CONFIG_PCI_MEM_SIZE     0x10000000
64
65 #define CONFIG_PCI_IO_BUS       0x50000000
66 #define CONFIG_PCI_IO_PHYS      CONFIG_PCI_IO_BUS
67 #define CONFIG_PCI_IO_SIZE      0x01000000
68
69 #define CONFIG_NET_MULTI        1
70 #define CONFIG_MII              1
71 #define CONFIG_EEPRO100         1
72 #define CFG_RX_ETH_BUFFER       8  /* use 8 rx buffer on eepro100  */
73 #undef  CONFIG_NS8382X
74
75 #endif
76
77 /* Partitions */
78 #define CONFIG_DOS_PARTITION
79
80 /* USB */
81 #if 1
82 #define CONFIG_USB_OHCI
83 #define CONFIG_USB_STORAGE
84 #endif
85
86 #if !defined(CONFIG_BOOT_ROM)
87 /* DoC requires legacy NAND for now */
88 #define CFG_NAND_LEGACY
89 #endif
90
91
92 /*
93  * Command line configuration.
94  */
95 #include <config_cmd_default.h>
96
97 #define CONFIG_CMD_BEDBUG
98 #define CONFIG_CMD_DATE
99 #define CONFIG_CMD_DHCP
100 #define CONFIG_CMD_EEPROM
101 #define CONFIG_CMD_FAT
102 #define CONFIG_CMD_I2C
103 #define CONFIG_CMD_IDE
104 #define CONFIG_CMD_NFS
105 #define CONFIG_CMD_SNTP
106 #define CONFIG_CMD_USB
107
108 #if !defined(CONFIG_BOOT_ROM)
109 #define CONFIG_CMD_DOC
110 #endif
111
112 #if defined(CONFIG_MPC5200)
113 #define CONFIG_CMD_PCI
114 #endif
115
116
117 /*
118  * Autobooting
119  */
120 #define CONFIG_BOOTDELAY        5       /* autoboot after 5 seconds */
121
122 #define CONFIG_PREBOOT  "echo;" \
123         "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
124         "echo"
125
126 #undef  CONFIG_BOOTARGS
127
128 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
129         "netdev=eth0\0"                                                 \
130         "hostname=pm520\0"                                                      \
131         "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
132                 "nfsroot=${serverip}:${rootpath}\0"                     \
133         "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
134         "addip=setenv bootargs ${bootargs} "                            \
135                 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
136                 ":${hostname}:${netdev}:off panic=1\0"                  \
137         "flash_nfs=run nfsargs addip;"                                  \
138                 "bootm ${kernel_addr}\0"                                \
139         "flash_self=run ramargs addip;"                                 \
140                 "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
141         "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
142         "rootpath=/opt/eldk30/ppc_82xx\0"                                       \
143         "bootfile=/tftpboot/PM520/uImage\0"                             \
144         ""
145
146 #define CONFIG_BOOTCOMMAND      "run flash_self"
147
148 #if defined(CONFIG_MPC5200)
149 /*
150  * IPB Bus clocking configuration.
151  */
152 #undef CFG_IPBCLK_EQUALS_XLBCLK                 /* define for 133MHz speed */
153 #endif
154 /*
155  * I2C configuration
156  */
157 #define CONFIG_HARD_I2C         1       /* I2C with hardware support */
158 #define CFG_I2C_MODULE          2       /* Select I2C module #1 or #2 */
159
160 #define CFG_I2C_SPEED           100000 /* 100 kHz */
161 #define CFG_I2C_SLAVE           0x7F
162
163 /*
164  * EEPROM configuration
165  */
166 #define CFG_I2C_EEPROM_ADDR             0x58
167 #define CFG_I2C_EEPROM_ADDR_LEN         1
168 #define CFG_EEPROM_PAGE_WRITE_BITS      4
169 #define CFG_EEPROM_PAGE_WRITE_DELAY_MS  10
170
171 /*
172  * RTC configuration
173  */
174 #define CONFIG_RTC_PCF8563
175 #define CFG_I2C_RTC_ADDR                0x51
176
177 /*
178  * Disk-On-Chip configuration
179  */
180
181 #define CFG_DOC_SHORT_TIMEOUT
182 #define CFG_MAX_DOC_DEVICE      1       /* Max number of DOC devices    */
183
184 #define CFG_DOC_SUPPORT_2000
185 #define CFG_DOC_SUPPORT_MILLENNIUM
186 #define CFG_DOC_BASE            0xE0000000
187 #define CFG_DOC_SIZE            0x00100000
188
189 #if defined(CONFIG_BOOT_ROM)
190 /*
191  * Flash configuration (8,16 or 32 MB)
192  * TEXT base always at 0xFFF00000
193  * ENV_ADDR always at  0xFFF40000
194  * FLASH_BASE at 0xFA000000 for 64 MB
195  *               0xFC000000 for 32 MB
196  *               0xFD000000 for 16 MB
197  *               0xFD800000 for  8 MB
198  */
199 #define CFG_FLASH_BASE          0xFA000000
200 #define CFG_FLASH_SIZE          0x04000000
201 #define CFG_BOOTROM_BASE        0xFFF00000
202 #define CFG_BOOTROM_SIZE        0x00080000
203 #define CFG_ENV_ADDR            (0xFDF00000 + 0x40000)
204 #else
205 /*
206  * Flash configuration (8,16 or 32 MB)
207  * TEXT base always at 0xFFF00000
208  * ENV_ADDR always at  0xFFF40000
209  * FLASH_BASE at 0xFC000000 for 64 MB
210  *               0xFE000000 for 32 MB
211  *               0xFF000000 for 16 MB
212  *               0xFF800000 for  8 MB
213  */
214 #define CFG_FLASH_BASE          0xFC000000
215 #define CFG_FLASH_SIZE          0x04000000
216 #define CFG_ENV_ADDR            (0xFFF00000 + 0x40000)
217 #endif
218 #define CFG_MAX_FLASH_BANKS     1       /* max num of memory banks      */
219
220 #define CFG_MAX_FLASH_SECT      256     /* max num of sects on one chip */
221
222 #define CFG_FLASH_ERASE_TOUT    240000  /* Flash Erase Timeout (in ms)  */
223 #define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (in ms)  */
224 #define CFG_FLASH_LOCK_TOUT     5       /* Timeout for Flash Set Lock Bit (in ms) */
225 #define CFG_FLASH_UNLOCK_TOUT   10000   /* Timeout for Flash Clear Lock Bits (in ms) */
226 #define CFG_FLASH_PROTECTION            /* "Real" (hardware) sectors protection */
227
228 #define PHYS_FLASH_SECT_SIZE    0x00040000 /* 256 KB sectors (x2) */
229
230 #undef CONFIG_FLASH_16BIT       /* Flash is 32-bit */
231
232
233 /*
234  * Environment settings
235  */
236 #define CFG_ENV_IS_IN_FLASH     1
237 #define CFG_ENV_SIZE            0x10000
238 #define CFG_ENV_SECT_SIZE       0x40000
239 #define CONFIG_ENV_OVERWRITE    1
240
241 /*
242  * Memory map
243  */
244 #define CFG_MBAR                0xf0000000
245 #define CFG_SDRAM_BASE          0x00000000
246 #define CFG_DEFAULT_MBAR        0x80000000
247
248 /* Use SRAM until RAM will be available */
249 #define CFG_INIT_RAM_ADDR       MPC5XXX_SRAM
250 #define CFG_INIT_RAM_END        MPC5XXX_SRAM_SIZE       /* End of used area in DPRAM */
251
252
253 #define CFG_GBL_DATA_SIZE       128     /* size in bytes reserved for initial data */
254 #define CFG_GBL_DATA_OFFSET     (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
255 #define CFG_INIT_SP_OFFSET      CFG_GBL_DATA_OFFSET
256
257 #define CFG_MONITOR_BASE    TEXT_BASE
258 #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
259 #   define CFG_RAMBOOT          1
260 #endif
261
262 #define CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
263 #define CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
264 #define CFG_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
265
266 /*
267  * Ethernet configuration
268  */
269 #define CONFIG_MPC5xxx_FEC      1
270 /*
271  * Define CONFIG_FEC_10MBIT to force FEC at 10Mb
272  */
273 /* #define CONFIG_FEC_10MBIT 1 */
274 #define CONFIG_PHY_ADDR         0x00
275
276 /*
277  * GPIO configuration
278  */
279 #define CFG_GPS_PORT_CONFIG     0x10000004
280
281 /*
282  * Miscellaneous configurable options
283  */
284 #define CFG_LONGHELP                    /* undef to save memory     */
285 #define CFG_PROMPT              "=> "   /* Monitor Command Prompt   */
286 #if defined(CONFIG_CMD_KGDB)
287 #define CFG_CBSIZE              1024    /* Console I/O Buffer Size  */
288 #else
289 #define CFG_CBSIZE              256     /* Console I/O Buffer Size  */
290 #endif
291 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)   /* Print Buffer Size */
292 #define CFG_MAXARGS             16              /* max number of command args   */
293 #define CFG_BARGSIZE            CFG_CBSIZE      /* Boot Argument Buffer Size    */
294
295 #define CFG_MEMTEST_START       0x00100000      /* memtest works on */
296 #define CFG_MEMTEST_END         0x00f00000      /* 1 ... 15 MB in DRAM  */
297
298 #define CFG_LOAD_ADDR           0x100000        /* default load address */
299
300 #define CFG_HZ                  1000    /* decrementer freq: 1 ms ticks */
301
302 #define CFG_CACHELINE_SIZE      32      /* For MPC5xxx CPUs */
303 #if defined(CONFIG_CMD_KGDB)
304 #  define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value */
305 #endif
306
307 /*
308  * Various low-level settings
309  */
310 #if defined(CONFIG_MPC5200)
311 #define CFG_HID0_INIT           HID0_ICE | HID0_ICFI
312 #define CFG_HID0_FINAL          HID0_ICE
313 #else
314 #define CFG_HID0_INIT           0
315 #define CFG_HID0_FINAL          0
316 #endif
317
318 #if defined(CONFIG_BOOT_ROM)
319 #define CFG_BOOTCS_START        CFG_BOOTROM_BASE
320 #define CFG_BOOTCS_SIZE         CFG_BOOTROM_SIZE
321 #define CFG_BOOTCS_CFG          0x00047800
322 #define CFG_CS0_START           CFG_BOOTROM_BASE
323 #define CFG_CS0_SIZE            CFG_BOOTROM_SIZE
324 #define CFG_CS1_START           CFG_FLASH_BASE
325 #define CFG_CS1_SIZE            CFG_FLASH_SIZE
326 #define CFG_CS1_CFG             0x0004FF00
327 #else
328 #define CFG_BOOTCS_START        CFG_FLASH_BASE
329 #define CFG_BOOTCS_SIZE         CFG_FLASH_SIZE
330 #define CFG_BOOTCS_CFG          0x0004FF00
331 #define CFG_CS0_START           CFG_FLASH_BASE
332 #define CFG_CS0_SIZE            CFG_FLASH_SIZE
333 #define CFG_CS1_START           CFG_DOC_BASE
334 #define CFG_CS1_SIZE            CFG_DOC_SIZE
335 #define CFG_CS1_CFG             0x00047800
336 #endif
337
338 #define CFG_CS_BURST            0x00000000
339 #define CFG_CS_DEADCYCLE        0x33333333
340
341 #define CFG_RESET_ADDRESS       0xff000000
342
343 /*-----------------------------------------------------------------------
344  * USB stuff
345  *-----------------------------------------------------------------------
346  */
347 #define CONFIG_USB_CLOCK        0x0001BBBB
348 #define CONFIG_USB_CONFIG       0x00005000
349
350 /*-----------------------------------------------------------------------
351  * IDE/ATA stuff Supports IDE harddisk
352  *-----------------------------------------------------------------------
353  */
354
355 #undef  CONFIG_IDE_8xx_PCCARD           /* Use IDE with PC Card Adapter */
356
357 #undef  CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
358 #undef  CONFIG_IDE_LED                  /* LED   for ide not supported  */
359
360 #undef  CONFIG_IDE_RESET                /* reset for ide supported      */
361 #define CONFIG_IDE_PREINIT
362
363 #define CFG_IDE_MAXBUS          1       /* max. 1 IDE bus               */
364 #define CFG_IDE_MAXDEVICE       2       /* max. 2 drive per IDE bus     */
365
366 #define CFG_ATA_IDE0_OFFSET     0x0000
367
368 #define CFG_ATA_BASE_ADDR       MPC5XXX_ATA
369
370 /* Offset for data I/O                  */
371 #define CFG_ATA_DATA_OFFSET     (0x0060)
372
373 /* Offset for normal register accesses  */
374 #define CFG_ATA_REG_OFFSET      (CFG_ATA_DATA_OFFSET)
375
376 /* Offset for alternate registers       */
377 #define CFG_ATA_ALT_OFFSET      (0x005C)
378
379 /* Interval between registers                                                */
380 #define CFG_ATA_STRIDE          4
381
382 #endif /* __CONFIG_H */