]>
Commit | Line | Data |
---|---|---|
c9969947 JS |
1 | /* |
2 | * (C) Copyright 2003-2005 | |
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | * | |
5 | * (C) Copyright 2006 | |
6 | * Eric Schumann, Phytec Messatechnik GmbH | |
7 | * | |
8 | * (C) Copyright 2009 | |
9 | * Jon Smirl <jonsmirl@gmail.com> | |
10 | * | |
3765b3e7 | 11 | * SPDX-License-Identifier: GPL-2.0+ |
c9969947 JS |
12 | */ |
13 | ||
14 | #ifndef __CONFIG_H | |
15 | #define __CONFIG_H | |
16 | ||
17 | #define CONFIG_BOARDINFO "phyCORE-MPC5200B-tiny" | |
18 | ||
19 | /*----------------------------------------------------------------------------- | |
20 | High Level Configuration Options | |
21 | (easy to change) | |
22 | -----------------------------------------------------------------------------*/ | |
b2a6dfe4 | 23 | #define CONFIG_MPC5200 1 /* This is an MPC5200 CPU */ |
c9969947 JS |
24 | #define CONFIG_MPC5200_DDR 1 /* (with DDR-SDRAM) */ |
25 | #define CONFIG_PHYCORE_MPC5200B_TINY 1 /* phyCORE-MPC5200B -> */ | |
26 | /* FEC configuration and IDE */ | |
2ae18241 WD |
27 | |
28 | /* | |
29 | * Valid values for CONFIG_SYS_TEXT_BASE are: | |
30 | * 0xFFF00000 boot high (standard configuration) | |
31 | * 0xFF000000 boot low | |
32 | * 0x00100000 boot from RAM (for testing only) | |
33 | */ | |
34 | #ifndef CONFIG_SYS_TEXT_BASE | |
35 | #define CONFIG_SYS_TEXT_BASE 0xFFF00000 | |
36 | #endif | |
37 | ||
c9969947 | 38 | #define CONFIG_SYS_MPC5XXX_CLKIN 33333333 /* ... running at 33.333333MHz */ |
c9969947 JS |
39 | |
40 | /*----------------------------------------------------------------------------- | |
41 | Serial console configuration | |
42 | -----------------------------------------------------------------------------*/ | |
43 | #define CONFIG_PSC_CONSOLE 3 /* console is on PSC3 -> */ | |
44 | /*define gps port conf. */ | |
45 | /* register later on to */ | |
46 | /*enable UART function! */ | |
c9969947 JS |
47 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } |
48 | ||
49 | /* | |
50 | * Command line configuration. | |
51 | */ | |
c9969947 | 52 | #define CONFIG_CMD_EEPROM |
c9969947 | 53 | #define CONFIG_CMD_JFFS2 |
c9969947 JS |
54 | #define CONFIG_CMD_PCI |
55 | ||
56 | #define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */ | |
57 | ||
14d0a02a | 58 | #if (CONFIG_SYS_TEXT_BASE == 0xFF000000) /* Boot low */ |
c9969947 JS |
59 | #define CONFIG_SYS_LOWBOOT 1 |
60 | #endif | |
61 | /* RAMBOOT will be defined automatically in memory section */ | |
62 | ||
63 | #define CONFIG_JFFS2_CMDLINE | |
64 | #define MTDIDS_DEFAULT "nor0=physmap-flash.0" | |
65 | #define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:256k(ubootl)," \ | |
66 | "1792k(kernel),13312k(jffs2),256k(uboot)ro,256k(oftree),-(space)" | |
67 | ||
c9969947 JS |
68 | #undef CONFIG_BOOTARGS |
69 | ||
c9969947 JS |
70 | #define CONFIG_PREBOOT "echo;" \ |
71 | "echo Type \"run bootcmd_net\" to load Kernel over TFTP and to "\ | |
72 | "mount root filesystem over NFS;" \ | |
73 | "echo" | |
74 | ||
75 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
76 | "netdev=eth0\0" \ | |
77 | "uimage=uImage-pcm030\0" \ | |
78 | "oftree=oftree-pcm030.dtb\0" \ | |
79 | "jffs2=root-pcm030.jffs2\0" \ | |
80 | "uboot=u-boot-pcm030.bin\0" \ | |
81 | "bargs_base=setenv bootargs console=ttyPSC0,$(baudrate)" \ | |
82 | " $(mtdparts) rw\0" \ | |
83 | "bargs_flash=setenv bootargs $(bootargs) root=/dev/mtdblock2" \ | |
84 | " rootfstype=jffs2\0" \ | |
85 | "bargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs" \ | |
86 | " ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)::" \ | |
87 | "$(netdev):off nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \ | |
88 | "bcmd_net=run bargs_base bargs_nfs; tftpboot 0x500000 $(uimage);" \ | |
89 | " tftp 0x400000 $(oftree); bootm 0x500000 - 0x400000\0" \ | |
90 | "bcmd_flash=run bargs_base bargs_flash; bootm 0xff040000 - " \ | |
91 | "0xfff40000\0" \ | |
92 | " cp.b 0x400000 0xff040000 $(filesize)\0" \ | |
93 | "prg_jffs2=tftp 0x400000 $(jffs2); erase 0xff200000 0xffefffff; " \ | |
94 | "cp.b 0x400000 0xff200000 $(filesize)\0" \ | |
95 | "prg_oftree=tftp 0x400000 $(oftree); erase 0xfff40000 0xfff5ffff;" \ | |
96 | " cp.b 0x400000 0xfff40000 $(filesize)\0" \ | |
97 | "update=tftpboot 0x400000 $(uboot);erase 0xFFF00000 0xfff3ffff;" \ | |
98 | " cp.b 0x400000 0xFFF00000 $(filesize)\0" \ | |
99 | "unlock=yes\0" \ | |
100 | "" | |
101 | ||
102 | #define CONFIG_BOOTCOMMAND "run bcmd_flash" | |
103 | ||
104 | /*-------------------------------------------------------------------------- | |
105 | IPB Bus clocking configuration. | |
106 | ---------------------------------------------------------------------------*/ | |
107 | #define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK /* define for 133MHz speed */ | |
108 | ||
109 | /*------------------------------------------------------------------------- | |
110 | * PCI Mapping: | |
111 | * 0x40000000 - 0x4fffffff - PCI Memory | |
112 | * 0x50000000 - 0x50ffffff - PCI IO Space | |
113 | * -----------------------------------------------------------------------*/ | |
c9969947 JS |
114 | #define CONFIG_PCI_SCAN_SHOW 1 |
115 | #define CONFIG_PCI_MEM_BUS 0x40000000 | |
116 | #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS | |
117 | #define CONFIG_PCI_MEM_SIZE 0x10000000 | |
118 | #define CONFIG_PCI_IO_BUS 0x50000000 | |
119 | #define CONFIG_PCI_IO_PHYS CONFIG_PCI_IO_BUS | |
120 | #define CONFIG_PCI_IO_SIZE 0x01000000 | |
121 | #define CONFIG_SYS_XLB_PIPELINING 1 | |
122 | ||
123 | /*--------------------------------------------------------------------------- | |
124 | I2C configuration | |
125 | ---------------------------------------------------------------------------*/ | |
126 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ | |
127 | #define CONFIG_SYS_I2C_MODULE 2 /* Select I2C module #1 or #2 */ | |
128 | #define CONFIG_SYS_I2C_SPEED 100000 /* 100 kHz */ | |
129 | #define CONFIG_SYS_I2C_SLAVE 0x7F | |
130 | ||
131 | /*--------------------------------------------------------------------------- | |
132 | EEPROM CAT24WC32 configuration | |
133 | ---------------------------------------------------------------------------*/ | |
134 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 /* 1010100x */ | |
135 | #define CONFIG_SYS_I2C_FACT_ADDR 0x52 /* EEPROM CAT24WC32 */ | |
136 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ | |
137 | #define CONFIG_SYS_EEPROM_SIZE 2048 | |
138 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 | |
139 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 15 | |
140 | ||
141 | /*--------------------------------------------------------------------------- | |
142 | RTC configuration | |
143 | ---------------------------------------------------------------------------*/ | |
144 | #define RTC | |
145 | #define CONFIG_RTC_PCF8563 1 | |
146 | #define CONFIG_SYS_I2C_RTC_ADDR 0x51 | |
147 | ||
148 | /*--------------------------------------------------------------------------- | |
149 | Flash configuration | |
150 | ---------------------------------------------------------------------------*/ | |
151 | ||
152 | #define CONFIG_SYS_FLASH_BASE 0xff000000 | |
153 | #define CONFIG_SYS_FLASH_SIZE 0x01000000 | |
154 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } | |
155 | ||
156 | #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */ | |
157 | #define CONFIG_FLASH_CFI_DRIVER 1 /* Use the common driver */ | |
158 | #define CONFIG_SYS_FLASH_EMPTY_INFO | |
159 | #define CONFIG_SYS_MAX_FLASH_SECT 260 /* max num of sects on one chip */ | |
160 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */ | |
161 | /* (= chip selects) */ | |
162 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | |
163 | ||
164 | /* | |
165 | * Use also hardware protection. This seems required, as the BDI uses | |
166 | * hardware protection. Without this, U-Boot can't work with this sectors, | |
167 | * as its protection is software only by default | |
168 | */ | |
169 | #define CONFIG_SYS_FLASH_PROTECTION 1 | |
170 | ||
171 | /*--------------------------------------------------------------------------- | |
172 | Environment settings | |
173 | ---------------------------------------------------------------------------*/ | |
174 | ||
175 | /* pcm030 ships with environment is EEPROM by default */ | |
176 | #define CONFIG_ENV_IS_IN_EEPROM 1 | |
177 | #define CONFIG_ENV_OFFSET 0x00 /* environment starts at the */ | |
178 | /*beginning of the EEPROM */ | |
179 | #define CONFIG_ENV_SIZE CONFIG_SYS_EEPROM_SIZE | |
180 | ||
181 | #define CONFIG_ENV_OVERWRITE 1 | |
182 | ||
183 | /*----------------------------------------------------------------------------- | |
184 | Memory map | |
185 | -----------------------------------------------------------------------------*/ | |
186 | #define CONFIG_SYS_MBAR 0xF0000000 /* MBAR has to be switched by other */ | |
187 | /* bootloader or debugger config */ | |
188 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 | |
189 | #define CONFIG_SYS_DEFAULT_MBAR 0x80000000 | |
190 | /* Use SRAM until RAM will be available */ | |
191 | #define CONFIG_SYS_INIT_RAM_ADDR MPC5XXX_SRAM | |
553f0982 | 192 | #define CONFIG_SYS_INIT_RAM_SIZE MPC5XXX_SRAM_SIZE /* Size of used */ |
c9969947 | 193 | /* area in DPRAM */ |
553f0982 | 194 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ |
25ddd1fb | 195 | GENERATED_GBL_DATA_SIZE) |
c9969947 JS |
196 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
197 | ||
14d0a02a | 198 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
c9969947 JS |
199 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
200 | # define CONFIG_SYS_RAMBOOT 1 | |
201 | #endif | |
202 | ||
203 | #define CONFIG_SYS_MONITOR_LEN (192 << 10) /* Reserve 192 kB for Monitor */ | |
204 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ | |
205 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | |
206 | ||
207 | /*----------------------------------------------------------------------------- | |
208 | Ethernet configuration | |
209 | -----------------------------------------------------------------------------*/ | |
210 | #define CONFIG_MPC5xxx_FEC 1 | |
211 | #define CONFIG_MPC5xxx_FEC_MII100 | |
212 | #define CONFIG_PHY_ADDR 0x01 | |
213 | ||
214 | /*--------------------------------------------------------------------------- | |
215 | GPIO configuration | |
216 | ---------------------------------------------------------------------------*/ | |
217 | ||
218 | /* GPIO port configuration | |
219 | * | |
220 | * Pin mapping: | |
221 | * | |
222 | * [29:31] = 01x | |
223 | * PSC1_0 -> AC97 SDATA out | |
224 | * PSC1_1 -> AC97 SDTA in | |
225 | * PSC1_2 -> AC97 SYNC out | |
226 | * PSC1_3 -> AC97 bitclock out | |
227 | * PSC1_4 -> AC97 reset out | |
228 | * | |
229 | * [25:27] = 001 | |
230 | * PSC2_0 -> CAN 1 Tx out | |
231 | * PSC2_1 -> CAN 1 Rx in | |
232 | * PSC2_2 -> CAN 2 Tx out | |
233 | * PSC2_3 -> CAN 2 Rx in | |
234 | * PSC2_4 -> GPIO (claimed for ATA reset, active low) | |
235 | * | |
236 | * | |
237 | * [20:23] = 1100 | |
238 | * PSC3_0 -> UART Tx out | |
239 | * PSC3_1 -> UART Rx in | |
240 | * PSC3_2 -> UART RTS (in/out FIXME) | |
241 | * PSC3_3 -> UART CTS (in/out FIXME) | |
242 | * PSC3_4 -> LocalPlus Bus CS6 \ | |
243 | * PSC3_5 -> LocalPlus Bus CS7 / --> see [4] and [5] | |
244 | * PSC3_6 -> dedicated SPI MOSI out (master case) | |
245 | * PSC3_7 -> dedicated SPI MISO in (master case) | |
246 | * PSC3_8 -> dedicated SPI SS out (master case) | |
247 | * PSC3_9 -> dedicated SPI CLK out (master case) | |
248 | * | |
249 | * [18:19] = 01 | |
250 | * USB_0 -> USB OE out | |
251 | * USB_1 -> USB Tx- out | |
252 | * USB_2 -> USB Tx+ out | |
253 | * USB_3 -> USB RxD (in/out FIXME) | |
254 | * USB_4 -> USB Rx+ in | |
255 | * USB_5 -> USB Rx- in | |
256 | * USB_6 -> USB PortPower out | |
257 | * USB_7 -> USB speed out | |
258 | * USB_8 -> USB suspend (in/out FIXME) | |
259 | * USB_9 -> USB overcurrent in | |
260 | * | |
261 | * [17] = 0 | |
262 | * USB differential mode | |
263 | * | |
264 | * [16] = 0 | |
265 | * PCI enabled | |
266 | * | |
267 | * [12:15] = 0101 | |
268 | * ETH_0 -> ETH Txen | |
269 | * ETH_1 -> ETH TxD0 | |
270 | * ETH_2 -> ETH TxD1 | |
271 | * ETH_3 -> ETH TxD2 | |
272 | * ETH_4 -> ETH TxD3 | |
273 | * ETH_5 -> ETH Txerr | |
274 | * ETH_6 -> ETH MDC | |
275 | * ETH_7 -> ETH MDIO | |
276 | * ETH_8 -> ETH RxDv | |
277 | * ETH_9 -> ETH RxCLK | |
278 | * ETH_10 -> ETH Collision | |
279 | * ETH_11 -> ETH TxD | |
280 | * ETH_12 -> ETH RxD0 | |
281 | * ETH_13 -> ETH RxD1 | |
282 | * ETH_14 -> ETH RxD2 | |
283 | * ETH_15 -> ETH RxD3 | |
284 | * ETH_16 -> ETH Rxerr | |
285 | * ETH_17 -> ETH CRS | |
286 | * | |
287 | * [9:11] = 101 | |
288 | * PSC6_0 -> UART RxD in | |
289 | * PSC6_1 -> UART CTS (in/out FIXME) | |
290 | * PSC6_2 -> UART TxD out | |
291 | * PSC6_3 -> UART RTS (in/out FIXME) | |
292 | * | |
293 | * [2:3/6:7] = 00/11 | |
294 | * TMR_0 -> ATA_CS0 out | |
295 | * TMR_1 -> ATA_CS1 out | |
296 | * TMR_2 -> GPIO | |
297 | * TMR_3 -> GPIO | |
298 | * TMR_4 -> GPIO | |
299 | * TMR_5 -> GPIO | |
300 | * TMR_6 -> GPIO | |
301 | * TMR_7 -> GPIO | |
302 | * I2C_0 -> I2C 1 Clock out | |
303 | * I2C_1 -> I2C 1 IO in/out | |
304 | * I2C_2 -> I2C 2 Clock out | |
305 | * I2C_3 -> I2C 2 IO in/out | |
306 | * | |
307 | * [4] = 1 | |
308 | * PSC3_5 is used as CS7 | |
309 | * | |
310 | * [5] = 1 | |
311 | * PSC3_4 is used as CS6 | |
312 | * | |
313 | * [1] = 0 | |
314 | * gpio_wkup_7 is GPIO | |
315 | * | |
316 | * [0] = 0 | |
317 | * gpio_wkup_6 is GPIO | |
318 | * | |
319 | */ | |
320 | #define CONFIG_SYS_GPS_PORT_CONFIG 0x0f551c12 | |
321 | ||
322 | /*----------------------------------------------------------------------------- | |
323 | Miscellaneous configurable options | |
324 | -------------------------------------------------------------------------------*/ | |
325 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | |
c9969947 JS |
326 | |
327 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | |
328 | ||
329 | #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC5xxx CPUs */ | |
330 | #if defined(CONFIG_CMD_KGDB) | |
331 | #define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ | |
332 | #endif | |
333 | ||
334 | #if defined(CONFIG_CMD_KGDB) | |
335 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | |
336 | #else | |
337 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | |
338 | #endif | |
339 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) | |
340 | /* Print Buffer Size */ | |
341 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | |
342 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | |
343 | ||
344 | #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */ | |
345 | #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */ | |
346 | ||
347 | #define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */ | |
c9969947 | 348 | |
c9969947 JS |
349 | /*----------------------------------------------------------------------------- |
350 | Various low-level settings | |
351 | -----------------------------------------------------------------------------*/ | |
352 | #define CONFIG_SYS_HID0_INIT HID0_ICE | HID0_ICFI | |
353 | #define CONFIG_SYS_HID0_FINAL HID0_ICE | |
354 | ||
355 | /* no burst access on the LPB */ | |
356 | #define CONFIG_SYS_CS_BURST 0x00000000 | |
357 | /* one deadcycle for the 33MHz statemachine */ | |
358 | #define CONFIG_SYS_CS_DEADCYCLE 0x33333331 | |
359 | /* one additional waitstate for the 33MHz statemachine */ | |
360 | #define CONFIG_SYS_BOOTCS_CFG 0x0001dd00 | |
361 | #define CONFIG_SYS_BOOTCS_START CONFIG_SYS_FLASH_BASE | |
362 | #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE | |
363 | ||
364 | #define CONFIG_SYS_RESET_ADDRESS 0xff000000 | |
365 | ||
366 | /*----------------------------------------------------------------------- | |
367 | * USB stuff | |
368 | *----------------------------------------------------------------------- | |
369 | */ | |
370 | #define CONFIG_USB_CLOCK 0x0001BBBB | |
371 | #define CONFIG_USB_CONFIG 0x00001000 | |
372 | ||
373 | /*--------------------------------------------------------------------------- | |
374 | IDE/ATA stuff Supports IDE harddisk | |
375 | ----------------------------------------------------------------------------*/ | |
376 | ||
377 | #undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */ | |
378 | #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ | |
379 | #undef CONFIG_IDE_LED /* LED for ide not supported */ | |
380 | #define CONFIG_SYS_ATA_CS_ON_TIMER01 | |
381 | #define CONFIG_IDE_RESET 1 /* reset for ide supported */ | |
382 | #define CONFIG_IDE_PREINIT | |
383 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ | |
384 | #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 2 drives per IDE bus */ | |
385 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 | |
386 | #define CONFIG_SYS_ATA_BASE_ADDR MPC5XXX_ATA | |
387 | /* Offset for data I/O */ | |
388 | #define CONFIG_SYS_ATA_DATA_OFFSET (0x0060) | |
389 | /* Offset for normal register accesses */ | |
390 | #define CONFIG_SYS_ATA_REG_OFFSET (CONFIG_SYS_ATA_DATA_OFFSET) | |
391 | /* Offset for alternate registers */ | |
392 | #define CONFIG_SYS_ATA_ALT_OFFSET (0x005C) | |
393 | /* Interval between registers */ | |
394 | #define CONFIG_SYS_ATA_STRIDE 4 | |
395 | #define CONFIG_ATAPI 1 | |
396 | ||
c9969947 JS |
397 | /* USB */ |
398 | #define CONFIG_USB_OHCI | |
c9969947 JS |
399 | |
400 | /* pass open firmware flat tree */ | |
c9969947 JS |
401 | #define OF_CPU "PowerPC,5200@0" |
402 | #define OF_TBCLK CONFIG_SYS_MPC5XXX_CLKIN | |
403 | #define OF_SOC "soc5200@f0000000" | |
404 | #define OF_STDOUT_PATH "/soc5200@f0000000/serial@2400" | |
405 | ||
406 | #endif /* __CONFIG_H */ |