]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/TQM5200.h
disk: convert CONFIG_DOS_PARTITION to Kconfig
[people/ms/u-boot.git] / include / configs / TQM5200.h
1 /*
2 * (C) Copyright 2003-2014
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * (C) Copyright 2004-2006
6 * Martin Krause, TQ-Systems GmbH, martin.krause@tqs.de
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11 #ifndef __CONFIG_H
12 #define __CONFIG_H
13
14 /*
15 * High Level Configuration Options
16 * (easy to change)
17 */
18
19 #define CONFIG_MPC5200 1 /* This is an MPC5200 CPU */
20 #define CONFIG_TQM5200 1 /* ... on TQM5200 module */
21 #undef CONFIG_TQM5200_REV100 /* define for revision 100 modules */
22
23 /*
24 * Valid values for CONFIG_SYS_TEXT_BASE are:
25 * 0xFC000000 boot low (standard configuration with room for
26 * max 64 MByte Flash ROM)
27 * 0xFFF00000 boot high (for a backup copy of U-Boot)
28 * 0x00100000 boot from RAM (for testing only)
29 */
30 #ifndef CONFIG_SYS_TEXT_BASE
31 #define CONFIG_SYS_TEXT_BASE 0xFC000000
32 #endif
33
34 /* On a Cameron or on a FO300 board or ... */
35 #if !defined(CONFIG_CAM5200) && !defined(CONFIG_CHARON) \
36 && !defined(CONFIG_FO300)
37 #define CONFIG_STK52XX 1 /* ... on a STK52XX board */
38 #endif
39
40 #define CONFIG_SYS_MPC5XXX_CLKIN 33000000 /* ... running at 33.000000MHz */
41
42 #define CONFIG_HIGH_BATS 1 /* High BATs supported */
43
44 /*
45 * Serial console configuration
46 */
47 #define CONFIG_PSC_CONSOLE 1 /* console is on PSC1 */
48 #define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */
49 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
50 #define CONFIG_BOOTCOUNT_LIMIT 1
51
52 #ifdef CONFIG_FO300
53 #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enable null device */
54 #define CONFIG_USB_BIN_FIXUP 1 /* for a buggy USB device */
55 #if 0
56 #define FO300_SILENT_CONSOLE_WHEN_S1_CLOSED 1 /* silent console on PSC1 when S1 */
57 /* switch is closed */
58 #endif
59
60 #undef FO300_SILENT_CONSOLE_WHEN_S1_CLOSED /* silent console on PSC1 when S1 */
61 /* switch is open */
62 #endif /* CONFIG_FO300 */
63
64 #if defined(CONFIG_CHARON) || defined(CONFIG_STK52XX)
65 #define CONFIG_PS2KBD /* AT-PS/2 Keyboard */
66 #define CONFIG_PS2MULT /* .. on PS/2 Multiplexer */
67 #define CONFIG_PS2SERIAL 6 /* .. on PSC6 */
68 #define CONFIG_PS2MULT_DELAY (CONFIG_SYS_HZ/2) /* Initial delay */
69 #define CONFIG_BOARD_EARLY_INIT_R
70 #endif /* CONFIG_STK52XX */
71
72 /*
73 * PCI Mapping:
74 * 0x40000000 - 0x4fffffff - PCI Memory
75 * 0x50000000 - 0x50ffffff - PCI IO Space
76 */
77 #if defined(CONFIG_CHARON) || defined(CONFIG_STK52XX)
78 /* #define CONFIG_PCI_SCAN_SHOW 1 */
79
80 #define CONFIG_PCI_MEM_BUS 0x40000000
81 #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS
82 #define CONFIG_PCI_MEM_SIZE 0x10000000
83
84 #define CONFIG_PCI_IO_BUS 0x50000000
85 #define CONFIG_PCI_IO_PHYS CONFIG_PCI_IO_BUS
86 #define CONFIG_PCI_IO_SIZE 0x01000000
87
88 #define CONFIG_EEPRO100 1
89 #define CONFIG_SYS_RX_ETH_BUFFER 8 /* use 8 rx buffer on eepro100 */
90 #define CONFIG_NS8382X 1
91 #endif /* CONFIG_STK52XX */
92
93 /*
94 * Video console
95 */
96 #ifndef CONFIG_TQM5200S /* No graphics controller on TQM5200S */
97 #define CONFIG_VIDEO_SM501
98 #define CONFIG_VIDEO_SM501_32BPP
99 #define CONFIG_VIDEO_LOGO
100
101 #ifndef CONFIG_FO300
102 #else
103 #define CONFIG_VIDEO_BMP_LOGO
104 #endif
105
106 #define CONFIG_SPLASH_SCREEN
107 #endif /* #ifndef CONFIG_TQM5200S */
108
109 /* Partitions */
110 #define CONFIG_ISO_PARTITION
111
112 /* USB */
113 #if defined(CONFIG_CHARON) || defined(CONFIG_FO300) || \
114 defined(CONFIG_STK52XX)
115 #define CONFIG_USB_OHCI_NEW
116 #define CONFIG_SYS_OHCI_BE_CONTROLLER
117
118 #undef CONFIG_SYS_USB_OHCI_BOARD_INIT
119 #define CONFIG_SYS_USB_OHCI_CPU_INIT
120 #define CONFIG_SYS_USB_OHCI_REGS_BASE MPC5XXX_USB
121 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "mpc5200"
122 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
123
124 #endif
125
126 #ifndef CONFIG_CAM5200
127 /* POST support */
128 #define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \
129 CONFIG_SYS_POST_CPU | \
130 CONFIG_SYS_POST_I2C)
131 #endif
132
133 #ifdef CONFIG_POST
134 /* preserve space for the post_word at end of on-chip SRAM */
135 #define MPC5XXX_SRAM_POST_SIZE MPC5XXX_SRAM_SIZE-4
136 #endif
137
138 /*
139 * BOOTP options
140 */
141 #define CONFIG_BOOTP_BOOTFILESIZE
142 #define CONFIG_BOOTP_BOOTPATH
143 #define CONFIG_BOOTP_GATEWAY
144 #define CONFIG_BOOTP_HOSTNAME
145
146 /*
147 * Command line configuration.
148 */
149 #define CONFIG_CMD_DATE
150 #define CONFIG_CMD_EEPROM
151 #define CONFIG_CMD_JFFS2
152 #define CONFIG_CMD_REGINFO
153 #define CONFIG_CMD_BSP
154
155 #ifdef CONFIG_VIDEO
156 #define CONFIG_CMD_BMP
157 #endif
158
159 #ifdef CONFIG_PCI
160 #define CONFIG_CMD_PCI
161 #define CONFIG_PCIAUTO_SKIP_HOST_BRIDGE 1
162 #endif
163
164 #if defined(CONFIG_CHARON) || defined(CONFIG_FO300) || \
165 defined(CONFIG_MINIFAP) || defined(CONFIG_STK52XX)
166 #define CONFIG_CMD_IDE
167 #endif
168
169 #if defined(CONFIG_CHARON) || defined(CONFIG_FO300) || \
170 defined(CONFIG_STK52XX)
171 #define CONFIG_CFG_USB
172 #define CONFIG_CFG_FAT
173 #endif
174
175 #ifdef CONFIG_POST
176 #define CONFIG_CMD_DIAG
177 #endif
178
179 #define CONFIG_TIMESTAMP /* display image timestamps */
180
181 #if (CONFIG_SYS_TEXT_BASE != 0xFFF00000)
182 # define CONFIG_SYS_LOWBOOT 1 /* Boot low */
183 #endif
184
185 /*
186 * Autobooting
187 */
188
189 #define CONFIG_PREBOOT "echo;" \
190 "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
191 "echo"
192
193 #undef CONFIG_BOOTARGS
194
195 #if defined(CONFIG_TQM5200_B) && !defined(CONFIG_SYS_LOWBOOT)
196 # define ENV_UPDT \
197 "update=protect off FFF00000 +${filesize};" \
198 "erase FFF00000 +${filesize};" \
199 "cp.b 200000 FFF00000 ${filesize};" \
200 "protect on FFF00000 +${filesize}\0"
201 #else /* default lowboot configuration */
202 # define ENV_UPDT \
203 "update=protect off FC000000 +${filesize};" \
204 "erase FC000000 +${filesize};" \
205 "cp.b 200000 FC000000 ${filesize};" \
206 "protect on FC000000 +${filesize}\0"
207 #endif
208
209 #if defined(CONFIG_TQM5200)
210 #define CUSTOM_ENV_SETTINGS \
211 "hostname=tqm5200\0" \
212 "bootfile=/tftpboot/tqm5200/uImage\0" \
213 "fdt_file=/tftpboot/tqm5200/tqm5200.dtb\0" \
214 "u-boot=/tftpboot/tqm5200/u-boot.bin\0"
215 #elif defined(CONFIG_CAM5200)
216 #define CUSTOM_ENV_SETTINGS \
217 "bootfile=cam5200/uImage\0" \
218 "u-boot=cam5200/u-boot.bin\0" \
219 "setup=tftp 200000 cam5200/setup.img; source 200000\0"
220 #endif
221
222 #if defined(CONFIG_TQM5200_B)
223 #define ENV_FLASH_LAYOUT \
224 "fdt_addr=FC100000\0" \
225 "kernel_addr=FC140000\0" \
226 "ramdisk_addr=FC600000\0"
227 #elif defined(CONFIG_CHARON)
228 #define ENV_FLASH_LAYOUT \
229 "fdt_addr=FDFC0000\0" \
230 "kernel_addr=FC0A0000\0" \
231 "ramdisk_addr=FC200000\0"
232 #else /* !CONFIG_TQM5200_B */
233 #define ENV_FLASH_LAYOUT \
234 "fdt_addr=FC0A0000\0" \
235 "kernel_addr=FC0C0000\0" \
236 "ramdisk_addr=FC300000\0"
237 #endif
238
239 #define CONFIG_EXTRA_ENV_SETTINGS \
240 "netdev=eth0\0" \
241 "console=ttyPSC0\0" \
242 ENV_FLASH_LAYOUT \
243 "kernel_addr_r=400000\0" \
244 "fdt_addr_r=600000\0" \
245 "rootpath=/opt/eldk/ppc_6xx\0" \
246 "ramargs=setenv bootargs root=/dev/ram rw\0" \
247 "nfsargs=setenv bootargs root=/dev/nfs rw " \
248 "nfsroot=${serverip}:${rootpath}\0" \
249 "addip=setenv bootargs ${bootargs} " \
250 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
251 ":${hostname}:${netdev}:off panic=1\0" \
252 "addcons=setenv bootargs ${bootargs} " \
253 "console=${console},${baudrate}\0" \
254 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
255 "flash_self_old=sete console ttyS0; " \
256 "run ramargs addip addcons addmtd; " \
257 "bootm ${kernel_addr} ${ramdisk_addr}\0" \
258 "flash_self=run ramargs addip addcons;" \
259 "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
260 "flash_nfs_old=sete console ttyS0; run nfsargs addip addcons;" \
261 "bootm ${kernel_addr}\0" \
262 "flash_nfs=run nfsargs addip addcons;" \
263 "bootm ${kernel_addr} - ${fdt_addr}\0" \
264 "net_nfs_old=tftp ${kernel_addr_r} ${bootfile};" \
265 "sete console ttyS0; run nfsargs addip addcons;bootm\0" \
266 "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \
267 "tftp ${fdt_addr_r} ${fdt_file}; " \
268 "run nfsargs addip addcons addmtd; " \
269 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
270 CUSTOM_ENV_SETTINGS \
271 "load=tftp 200000 ${u-boot}\0" \
272 ENV_UPDT \
273 ""
274
275 #define CONFIG_BOOTCOMMAND "run net_nfs"
276
277 /*
278 * IPB Bus clocking configuration.
279 */
280 #define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */
281
282 #if defined(CONFIG_SYS_IPBCLK_EQUALS_XLBCLK) && !defined(CONFIG_CAM5200)
283 /*
284 * PCI Bus clocking configuration
285 *
286 * Actually a PCI Clock of 66 MHz is only set (in cpu_init.c) if
287 * CONFIG_SYS_IPBCLK_EQUALS_XLBCLK is defined. This is because a PCI Clock of
288 * 66 MHz yet hasn't been tested with a IPB Bus Clock of 66 MHz.
289 */
290 #define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 /* define for 66MHz speed */
291 #endif
292
293 /*
294 * I2C configuration
295 */
296 #define CONFIG_HARD_I2C 1 /* I2C with hardware support */
297 #ifdef CONFIG_TQM5200_REV100
298 #define CONFIG_SYS_I2C_MODULE 1 /* Select I2C module #1 for rev. 100 board */
299 #else
300 #define CONFIG_SYS_I2C_MODULE 2 /* Select I2C module #2 for all other revs */
301 #endif
302
303 /*
304 * I2C clock frequency
305 *
306 * Please notice, that the resulting clock frequency could differ from the
307 * configured value. This is because the I2C clock is derived from system
308 * clock over a frequency divider with only a few divider values. U-Boot
309 * calculates the best approximation for CONFIG_SYS_I2C_SPEED. However the calculated
310 * approximation allways lies below the configured value, never above.
311 */
312 #define CONFIG_SYS_I2C_SPEED 100000 /* 100 kHz */
313 #define CONFIG_SYS_I2C_SLAVE 0x7F
314
315 /*
316 * EEPROM configuration for onboard EEPROM M24C32 (M24C64 should work
317 * also). For other EEPROMs configuration should be verified. On Mini-FAP the
318 * EEPROM (24C64) is on the same I2C address (but on other I2C bus), so the
319 * same configuration could be used.
320 */
321 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* 1010000x */
322 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
323 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* =32 Bytes per write */
324 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
325
326 /*
327 * HW-Monitor configuration on Mini-FAP
328 */
329 #if defined (CONFIG_MINIFAP)
330 #define CONFIG_SYS_I2C_HWMON_ADDR 0x2C
331 #endif
332
333 /* List of I2C addresses to be verified by POST */
334 #if defined (CONFIG_MINIFAP)
335 #undef CONFIG_SYS_POST_I2C_ADDRS
336 #define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_EEPROM_ADDR, \
337 CONFIG_SYS_I2C_HWMON_ADDR, \
338 CONFIG_SYS_I2C_SLAVE}
339 #endif
340
341 /*
342 * Flash configuration
343 */
344 #define CONFIG_SYS_FLASH_BASE 0xFC000000
345
346 #if defined(CONFIG_CAM5200) && defined(CONFIG_CAM5200_NIOSFLASH)
347 #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max num of flash banks
348 (= chip selects) */
349 #define CONFIG_SYS_FLASH_WORD_SIZE unsigned int /* main flash device with */
350 #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
351 #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
352
353 #define CONFIG_SYS_FLASH_ADDR0 0x555
354 #define CONFIG_SYS_FLASH_ADDR1 0x2AA
355 #define CONFIG_SYS_FLASH_2ND_16BIT_DEV 1 /* NIOS flash is a 16bit device */
356 #define CONFIG_SYS_MAX_FLASH_SECT 128
357 #else
358 /* use CFI flash driver */
359 #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */
360 #define CONFIG_FLASH_CFI_DRIVER 1 /* Use the common driver */
361 #define CONFIG_FLASH_CFI_MTD /* with MTD support */
362 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_BOOTCS_START }
363 #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks
364 (= chip selects) */
365 #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */
366 #endif
367
368 #define CONFIG_SYS_FLASH_EMPTY_INFO
369 #define CONFIG_SYS_FLASH_SIZE 0x04000000 /* 64 MByte */
370 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
371
372 #if defined (CONFIG_CAM5200)
373 # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00040000)
374 #elif defined(CONFIG_TQM5200_B)
375 # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00080000)
376 #else
377 # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x00060000)
378 #endif
379
380 /* Dynamic MTD partition support */
381 #define CONFIG_CMD_MTDPARTS
382 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
383 #define MTDIDS_DEFAULT "nor0=fc000000.flash"
384
385 #if defined(CONFIG_STK52XX)
386 # if defined(CONFIG_TQM5200_B)
387 # if defined(CONFIG_SYS_LOWBOOT)
388 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:1m(firmware)," \
389 "256k(dtb)," \
390 "2304k(kernel)," \
391 "2560k(small-fs)," \
392 "2m(initrd)," \
393 "8m(misc)," \
394 "16m(big-fs)"
395 # else /* highboot */
396 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:2560k(kernel),"\
397 "3584k(small-fs)," \
398 "2m(initrd)," \
399 "8m(misc)," \
400 "15m(big-fs)," \
401 "1m(firmware)"
402 # endif /* CONFIG_SYS_LOWBOOT */
403 # else /* !CONFIG_TQM5200_B */
404 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:640k(firmware),"\
405 "128k(dtb)," \
406 "2304k(kernel)," \
407 "2m(initrd)," \
408 "4m(small-fs)," \
409 "8m(misc)," \
410 "15m(big-fs)"
411 # endif /* CONFIG_TQM5200_B */
412 #elif defined (CONFIG_CAM5200)
413 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:768k(firmware),"\
414 "1792k(kernel)," \
415 "5632k(rootfs)," \
416 "24m(home)"
417 #elif defined (CONFIG_CHARON)
418 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:640k(firmware),"\
419 "1408k(kernel)," \
420 "2m(initrd)," \
421 "4m(small-fs)," \
422 "24320k(big-fs)," \
423 "256k(dts)"
424 #elif defined (CONFIG_FO300)
425 # define MTDPARTS_DEFAULT "mtdparts=fc000000.flash:640k(firmware),"\
426 "1408k(kernel)," \
427 "2m(initrd)," \
428 "4m(small-fs)," \
429 "8m(misc)," \
430 "16m(big-fs)"
431 #else
432 # error "Unknown Carrier Board"
433 #endif /* CONFIG_STK52XX */
434
435 /*
436 * Environment settings
437 */
438 #define CONFIG_ENV_IS_IN_FLASH 1
439 #define CONFIG_ENV_SIZE 0x4000 /* 16 k - keep small for fast booting */
440 #if defined(CONFIG_TQM5200_B) || defined (CONFIG_CAM5200)
441 #define CONFIG_ENV_SECT_SIZE 0x40000
442 #else
443 #define CONFIG_ENV_SECT_SIZE 0x20000
444 #endif /* CONFIG_TQM5200_B */
445 #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
446 #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
447
448 /*
449 * Memory map
450 */
451 #define CONFIG_SYS_MBAR 0xF0000000
452 #define CONFIG_SYS_SDRAM_BASE 0x00000000
453 #define CONFIG_SYS_DEFAULT_MBAR 0x80000000
454
455 /* Use ON-Chip SRAM until RAM will be available */
456 #define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM
457 #ifdef CONFIG_POST
458 /* preserve space for the post_word at end of on-chip SRAM */
459 #define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_POST_SIZE
460 #else
461 #define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_SIZE
462 #endif
463
464 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
465 #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
466
467 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
468 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
469 # define CONFIG_SYS_RAMBOOT 1
470 #endif
471
472 #if defined (CONFIG_CAM5200)
473 # define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
474 #elif defined(CONFIG_TQM5200_B)
475 # define CONFIG_SYS_MONITOR_LEN (512 << 10) /* Reserve 512 kB for Monitor */
476 #else
477 # define CONFIG_SYS_MONITOR_LEN (384 << 10) /* Reserve 384 kB for Monitor */
478 #endif
479
480 #define CONFIG_SYS_MALLOC_LEN (1024 << 10) /* Reserve 1024 kB for malloc() */
481 #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
482
483 /*
484 * Ethernet configuration
485 */
486 #define CONFIG_MPC5xxx_FEC 1
487 #define CONFIG_MPC5xxx_FEC_MII100
488 /*
489 * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb
490 */
491 /* #define CONFIG_MPC5xxx_FEC_MII10 */
492 #define CONFIG_PHY_ADDR 0x00
493
494 /*
495 * GPIO configuration
496 *
497 * use CS1: Bit 0 (mask: 0x80000000):
498 * 1 -> Pin gpio_wkup_6 as second SDRAM chip select (mem_cs1).
499 * use ALT CAN position: Bits 2-3 (mask: 0x30000000):
500 * 00 -> No Alternatives, CAN1/2 on PSC2 according to PSC2 setting.
501 * SPI on PSC3 according to PSC3 setting. Use for CAM5200.
502 * 01 -> CAN1 on I2C1, CAN2 on Tmr0/1.
503 * Use for REV200 STK52XX boards and FO300 boards. Do not use
504 * with REV100 modules (because, there I2C1 is used as I2C bus).
505 * use ATA: Bits 6-7 (mask 0x03000000):
506 * 00 -> No ATA chip selects, csb_4/5 used as normal chip selects.
507 * Use for CAM5200 board.
508 * 01 -> ATA cs0/1 on csb_4/5. Use for the remaining boards.
509 * use PSC6: Bits 9-11 (mask 0x00700000):
510 * 000 -> use PSC6_0 to PSC6_3 as GPIO, PSC6 could not be used as
511 * UART, CODEC or IrDA.
512 * GPIO on PSC6_3 is used in post_hotkeys_pressed() to
513 * enable extended POST tests.
514 * Use for MINI-FAP and TQM5200_IB boards.
515 * 101 -> use PSC6 as UART. Pins PSC6_0 to PSC6_3 are used.
516 * Extended POST test is not available.
517 * Use for STK52xx, FO300 and CAM5200 boards.
518 * WARNING: When the extended POST is enabled, these bits will
519 * be overridden by this code as GPIOs!
520 * use PCI_DIS: Bit 16 (mask 0x00008000):
521 * 1 -> disable PCI controller (on CAM5200 board).
522 * use USB: Bits 18-19 (mask 0x00003000):
523 * 10 -> two UARTs (on FO300 and CAM5200).
524 * use PSC3: Bits 20-23 (mask: 0x00000f00):
525 * 0000 -> All PSC3 pins are GPIOs.
526 * 1100 -> UART/SPI (on FO300 board).
527 * 0100 -> UART (on CAM5200 board).
528 * use PSC2: Bits 25:27 (mask: 0x00000030):
529 * 000 -> All PSC2 pins are GPIOs.
530 * 100 -> UART (on CAM5200 board).
531 * 001 -> CAN1/2 on PSC2 pins.
532 * Use for REV100 STK52xx boards
533 * 01x -> Use AC97 (on FO300 board).
534 * use PSC1: Bits 29-31 (mask: 0x00000007):
535 * 100 -> UART (on all boards).
536 */
537 #if !defined(CONFIG_SYS_GPS_PORT_CONFIG)
538 #if defined (CONFIG_MINIFAP)
539 # define CONFIG_SYS_GPS_PORT_CONFIG 0x91000004
540 #elif defined (CONFIG_STK52XX)
541 # if defined (CONFIG_STK52XX_REV100)
542 # define CONFIG_SYS_GPS_PORT_CONFIG 0x81500014
543 # else /* STK52xx REV200 and above */
544 # if defined (CONFIG_TQM5200_REV100)
545 # error TQM5200 REV100 not supported on STK52XX REV200 or above
546 # else/* TQM5200 REV200 and above */
547 # define CONFIG_SYS_GPS_PORT_CONFIG 0x91500404
548 # endif
549 # endif
550 #elif defined (CONFIG_FO300)
551 # define CONFIG_SYS_GPS_PORT_CONFIG 0x91502c24
552 #elif defined (CONFIG_CAM5200)
553 # define CONFIG_SYS_GPS_PORT_CONFIG 0x8050A444
554 #else /* TMQ5200 Inbetriebnahme-Board */
555 # define CONFIG_SYS_GPS_PORT_CONFIG 0x81000004
556 #endif
557 #endif
558
559 /*
560 * RTC configuration
561 */
562 #if defined (CONFIG_STK52XX) && !defined (CONFIG_STK52XX_REV100)
563 # define CONFIG_RTC_M41T11 1
564 # define CONFIG_SYS_I2C_RTC_ADDR 0x68
565 # define CONFIG_SYS_M41T11_BASE_YEAR 1900 /* because Linux uses the same base
566 year */
567 #else
568 # define CONFIG_RTC_MPC5200 1 /* use internal MPC5200 RTC */
569 #endif
570
571 /*
572 * Miscellaneous configurable options
573 */
574 #define CONFIG_SYS_LONGHELP /* undef to save memory */
575
576 #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
577
578 #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */
579 #if defined(CONFIG_CMD_KGDB)
580 #define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */
581 #endif
582
583 #if defined(CONFIG_CMD_KGDB)
584 #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
585 #else
586 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
587 #endif
588 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
589 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
590 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
591
592 /* Enable an alternate, more extensive memory test */
593 #define CONFIG_SYS_ALT_MEMTEST
594
595 #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */
596 #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */
597
598 #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */
599
600 /*
601 * Various low-level settings
602 */
603 #define CONFIG_SYS_HID0_INIT HID0_ICE | HID0_ICFI
604 #define CONFIG_SYS_HID0_FINAL HID0_ICE
605
606 #define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE
607 #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
608 #ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
609 #define CONFIG_SYS_BOOTCS_CFG 0x0008DF30 /* for pci_clk = 66 MHz */
610 #else
611 #define CONFIG_SYS_BOOTCS_CFG 0x0004DF30 /* for pci_clk = 33 MHz */
612 #endif
613 #define CONFIG_SYS_CS0_START CONFIG_SYS_FLASH_BASE
614 #define CONFIG_SYS_CS0_SIZE CONFIG_SYS_FLASH_SIZE
615
616 #define CONFIG_LAST_STAGE_INIT
617
618 /*
619 * SRAM - Do not map below 2 GB in address space, because this area is used
620 * for SDRAM autosizing.
621 */
622 #define CONFIG_SYS_CS2_START 0xE5000000
623 #define CONFIG_SYS_CS2_SIZE 0x100000 /* 1 MByte */
624 #define CONFIG_SYS_CS2_CFG 0x0004D930
625
626 /*
627 * Grafic controller - Do not map below 2 GB in address space, because this
628 * area is used for SDRAM autosizing.
629 */
630 #define SM501_FB_BASE 0xE0000000
631 #define CONFIG_SYS_CS1_START (SM501_FB_BASE)
632 #define CONFIG_SYS_CS1_SIZE 0x4000000 /* 64 MByte */
633 #define CONFIG_SYS_CS1_CFG 0x8F48FF70
634 #define SM501_MMIO_BASE CONFIG_SYS_CS1_START + 0x03E00000
635
636 #define CONFIG_SYS_CS_BURST 0x00000000
637 #define CONFIG_SYS_CS_DEADCYCLE 0x33333311 /* 1 dead cycle for flash and SM501 */
638
639 #if defined(CONFIG_CAM5200)
640 #define CONFIG_SYS_CS4_START 0xB0000000
641 #define CONFIG_SYS_CS4_SIZE 0x00010000
642 #define CONFIG_SYS_CS4_CFG 0x01019C10
643
644 #define CONFIG_SYS_CS5_START 0xD0000000
645 #define CONFIG_SYS_CS5_SIZE 0x01208000
646 #define CONFIG_SYS_CS5_CFG 0x1414BF10
647 #endif
648
649 #define CONFIG_SYS_RESET_ADDRESS 0xff000000
650
651 /*-----------------------------------------------------------------------
652 * USB stuff
653 *-----------------------------------------------------------------------
654 */
655 #define CONFIG_USB_CLOCK 0x0001BBBB
656 #define CONFIG_USB_CONFIG 0x00001000
657
658 /*-----------------------------------------------------------------------
659 * IDE/ATA stuff Supports IDE harddisk
660 *-----------------------------------------------------------------------
661 */
662
663 #undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */
664
665 #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
666 #undef CONFIG_IDE_LED /* LED for ide not supported */
667
668 #define CONFIG_IDE_RESET /* reset for ide supported */
669 #define CONFIG_IDE_PREINIT
670
671 #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */
672 #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 2 drives per IDE bus */
673
674 #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
675
676 #define CONFIG_SYS_ATA_BASE_ADDR MPC5XXX_ATA
677
678 /* Offset for data I/O */
679 #define CONFIG_SYS_ATA_DATA_OFFSET (0x0060)
680
681 /* Offset for normal register accesses */
682 #define CONFIG_SYS_ATA_REG_OFFSET (CONFIG_SYS_ATA_DATA_OFFSET)
683
684 /* Offset for alternate registers */
685 #define CONFIG_SYS_ATA_ALT_OFFSET (0x005C)
686
687 /* Interval between registers */
688 #define CONFIG_SYS_ATA_STRIDE 4
689
690 /* Support ATAPI devices */
691 #define CONFIG_ATAPI 1
692
693 /*-----------------------------------------------------------------------
694 * Open firmware flat tree support
695 *-----------------------------------------------------------------------
696 */
697 #define OF_CPU "PowerPC,5200@0"
698 #define OF_SOC "soc5200@f0000000"
699 #define OF_TBCLK (bd->bi_busfreq / 4)
700 #define OF_STDOUT_PATH "/soc5200@f0000000/serial@2000"
701
702 #endif /* __CONFIG_H */