blob: 76e9cb4c1e0aacb71f98c38e1837bf5eac518e5d [file] [log] [blame]
wdenk3902d702004-04-15 18:22:41 +00001/*
2 * (C) Copyright 2000-2004
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/*
25 * Pantelis Antoniou, Intracom S.A., panto@intracom.gr
26 * U-Boot port on NetTA4 board
27 */
28
29#ifndef __CONFIG_H
30#define __CONFIG_H
31
32/*
33 * High Level Configuration Options
34 * (easy to change)
35 */
36
37#define CONFIG_MPC885 1 /* This is a MPC885 CPU */
38#define CONFIG_NETTA 1 /* ...on a NetTA board */
39
40#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */
41#undef CONFIG_8xx_CONS_SMC2
42#undef CONFIG_8xx_CONS_NONE
43
44#define CONFIG_BAUDRATE 115200 /* console baudrate = 115kbps */
45
46/* #define CONFIG_XIN 10000000 */
47#define CONFIG_XIN 50000000
48#define MPC8XX_HZ 120000000
49/* #define MPC8XX_HZ 100000000 */
50/* #define MPC8XX_HZ 50000000 */
51/* #define MPC8XX_HZ 80000000 */
52
53#define CONFIG_8xx_GCLK_FREQ MPC8XX_HZ
54
55#if 0
56#define CONFIG_BOOTDELAY -1 /* autoboot disabled */
57#else
58#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
59#endif
60
61#undef CONFIG_CLOCKS_IN_MHZ /* clocks NOT passsed to Linux in MHz */
62
63#define CONFIG_PREBOOT "echo;echo Type \"run flash_nfs\" to mount root filesystem over NFS;echo"
64
65#undef CONFIG_BOOTARGS
66#define CONFIG_BOOTCOMMAND \
67 "tftpboot; " \
68 "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \
69 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off; " \
70 "bootm"
71
72#define CONFIG_LOADS_ECHO 0 /* echo off for serial download */
73#undef CFG_LOADS_BAUD_CHANGE /* don't allow baudrate change */
74
75#undef CONFIG_WATCHDOG /* watchdog disabled */
76#define CONFIG_HW_WATCHDOG
77
78#undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */
79
80#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE | CONFIG_BOOTP_NISDOMAIN)
81
82#undef CONFIG_MAC_PARTITION
83#undef CONFIG_DOS_PARTITION
84
85#define CONFIG_RTC_MPC8xx /* use internal RTC of MPC8xx */
86
87#define CONFIG_NET_MULTI 1 /* the only way to get the FEC in */
88#define FEC_ENET 1 /* eth.c needs it that way... */
89#undef CFG_DISCOVER_PHY /* do not discover phys */
90#define CONFIG_MII 1
91#define CONFIG_RMII 1 /* use RMII interface */
92
93#if defined(CONFIG_NETTA_ISDN)
94#define CONFIG_ETHER_ON_FEC1 1
95#define CONFIG_FEC1_PHY 1 /* phy address of FEC1 */
96#define CONFIG_FEC1_PHY_NORXERR 1
97#undef CONFIG_ETHER_ON_FEC2
98#else
99#define CONFIG_ETHER_ON_FEC1 1
100#define CONFIG_FEC1_PHY 8 /* phy address of FEC1 */
101#define CONFIG_FEC1_PHY_NORXERR 1
102#define CONFIG_ETHER_ON_FEC2 1
103#define CONFIG_FEC2_PHY 1 /* phy address of FEC2 */
104#define CONFIG_FEC2_PHY_NORXERR 1
105#endif
106
107#define CONFIG_ENV_OVERWRITE 1 /* allow modification of vendor params */
108
109/* POST support */
110#define CONFIG_POST (CFG_POST_MEMORY | \
111 CFG_POST_DSP )
112
113#define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
114 CFG_CMD_NAND | \
115 CFG_CMD_DHCP | \
116 CFG_CMD_PING | \
117 CFG_CMD_MII | \
118 CFG_CMD_PCMCIA | CFG_CMD_IDE | CFG_CMD_FAT | \
119 CFG_CMD_DIAG | \
120 CFG_CMD_CDP \
121 )
122
123#define CONFIG_BOARD_EARLY_INIT_F 1
124#define CONFIG_MISC_INIT_R
125
126/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
127#include <cmd_confdefs.h>
128
129/*
130 * Miscellaneous configurable options
131 */
132#define CFG_LONGHELP /* undef to save memory */
133#define CFG_PROMPT "=> " /* Monitor Command Prompt */
134
135#define CFG_HUSH_PARSER 1
136#define CFG_PROMPT_HUSH_PS2 "> "
137
138#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
139#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
140#else
141#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
142#endif
143#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
144#define CFG_MAXARGS 16 /* max number of command args */
145#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
146
147#define CFG_MEMTEST_START 0x0300000 /* memtest works on */
148#define CFG_MEMTEST_END 0x0700000 /* 3 ... 7 MB in DRAM */
149
150#define CFG_LOAD_ADDR 0x100000 /* default load address */
151
152#define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
153
154#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
155
156/*
157 * Low Level Configuration Settings
158 * (address mappings, register initial values, etc.)
159 * You should know what you are doing if you make changes here.
160 */
161/*-----------------------------------------------------------------------
162 * Internal Memory Mapped Register
163 */
164#define CFG_IMMR 0xFF000000
165
166/*-----------------------------------------------------------------------
167 * Definitions for initial stack pointer and data area (in DPRAM)
168 */
169#define CFG_INIT_RAM_ADDR CFG_IMMR
170#define CFG_INIT_RAM_END 0x3000 /* End of used area in DPRAM */
171#define CFG_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
172#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
173#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
174
175/*-----------------------------------------------------------------------
176 * Start addresses for the final memory configuration
177 * (Set up by the startup code)
178 * Please note that CFG_SDRAM_BASE _must_ start at 0
179 */
180#define CFG_SDRAM_BASE 0x00000000
181#define CFG_FLASH_BASE 0x40000000
182#if defined(DEBUG)
183#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
184#else
185#define CFG_MONITOR_LEN (192 << 10) /* Reserve 192 kB for Monitor */
186#endif
187#define CFG_MONITOR_BASE CFG_FLASH_BASE
188#define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
189
190/*
191 * For booting Linux, the board info and command line data
192 * have to be in the first 8 MB of memory, since this is
193 * the maximum mapped by the Linux kernel during initialization.
194 */
195#define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
196
197/*-----------------------------------------------------------------------
198 * FLASH organization
199 */
200#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
201#define CFG_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
202
203#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
204#define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
205
206#define CFG_ENV_IS_IN_FLASH 1
207#define CFG_ENV_SECT_SIZE 0x10000
208
209#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x60000)
210#define CFG_ENV_OFFSET 0
211#define CFG_ENV_SIZE 0x4000
212
213#define CFG_ENV_ADDR_REDUND (CFG_FLASH_BASE + 0x70000)
214#define CFG_ENV_OFFSET_REDUND 0
215#define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE
216
217/*-----------------------------------------------------------------------
218 * Cache Configuration
219 */
220#define CFG_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
221#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
222#define CFG_CACHELINE_SHIFT 4 /* log base 2 of the above value */
223#endif
224
225/*-----------------------------------------------------------------------
226 * SYPCR - System Protection Control 11-9
227 * SYPCR can only be written once after reset!
228 *-----------------------------------------------------------------------
229 * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
230 */
231#if defined(CONFIG_WATCHDOG)
232#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
233 SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
234#else
235#define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
236#endif
237
238/*-----------------------------------------------------------------------
239 * SIUMCR - SIU Module Configuration 11-6
240 *-----------------------------------------------------------------------
241 * PCMCIA config., multi-function pin tri-state
242 */
243#ifndef CONFIG_CAN_DRIVER
244#define CFG_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
245#else /* we must activate GPL5 in the SIUMCR for CAN */
246#define CFG_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC)
247#endif /* CONFIG_CAN_DRIVER */
248
249/*-----------------------------------------------------------------------
250 * TBSCR - Time Base Status and Control 11-26
251 *-----------------------------------------------------------------------
252 * Clear Reference Interrupt Status, Timebase freezing enabled
253 */
254#define CFG_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
255
256/*-----------------------------------------------------------------------
257 * RTCSC - Real-Time Clock Status and Control Register 11-27
258 *-----------------------------------------------------------------------
259 */
260#define CFG_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE)
261
262/*-----------------------------------------------------------------------
263 * PISCR - Periodic Interrupt Status and Control 11-31
264 *-----------------------------------------------------------------------
265 * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
266 */
267#define CFG_PISCR (PISCR_PS | PISCR_PITF)
268
269/*-----------------------------------------------------------------------
270 * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
271 *-----------------------------------------------------------------------
272 * Reset PLL lock status sticky bit, timer expired status bit and timer
273 * interrupt status bit
274 *
275 */
276
277#if CONFIG_XIN == 10000000
278
279#if MPC8XX_HZ == 120000000
280#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
281 (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
282 PLPRCR_TEXPS)
283#elif MPC8XX_HZ == 100000000
284#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
285 (0 << PLPRCR_S_SHIFT) | (10 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
286 PLPRCR_TEXPS)
287#elif MPC8XX_HZ == 50000000
288#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
289 (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
290 PLPRCR_TEXPS)
291#elif MPC8XX_HZ == 25000000
292#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
293 (2 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \
294 PLPRCR_TEXPS)
295#elif MPC8XX_HZ == 40000000
296#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
297 (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
298 PLPRCR_TEXPS)
299#elif MPC8XX_HZ == 75000000
300#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
301 (1 << PLPRCR_S_SHIFT) | (15 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \
302 PLPRCR_TEXPS)
303#else
304#error unsupported CPU freq for XIN = 10MHz
305#endif
306
307#elif CONFIG_XIN == 50000000
308
309#if MPC8XX_HZ == 120000000
310#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
311 (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
312 PLPRCR_TEXPS)
313#elif MPC8XX_HZ == 100000000
314#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
315 (0 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
316 PLPRCR_TEXPS)
317#elif MPC8XX_HZ == 80000000
318#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
319 (0 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \
320 PLPRCR_TEXPS)
321#elif MPC8XX_HZ == 50000000
322#define CFG_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \
323 (1 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \
324 PLPRCR_TEXPS)
325#else
326#error unsupported CPU freq for XIN = 50MHz
327#endif
328
329#else
330
331#error unsupported XIN freq
332#endif
333
334
335/*
336 *-----------------------------------------------------------------------
337 * SCCR - System Clock and reset Control Register 15-27
338 *-----------------------------------------------------------------------
339 * Set clock output, timebase and RTC source and divider,
340 * power management and some other internal clocks
341 */
342
343#define SCCR_MASK SCCR_EBDF11
344#if MPC8XX_HZ > 66666666
345#define CFG_SCCR (SCCR_TBS | \
346 SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
347 SCCR_DFNL001 | SCCR_DFNH000 | SCCR_DFLCD000 | \
348 SCCR_DFALCD00 | SCCR_EBDF01)
349#else
350#define CFG_SCCR (SCCR_TBS | \
351 SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
352 SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
353 SCCR_DFALCD00)
354#endif
355
356/*-----------------------------------------------------------------------
357 *
358 *-----------------------------------------------------------------------
359 *
360 */
361/*#define CFG_DER 0x2002000F*/
362#define CFG_DER 0
363
364/*
365 * Init Memory Controller:
366 *
367 * BR0/1 and OR0/1 (FLASH)
368 */
369
370#define FLASH_BASE0_PRELIM 0x40000000 /* FLASH bank #0 */
371
372/* used to re-map FLASH both when starting from SRAM or FLASH:
373 * restrict access enough to keep SRAM working (if any)
374 * but not too much to meddle with FLASH accesses
375 */
376#define CFG_REMAP_OR_AM 0x80000000 /* OR addr mask */
377#define CFG_PRELIM_OR_AM 0xE0000000 /* OR addr mask */
378
379/* FLASH timing: ACS = 11, TRLX = 0, CSNT = 1, SCY = 5, EHTR = 1 */
380#define CFG_OR_TIMING_FLASH (OR_CSNT_SAM | OR_BI | OR_SCY_5_CLK | OR_TRLX)
381
382#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
383#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
384#define CFG_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V )
385
386/*
387 * BR3 and OR3 (SDRAM)
388 *
389 */
390#define SDRAM_BASE3_PRELIM 0x00000000 /* SDRAM bank #0 */
391#define SDRAM_MAX_SIZE (256 << 20) /* max 256MB per bank */
392
393/* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care) */
394#define CFG_OR_TIMING_SDRAM (OR_CSNT_SAM | OR_G5LS)
395
396#define CFG_OR3_PRELIM ((0xFFFFFFFFLU & ~(SDRAM_MAX_SIZE - 1)) | CFG_OR_TIMING_SDRAM)
397#define CFG_BR3_PRELIM ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_PS_32 | BR_V)
398
399/*
400 * Memory Periodic Timer Prescaler
401 */
402
403/*
404 * Memory Periodic Timer Prescaler
405 *
406 * The Divider for PTA (refresh timer) configuration is based on an
407 * example SDRAM configuration (64 MBit, one bank). The adjustment to
408 * the number of chip selects (NCS) and the actually needed refresh
409 * rate is done by setting MPTPR.
410 *
411 * PTA is calculated from
412 * PTA = (gclk * Trefresh) / ((2 ^ (2 * DFBRG)) * PTP * NCS)
413 *
414 * gclk CPU clock (not bus clock!)
415 * Trefresh Refresh cycle * 4 (four word bursts used)
416 *
417 * 4096 Rows from SDRAM example configuration
418 * 1000 factor s -> ms
419 * 32 PTP (pre-divider from MPTPR) from SDRAM example configuration
420 * 4 Number of refresh cycles per period
421 * 64 Refresh cycle in ms per number of rows
422 * --------------------------------------------
423 * Divider = 4096 * 32 * 1000 / (4 * 64) = 512000
424 *
425 * 50 MHz => 50.000.000 / Divider = 98
426 * 66 Mhz => 66.000.000 / Divider = 129
427 * 80 Mhz => 80.000.000 / Divider = 156
428 */
429
430#if MPC8XX_HZ == 120000000
431#define CFG_MAMR_PTA 234
432#elif MPC8XX_HZ == 100000000
433#define CFG_MAMR_PTA 195
434#elif MPC8XX_HZ == 80000000
435#define CFG_MAMR_PTA 156
436#elif MPC8XX_HZ == 50000000
437#define CFG_MAMR_PTA 98
438#else
439#error Unknown frequency
440#endif
441
442
443/*
444 * For 16 MBit, refresh rates could be 31.3 us
445 * (= 64 ms / 2K = 125 / quad bursts).
446 * For a simpler initialization, 15.6 us is used instead.
447 *
448 * #define CFG_MPTPR_2BK_2K MPTPR_PTP_DIV32 for 2 banks
449 * #define CFG_MPTPR_1BK_2K MPTPR_PTP_DIV64 for 1 bank
450 */
451#define CFG_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */
452#define CFG_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */
453
454/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */
455#define CFG_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */
456#define CFG_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */
457
458/*
459 * MAMR settings for SDRAM
460 */
461
462/* 8 column SDRAM */
463#define CFG_MAMR_8COL ((CFG_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \
464 MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \
465 MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
466
467/* 9 column SDRAM */
468#define CFG_MAMR_9COL ((CFG_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \
469 MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \
470 MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
471
472/*
473 * Internal Definitions
474 *
475 * Boot Flags
476 */
477#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
478#define BOOTFLAG_WARM 0x02 /* Software reboot */
479
480#define CONFIG_ARTOS /* include ARTOS support */
481
482#define CONFIG_LAST_STAGE_INIT /* needed to reset the damn phys */
483
484/***********************************************************************************************************
485
486 Pin definitions:
487
488 +------+----------------+--------+------------------------------------------------------------
489 | # | Name | Type | Comment
490 +------+----------------+--------+------------------------------------------------------------
491 | PA3 | OK_ETH_3V | Input | CISCO Ethernet power OK
492 | | | | (NetRoute: FEC1, TA: FEC2) (0=power OK)
493 | PA6 | P_VCCD1 | Output | TPS2211A PCMCIA
494 | PA7 | DCL1_3V | Periph | IDL1 PCM clock
495 | PA8 | DSP_DR1 | Periph | IDL1 PCM Data Rx
496 | PA9 | L1TXDA | Periph | IDL1 PCM Data Tx
497 | PA10 | P_VCCD0 | Output | TPS2211A PCMCIA
498 | PA12 | P_SHDN | Output | TPS2211A PCMCIA
499 | PA13 | ETH_LOOP | Output | CISCO Loopback remote power
500 | | | | (NetRoute: FEC1, TA: FEC2) (1=NORMAL)
501 | PA14 | P_VPPD0 | Output | TPS2211A PCMCIA
502 | PA15 | P_VPPD1 | Output | TPS2211A PCMCIA
503 | PB14 | SPIEN_FXO | Output | SPI CS for FXO daughter-board
504 | PB15 | SPIEN_S1 | Output | SPI CS for S-interface 1 (NetRoute only)
505 | PB16 | DREQ1 | Output | D channel request for S-interface chip 1.
506 | PB17 | L1ST3 | Periph | IDL1 timeslot enable signal for PPC
507 | PB18 | L1ST2 | Periph | IDL1 timeslot enable signal for PPC
508 | PB19 | SPIEN_S2 | Output | SPI CS for S-interface 2 (NetRoute only)
509 | PB20 | SPIEN_SEEPROM | Output | SPI CS for serial eeprom
510 | PB21 | LEDIO | Output | Led mode indication for PHY
511 | PB22 | UART_CTS | Input | UART CTS
512 | PB23 | UART_RTS | Output | UART RTS
513 | PB24 | UART_RX | Periph | UART Data Rx
514 | PB25 | UART_TX | Periph | UART Data Tx
515 | PB26 | RMII-MDC | Periph | Free for future use (MII mgt clock)
516 | PB27 | RMII-MDIO | Periph | Free for future use (MII mgt data)
517 | PB28 | SPI_RXD_3V | Input | SPI Data Rx
518 | PB29 | SPI_TXD | Output | SPI Data Tx
519 | PB30 | SPI_CLK | Output | SPI Clock
520 | PB31 | RMII1-REFCLK | Periph | RMII reference clock for FEC1
521 | PC4 | PHY1_LINK | Input | PHY link state FEC1 (interrupt)
522 | PC5 | PHY2_LINK | Input | PHY link state FEC2 (interrupt)
523 | PC6 | RMII1-MDINT | Input | PHY prog interrupt FEC1 (interrupt)
524 | PC7 | RMII2-MDINT | Input | PHY prog interrupt FEC1 (interrupt)
525 | PC8 | P_OC | Input | TPS2211A PCMCIA overcurrent (interrupt) (1=OK)
526 | PC9 | COM_HOOK1 | Input | Codec interrupt chip #1 (interrupt)
527 | PC10 | COM_HOOK2 | Input | Codec interrupt chip #2 (interrupt)
528 | PC11 | COM_HOOK4 | Input | Codec interrupt chip #4 (interrupt)
529 | PC12 | COM_HOOK3 | Input | Codec interrupt chip #3 (interrupt)
530 | PC13 | F_RY_BY | Input | NAND ready signal (interrupt)
531 | PC14 | FAN_OK | Input | Fan status signal (interrupt) (1=OK)
532 | PC15 | PC15_DIRECT0 | Periph | PCMCIA DMA request.
533 | PD3 | F_ALE | Output | NAND
534 | PD4 | F_CLE | Output | NAND
535 | PD5 | F_CE | Output | NAND
536 | PD6 | DSP_INT | Output | DSP debug interrupt
537 | PD7 | DSP_RESET | Output | DSP reset
538 | PD8 | RMII_MDC | Periph | MII mgt clock
539 | PD9 | SPIEN_C1 | Output | SPI CS for codec #1
540 | PD10 | SPIEN_C2 | Output | SPI CS for codec #2
541 | PD11 | SPIEN_C3 | Output | SPI CS for codec #3
542 | PD12 | FSC2 | Periph | IDL2 frame sync
543 | PD13 | DGRANT2 | Input | D channel grant from S #2
544 | PD14 | SPIEN_C4 | Output | SPI CS for codec #4
545 | PD15 | TP700 | Output | Testpoint for software debugging
546 | PE14 | RMII2-TXD0 | Periph | FEC2 transmit data
547 | PE15 | RMII2-TXD1 | Periph | FEC2 transmit data
548 | PE16 | RMII2-REFCLK | Periph | TA: RMII ref clock for
549 | | DCL2 | Periph | NetRoute: PCM clock #2
550 | PE17 | TP703 | Output | Testpoint for software debugging
551 | PE18 | DGRANT1 | Input | D channel grant from S #1
552 | PE19 | RMII2-TXEN | Periph | TA: FEC2 tx enable
553 | | PCM2OUT | Periph | NetRoute: Tx data for IDL2
554 | PE20 | FSC1 | Periph | IDL1 frame sync
555 | PE21 | RMII2-RXD0 | Periph | FEC2 receive data
556 | PE22 | RMII2-RXD1 | Periph | FEC2 receive data
557 | PE23 | L1ST1 | Periph | IDL1 timeslot enable signal for PPC
558 | PE24 | U-N1 | Output | Select user/network for S #1 (0=user)
559 | PE25 | U-N2 | Output | Select user/network for S #2 (0=user)
560 | PE26 | RMII2-RXDV | Periph | FEC2 valid
561 | PE27 | DREQ2 | Output | D channel request for S #2.
562 | PE28 | FPGA_DONE | Input | FPGA done signal
563 | PE29 | FPGA_INIT | Output | FPGA init signal
564 | PE30 | UDOUT2_3V | Input | IDL2 PCM input
565 | PE31 | | | Free
566 +------+----------------+--------+---------------------------------------------------
567
568 Chip selects:
569
570 +------+----------------+------------------------------------------------------------
571 | # | Name | Comment
572 +------+----------------+------------------------------------------------------------
573 | CS0 | CS0 | Boot flash
574 | CS1 | CS_FLASH | NAND flash
575 | CS2 | CS_DSP | DSP
576 | CS3 | DCS_DRAM | DRAM
577 | CS4 | CS_ER1 | External output register
578 +------+----------------+------------------------------------------------------------
579
580 Interrupts:
581
582 +------+----------------+------------------------------------------------------------
583 | # | Name | Comment
584 +------+----------------+------------------------------------------------------------
585 | IRQ1 | UINTER_3V | S interupt chips interrupt (common)
586 | IRQ3 | IRQ_DSP | DSP interrupt
587 | IRQ4 | IRQ_DSP1 | Extra DSP interrupt
588 +------+----------------+------------------------------------------------------------
589
590*************************************************************************************************/
591
592#define DSP_SIZE 0x00010000 /* 64K */
593#define NAND_SIZE 0x00010000 /* 64K */
594#define ER_SIZE 0x00010000 /* 64K */
595#define DUMMY_SIZE 0x00010000 /* 64K */
596
597#define DSP_BASE 0xF1000000
598#define NAND_BASE 0xF1010000
599#define ER_BASE 0xF1020000
600#define DUMMY_BASE 0xF1FF0000
601
602/****************************************************************/
603
604/* NAND */
605#define CFG_NAND_BASE NAND_BASE
606#define CONFIG_MTD_NAND_ECC_JFFS2
607
608#define CFG_MAX_NAND_DEVICE 1
609#define NAND_NO_RB
610
611#define SECTORSIZE 512
612#define ADDR_COLUMN 1
613#define ADDR_PAGE 2
614#define ADDR_COLUMN_PAGE 3
615#define NAND_ChipID_UNKNOWN 0x00
616#define NAND_MAX_FLOORS 1
617#define NAND_MAX_CHIPS 1
618
619/* ALE = PD3, CLE = PD4, CE = PD5, F_RY_BY = PC13 */
620#define NAND_DISABLE_CE(nand) \
621 do { \
622 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) |= (1 << (15 - 5)); \
623 } while(0)
624
625#define NAND_ENABLE_CE(nand) \
626 do { \
627 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) &= ~(1 << (15 - 5)); \
628 } while(0)
629
630#define NAND_CTL_CLRALE(nandptr) \
631 do { \
632 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) &= ~(1 << (15 - 3)); \
633 } while(0)
634
635#define NAND_CTL_SETALE(nandptr) \
636 do { \
637 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) |= (1 << (15 - 3)); \
638 } while(0)
639
640#define NAND_CTL_CLRCLE(nandptr) \
641 do { \
642 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) &= ~(1 << (15 - 4)); \
643 } while(0)
644
645#define NAND_CTL_SETCLE(nandptr) \
646 do { \
647 (((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pddat) |= (1 << (15 - 4)); \
648 } while(0)
649
650#ifndef NAND_NO_RB
651#define NAND_WAIT_READY(nand) \
652 do { \
653 while ((((volatile immap_t *)CFG_IMMR)->im_ioport.iop_pcdat & (1 << (15 - 13))) == 0) { \
654 WATCHDOG_RESET(); \
655 } \
656 } while (0)
657#else
658#define NAND_WAIT_READY(nand) udelay(12)
659#endif
660
661#define WRITE_NAND_COMMAND(d, adr) \
662 do { \
663 *(volatile unsigned char *)((unsigned long)(adr)) = (unsigned char)(d); \
664 } while(0)
665
666#define WRITE_NAND_ADDRESS(d, adr) \
667 do { \
668 *(volatile unsigned char *)((unsigned long)(adr)) = (unsigned char)(d); \
669 } while(0)
670
671#define WRITE_NAND(d, adr) \
672 do { \
673 *(volatile unsigned char *)((unsigned long)(adr)) = (unsigned char)(d); \
674 } while(0)
675
676#define READ_NAND(adr) \
677 ((unsigned char)(*(volatile unsigned char *)(unsigned long)(adr)))
678
679/*****************************************************************************/
680
681#if 1
682/*-----------------------------------------------------------------------
683 * PCMCIA stuff
684 *-----------------------------------------------------------------------
685 */
686
687#define CFG_PCMCIA_MEM_ADDR (0xE0000000)
688#define CFG_PCMCIA_MEM_SIZE ( 64 << 20 )
689#define CFG_PCMCIA_DMA_ADDR (0xE4000000)
690#define CFG_PCMCIA_DMA_SIZE ( 64 << 20 )
691#define CFG_PCMCIA_ATTRB_ADDR (0xE8000000)
692#define CFG_PCMCIA_ATTRB_SIZE ( 64 << 20 )
693#define CFG_PCMCIA_IO_ADDR (0xEC000000)
694#define CFG_PCMCIA_IO_SIZE ( 64 << 20 )
695
696/*-----------------------------------------------------------------------
697 * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
698 *-----------------------------------------------------------------------
699 */
700
701#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
702
703#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
704#undef CONFIG_IDE_LED /* LED for ide not supported */
705#undef CONFIG_IDE_RESET /* reset for ide not supported */
706
707#define CFG_IDE_MAXBUS 1 /* max. 1 IDE bus */
708#define CFG_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */
709
710#define CFG_ATA_IDE0_OFFSET 0x0000
711
712#define CFG_ATA_BASE_ADDR CFG_PCMCIA_MEM_ADDR
713
714/* Offset for data I/O */
715#define CFG_ATA_DATA_OFFSET (CFG_PCMCIA_MEM_SIZE + 0x320)
716
717/* Offset for normal register accesses */
718#define CFG_ATA_REG_OFFSET (2 * CFG_PCMCIA_MEM_SIZE + 0x320)
719
720/* Offset for alternate registers */
721#define CFG_ATA_ALT_OFFSET 0x0100
722
723#define CONFIG_MAC_PARTITION
724#define CONFIG_DOS_PARTITION
725#endif
726
727/*************************************************************************************************/
728
729#define CONFIG_CDP_DEVICE_ID 20
730#define CONFIG_CDP_DEVICE_ID_PREFIX "NT" /* netta */
731#define CONFIG_CDP_PORT_ID "eth%d"
732#define CONFIG_CDP_CAPABILITIES 0x00000010
733#define CONFIG_CDP_VERSION "u-boot 1.0" " " __DATE__ " " __TIME__
734#define CONFIG_CDP_PLATFORM "Intracom NetTA"
735#define CONFIG_CDP_TRIGGER 0x20020001
736#define CONFIG_CDP_POWER_CONSUMPTION 4300 /* 90 mA @ 48V */
737#define CONFIG_CDP_APPLIANCE_VLAN_TYPE 0x01 /* ipphone? */
738
739/*************************************************************************************************/
740
741#define CONFIG_AUTO_COMPLETE 1
742
743/*************************************************************************************************/
744
745#endif /* __CONFIG_H */