wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 1 | /* |
Wolfgang Denk | cd0402a | 2010-11-20 15:07:45 +0100 | [diff] [blame] | 2 | * (C) Copyright 2000-2010 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * Pantelis Antoniou, Intracom S.A., panto@intracom.gr |
| 10 | * U-Boot port on NetTA4 board |
| 11 | */ |
| 12 | |
| 13 | #ifndef __CONFIG_H |
| 14 | #define __CONFIG_H |
| 15 | |
| 16 | /* |
| 17 | * High Level Configuration Options |
| 18 | * (easy to change) |
| 19 | */ |
| 20 | |
| 21 | #define CONFIG_MPC885 1 /* This is a MPC885 CPU */ |
| 22 | #define CONFIG_NETTA 1 /* ...on a NetTA board */ |
| 23 | |
Wolfgang Denk | 2ae1824 | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 24 | #define CONFIG_SYS_TEXT_BASE 0x40000000 |
| 25 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 26 | #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ |
| 27 | #undef CONFIG_8xx_CONS_SMC2 |
| 28 | #undef CONFIG_8xx_CONS_NONE |
| 29 | |
| 30 | #define CONFIG_BAUDRATE 115200 /* console baudrate = 115kbps */ |
| 31 | |
| 32 | /* #define CONFIG_XIN 10000000 */ |
| 33 | #define CONFIG_XIN 50000000 |
| 34 | #define MPC8XX_HZ 120000000 |
| 35 | /* #define MPC8XX_HZ 100000000 */ |
| 36 | /* #define MPC8XX_HZ 50000000 */ |
| 37 | /* #define MPC8XX_HZ 80000000 */ |
| 38 | |
| 39 | #define CONFIG_8xx_GCLK_FREQ MPC8XX_HZ |
| 40 | |
| 41 | #if 0 |
| 42 | #define CONFIG_BOOTDELAY -1 /* autoboot disabled */ |
| 43 | #else |
| 44 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
| 45 | #endif |
| 46 | |
| 47 | #undef CONFIG_CLOCKS_IN_MHZ /* clocks NOT passsed to Linux in MHz */ |
| 48 | |
Wolfgang Denk | 32bf3d1 | 2008-03-03 12:16:44 +0100 | [diff] [blame] | 49 | #define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;echo" |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 50 | |
| 51 | #undef CONFIG_BOOTARGS |
| 52 | #define CONFIG_BOOTCOMMAND \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 53 | "tftpboot; " \ |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 54 | "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ |
| 55 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 56 | "bootm" |
| 57 | |
| 58 | #define CONFIG_LOADS_ECHO 0 /* echo off for serial download */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 59 | #undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 60 | |
| 61 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
| 62 | #define CONFIG_HW_WATCHDOG |
| 63 | |
| 64 | #undef CONFIG_CAN_DRIVER /* CAN Driver support disabled */ |
| 65 | |
Jon Loeliger | 7be044e | 2007-07-09 21:24:19 -0500 | [diff] [blame] | 66 | /* |
| 67 | * BOOTP options |
| 68 | */ |
| 69 | #define CONFIG_BOOTP_SUBNETMASK |
| 70 | #define CONFIG_BOOTP_GATEWAY |
| 71 | #define CONFIG_BOOTP_HOSTNAME |
| 72 | #define CONFIG_BOOTP_BOOTPATH |
| 73 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 74 | #define CONFIG_BOOTP_NISDOMAIN |
| 75 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 76 | |
| 77 | #undef CONFIG_MAC_PARTITION |
| 78 | #undef CONFIG_DOS_PARTITION |
| 79 | |
| 80 | #define CONFIG_RTC_MPC8xx /* use internal RTC of MPC8xx */ |
| 81 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 82 | #define FEC_ENET 1 /* eth.c needs it that way... */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 83 | #undef CONFIG_SYS_DISCOVER_PHY /* do not discover phys */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 84 | #define CONFIG_MII 1 |
TsiChung Liew | 0f3ba7e | 2008-03-30 01:22:13 -0500 | [diff] [blame] | 85 | #define CONFIG_MII_INIT 1 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 86 | #define CONFIG_RMII 1 /* use RMII interface */ |
| 87 | |
| 88 | #if defined(CONFIG_NETTA_ISDN) |
| 89 | #define CONFIG_ETHER_ON_FEC1 1 |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 90 | #define CONFIG_FEC1_PHY 1 /* phy address of FEC1 */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 91 | #define CONFIG_FEC1_PHY_NORXERR 1 |
| 92 | #undef CONFIG_ETHER_ON_FEC2 |
| 93 | #else |
| 94 | #define CONFIG_ETHER_ON_FEC1 1 |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 95 | #define CONFIG_FEC1_PHY 8 /* phy address of FEC1 */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 96 | #define CONFIG_FEC1_PHY_NORXERR 1 |
| 97 | #define CONFIG_ETHER_ON_FEC2 1 |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 98 | #define CONFIG_FEC2_PHY 1 /* phy address of FEC2 */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 99 | #define CONFIG_FEC2_PHY_NORXERR 1 |
| 100 | #endif |
| 101 | |
| 102 | #define CONFIG_ENV_OVERWRITE 1 /* allow modification of vendor params */ |
| 103 | |
| 104 | /* POST support */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 105 | #define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \ |
| 106 | CONFIG_SYS_POST_CODEC | \ |
| 107 | CONFIG_SYS_POST_DSP ) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 108 | |
Jon Loeliger | e18a106 | 2007-07-08 14:21:43 -0500 | [diff] [blame] | 109 | |
| 110 | /* |
| 111 | * Command line configuration. |
| 112 | */ |
| 113 | #include <config_cmd_default.h> |
| 114 | |
| 115 | #define CONFIG_CMD_CDP |
| 116 | #define CONFIG_CMD_DHCP |
| 117 | #define CONFIG_CMD_DIAG |
| 118 | #define CONFIG_CMD_FAT |
| 119 | #define CONFIG_CMD_IDE |
| 120 | #define CONFIG_CMD_JFFS2 |
| 121 | #define CONFIG_CMD_MII |
Jon Loeliger | e18a106 | 2007-07-08 14:21:43 -0500 | [diff] [blame] | 122 | #define CONFIG_CMD_NFS |
| 123 | #define CONFIG_CMD_PCMCIA |
| 124 | #define CONFIG_CMD_PING |
| 125 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 126 | |
| 127 | #define CONFIG_BOARD_EARLY_INIT_F 1 |
| 128 | #define CONFIG_MISC_INIT_R |
| 129 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 130 | /* |
| 131 | * Miscellaneous configurable options |
| 132 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 133 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 134 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 135 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 136 | #define CONFIG_SYS_HUSH_PARSER 1 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 137 | |
Jon Loeliger | e18a106 | 2007-07-08 14:21:43 -0500 | [diff] [blame] | 138 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 139 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 140 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 141 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 142 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 143 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 144 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 145 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 146 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 147 | #define CONFIG_SYS_MEMTEST_START 0x0300000 /* memtest works on */ |
| 148 | #define CONFIG_SYS_MEMTEST_END 0x0700000 /* 3 ... 7 MB in DRAM */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 149 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 150 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 151 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 152 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 153 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 154 | /* |
| 155 | * Low Level Configuration Settings |
| 156 | * (address mappings, register initial values, etc.) |
| 157 | * You should know what you are doing if you make changes here. |
| 158 | */ |
| 159 | /*----------------------------------------------------------------------- |
| 160 | * Internal Memory Mapped Register |
| 161 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 162 | #define CONFIG_SYS_IMMR 0xFF000000 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 163 | |
| 164 | /*----------------------------------------------------------------------- |
| 165 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 166 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 167 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR |
Wolfgang Denk | 553f098 | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 168 | #define CONFIG_SYS_INIT_RAM_SIZE 0x3000 /* Size of used area in DPRAM */ |
Wolfgang Denk | 25ddd1f | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 169 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 170 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 171 | |
| 172 | /*----------------------------------------------------------------------- |
| 173 | * Start addresses for the final memory configuration |
| 174 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 175 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 176 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 177 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 178 | #define CONFIG_SYS_FLASH_BASE 0x40000000 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 179 | #if defined(DEBUG) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 180 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 181 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 182 | #define CONFIG_SYS_MONITOR_LEN (192 << 10) /* Reserve 192 kB for Monitor */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 183 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 184 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 185 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 186 | |
| 187 | /* |
| 188 | * For booting Linux, the board info and command line data |
| 189 | * have to be in the first 8 MB of memory, since this is |
| 190 | * the maximum mapped by the Linux kernel during initialization. |
| 191 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 192 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 193 | |
| 194 | /*----------------------------------------------------------------------- |
| 195 | * FLASH organization |
| 196 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 197 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 198 | #define CONFIG_SYS_MAX_FLASH_SECT 8 /* max number of sectors on one chip */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 199 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 200 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 201 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 202 | |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 203 | #define CONFIG_ENV_IS_IN_FLASH 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 204 | #define CONFIG_ENV_SECT_SIZE 0x10000 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 205 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 206 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x60000) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 207 | #define CONFIG_ENV_SIZE 0x4000 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 208 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 209 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + 0x70000) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 210 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 211 | |
| 212 | /*----------------------------------------------------------------------- |
| 213 | * Cache Configuration |
| 214 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 215 | #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ |
Jon Loeliger | e18a106 | 2007-07-08 14:21:43 -0500 | [diff] [blame] | 216 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 217 | #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 218 | #endif |
| 219 | |
| 220 | /*----------------------------------------------------------------------- |
| 221 | * SYPCR - System Protection Control 11-9 |
| 222 | * SYPCR can only be written once after reset! |
| 223 | *----------------------------------------------------------------------- |
| 224 | * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze |
| 225 | */ |
| 226 | #if defined(CONFIG_WATCHDOG) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 227 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 228 | SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) |
| 229 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 230 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 231 | #endif |
| 232 | |
| 233 | /*----------------------------------------------------------------------- |
| 234 | * SIUMCR - SIU Module Configuration 11-6 |
| 235 | *----------------------------------------------------------------------- |
| 236 | * PCMCIA config., multi-function pin tri-state |
| 237 | */ |
| 238 | #ifndef CONFIG_CAN_DRIVER |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 239 | #define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 240 | #else /* we must activate GPL5 in the SIUMCR for CAN */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 241 | #define CONFIG_SYS_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DBPC00 | SIUMCR_MLRC01 | SIUMCR_FRC) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 242 | #endif /* CONFIG_CAN_DRIVER */ |
| 243 | |
| 244 | /*----------------------------------------------------------------------- |
| 245 | * TBSCR - Time Base Status and Control 11-26 |
| 246 | *----------------------------------------------------------------------- |
| 247 | * Clear Reference Interrupt Status, Timebase freezing enabled |
| 248 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 249 | #define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 250 | |
| 251 | /*----------------------------------------------------------------------- |
| 252 | * RTCSC - Real-Time Clock Status and Control Register 11-27 |
| 253 | *----------------------------------------------------------------------- |
| 254 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 255 | #define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 256 | |
| 257 | /*----------------------------------------------------------------------- |
| 258 | * PISCR - Periodic Interrupt Status and Control 11-31 |
| 259 | *----------------------------------------------------------------------- |
| 260 | * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled |
| 261 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 262 | #define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 263 | |
| 264 | /*----------------------------------------------------------------------- |
| 265 | * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 |
| 266 | *----------------------------------------------------------------------- |
| 267 | * Reset PLL lock status sticky bit, timer expired status bit and timer |
| 268 | * interrupt status bit |
| 269 | * |
| 270 | */ |
| 271 | |
| 272 | #if CONFIG_XIN == 10000000 |
| 273 | |
| 274 | #if MPC8XX_HZ == 120000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 275 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 276 | (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 277 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 278 | #elif MPC8XX_HZ == 100000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 279 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 280 | (0 << PLPRCR_S_SHIFT) | (10 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 281 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 282 | #elif MPC8XX_HZ == 50000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 283 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 284 | (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 285 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 286 | #elif MPC8XX_HZ == 25000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 287 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 288 | (2 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (3 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 289 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 290 | #elif MPC8XX_HZ == 40000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 291 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 292 | (1 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 293 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 294 | #elif MPC8XX_HZ == 75000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 295 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 296 | (1 << PLPRCR_S_SHIFT) | (15 << PLPRCR_MFI_SHIFT) | (0 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 297 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 298 | #else |
| 299 | #error unsupported CPU freq for XIN = 10MHz |
| 300 | #endif |
| 301 | |
| 302 | #elif CONFIG_XIN == 50000000 |
| 303 | |
| 304 | #if MPC8XX_HZ == 120000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 305 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 306 | (0 << PLPRCR_S_SHIFT) | (12 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 307 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 308 | #elif MPC8XX_HZ == 100000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 309 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 310 | (0 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 311 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 312 | #elif MPC8XX_HZ == 80000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 313 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 314 | (0 << PLPRCR_S_SHIFT) | (8 << PLPRCR_MFI_SHIFT) | (4 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 315 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 316 | #elif MPC8XX_HZ == 50000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 317 | #define CONFIG_SYS_PLPRCR ((0 << PLPRCR_MFN_SHIFT) | (0 << PLPRCR_MFD_SHIFT) | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 318 | (1 << PLPRCR_S_SHIFT) | (6 << PLPRCR_MFI_SHIFT) | (2 << PLPRCR_PDF_SHIFT) | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 319 | PLPRCR_TEXPS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 320 | #else |
| 321 | #error unsupported CPU freq for XIN = 50MHz |
| 322 | #endif |
| 323 | |
| 324 | #else |
| 325 | |
| 326 | #error unsupported XIN freq |
| 327 | #endif |
| 328 | |
| 329 | |
| 330 | /* |
| 331 | *----------------------------------------------------------------------- |
| 332 | * SCCR - System Clock and reset Control Register 15-27 |
| 333 | *----------------------------------------------------------------------- |
| 334 | * Set clock output, timebase and RTC source and divider, |
| 335 | * power management and some other internal clocks |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 336 | * |
| 337 | * Note: When TBS == 0 the timebase is independent of current cpu clock. |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 338 | */ |
| 339 | |
| 340 | #define SCCR_MASK SCCR_EBDF11 |
| 341 | #if MPC8XX_HZ > 66666666 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 342 | #define CONFIG_SYS_SCCR (/* SCCR_TBS | */ SCCR_CRQEN | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 343 | SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 344 | SCCR_DFNL111 | SCCR_DFNH000 | SCCR_DFLCD000 | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 345 | SCCR_DFALCD00 | SCCR_EBDF01) |
| 346 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 347 | #define CONFIG_SYS_SCCR (/* SCCR_TBS | */ SCCR_CRQEN | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 348 | SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \ |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 349 | SCCR_DFNL111 | SCCR_DFNH000 | SCCR_DFLCD000 | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 350 | SCCR_DFALCD00) |
| 351 | #endif |
| 352 | |
| 353 | /*----------------------------------------------------------------------- |
| 354 | * |
| 355 | *----------------------------------------------------------------------- |
| 356 | * |
| 357 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 358 | /*#define CONFIG_SYS_DER 0x2002000F*/ |
| 359 | #define CONFIG_SYS_DER 0 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 360 | |
| 361 | /* |
| 362 | * Init Memory Controller: |
| 363 | * |
| 364 | * BR0/1 and OR0/1 (FLASH) |
| 365 | */ |
| 366 | |
| 367 | #define FLASH_BASE0_PRELIM 0x40000000 /* FLASH bank #0 */ |
| 368 | |
| 369 | /* used to re-map FLASH both when starting from SRAM or FLASH: |
| 370 | * restrict access enough to keep SRAM working (if any) |
| 371 | * but not too much to meddle with FLASH accesses |
| 372 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 373 | #define CONFIG_SYS_REMAP_OR_AM 0x80000000 /* OR addr mask */ |
| 374 | #define CONFIG_SYS_PRELIM_OR_AM 0xE0000000 /* OR addr mask */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 375 | |
| 376 | /* FLASH timing: ACS = 11, TRLX = 0, CSNT = 1, SCY = 5, EHTR = 1 */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 377 | #define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_BI | OR_SCY_5_CLK | OR_TRLX) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 378 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 379 | #define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) |
| 380 | #define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) |
| 381 | #define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_PS_8 | BR_V ) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 382 | |
| 383 | /* |
| 384 | * BR3 and OR3 (SDRAM) |
| 385 | * |
| 386 | */ |
| 387 | #define SDRAM_BASE3_PRELIM 0x00000000 /* SDRAM bank #0 */ |
| 388 | #define SDRAM_MAX_SIZE (256 << 20) /* max 256MB per bank */ |
| 389 | |
| 390 | /* SDRAM timing: Multiplexed addresses, GPL5 output to GPL5_A (don't care) */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 391 | #define CONFIG_SYS_OR_TIMING_SDRAM (OR_CSNT_SAM | OR_G5LS) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 392 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 393 | #define CONFIG_SYS_OR3_PRELIM ((0xFFFFFFFFLU & ~(SDRAM_MAX_SIZE - 1)) | CONFIG_SYS_OR_TIMING_SDRAM) |
| 394 | #define CONFIG_SYS_BR3_PRELIM ((SDRAM_BASE3_PRELIM & BR_BA_MSK) | BR_MS_UPMB | BR_PS_32 | BR_V) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 395 | |
| 396 | /* |
| 397 | * Memory Periodic Timer Prescaler |
| 398 | */ |
| 399 | |
| 400 | /* |
| 401 | * Memory Periodic Timer Prescaler |
| 402 | * |
| 403 | * The Divider for PTA (refresh timer) configuration is based on an |
| 404 | * example SDRAM configuration (64 MBit, one bank). The adjustment to |
| 405 | * the number of chip selects (NCS) and the actually needed refresh |
| 406 | * rate is done by setting MPTPR. |
| 407 | * |
| 408 | * PTA is calculated from |
| 409 | * PTA = (gclk * Trefresh) / ((2 ^ (2 * DFBRG)) * PTP * NCS) |
| 410 | * |
| 411 | * gclk CPU clock (not bus clock!) |
| 412 | * Trefresh Refresh cycle * 4 (four word bursts used) |
| 413 | * |
| 414 | * 4096 Rows from SDRAM example configuration |
| 415 | * 1000 factor s -> ms |
| 416 | * 32 PTP (pre-divider from MPTPR) from SDRAM example configuration |
| 417 | * 4 Number of refresh cycles per period |
| 418 | * 64 Refresh cycle in ms per number of rows |
| 419 | * -------------------------------------------- |
| 420 | * Divider = 4096 * 32 * 1000 / (4 * 64) = 512000 |
| 421 | * |
| 422 | * 50 MHz => 50.000.000 / Divider = 98 |
| 423 | * 66 Mhz => 66.000.000 / Divider = 129 |
| 424 | * 80 Mhz => 80.000.000 / Divider = 156 |
| 425 | */ |
| 426 | |
| 427 | #if MPC8XX_HZ == 120000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 428 | #define CONFIG_SYS_MAMR_PTA 234 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 429 | #elif MPC8XX_HZ == 100000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 430 | #define CONFIG_SYS_MAMR_PTA 195 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 431 | #elif MPC8XX_HZ == 80000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 432 | #define CONFIG_SYS_MAMR_PTA 156 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 433 | #elif MPC8XX_HZ == 50000000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 434 | #define CONFIG_SYS_MAMR_PTA 98 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 435 | #else |
| 436 | #error Unknown frequency |
| 437 | #endif |
| 438 | |
| 439 | |
| 440 | /* |
| 441 | * For 16 MBit, refresh rates could be 31.3 us |
| 442 | * (= 64 ms / 2K = 125 / quad bursts). |
| 443 | * For a simpler initialization, 15.6 us is used instead. |
| 444 | * |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 445 | * #define CONFIG_SYS_MPTPR_2BK_2K MPTPR_PTP_DIV32 for 2 banks |
| 446 | * #define CONFIG_SYS_MPTPR_1BK_2K MPTPR_PTP_DIV64 for 1 bank |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 447 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 448 | #define CONFIG_SYS_MPTPR_2BK_4K MPTPR_PTP_DIV16 /* setting for 2 banks */ |
| 449 | #define CONFIG_SYS_MPTPR_1BK_4K MPTPR_PTP_DIV32 /* setting for 1 bank */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 450 | |
| 451 | /* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 452 | #define CONFIG_SYS_MPTPR_2BK_8K MPTPR_PTP_DIV8 /* setting for 2 banks */ |
| 453 | #define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16 /* setting for 1 bank */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 454 | |
| 455 | /* |
| 456 | * MAMR settings for SDRAM |
| 457 | */ |
| 458 | |
| 459 | /* 8 column SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 460 | #define CONFIG_SYS_MAMR_8COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 461 | MAMR_AMA_TYPE_0 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A11 | \ |
| 462 | MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) |
| 463 | |
| 464 | /* 9 column SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 465 | #define CONFIG_SYS_MAMR_9COL ((CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | MAMR_PTAE | \ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 466 | MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | MAMR_G0CLA_A10 | \ |
| 467 | MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X) |
| 468 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 469 | #define CONFIG_LAST_STAGE_INIT /* needed to reset the damn phys */ |
| 470 | |
| 471 | /*********************************************************************************************************** |
| 472 | |
| 473 | Pin definitions: |
| 474 | |
| 475 | +------+----------------+--------+------------------------------------------------------------ |
| 476 | | # | Name | Type | Comment |
| 477 | +------+----------------+--------+------------------------------------------------------------ |
| 478 | | PA3 | OK_ETH_3V | Input | CISCO Ethernet power OK |
| 479 | | | | | (NetRoute: FEC1, TA: FEC2) (0=power OK) |
| 480 | | PA6 | P_VCCD1 | Output | TPS2211A PCMCIA |
| 481 | | PA7 | DCL1_3V | Periph | IDL1 PCM clock |
| 482 | | PA8 | DSP_DR1 | Periph | IDL1 PCM Data Rx |
| 483 | | PA9 | L1TXDA | Periph | IDL1 PCM Data Tx |
| 484 | | PA10 | P_VCCD0 | Output | TPS2211A PCMCIA |
| 485 | | PA12 | P_SHDN | Output | TPS2211A PCMCIA |
| 486 | | PA13 | ETH_LOOP | Output | CISCO Loopback remote power |
| 487 | | | | | (NetRoute: FEC1, TA: FEC2) (1=NORMAL) |
| 488 | | PA14 | P_VPPD0 | Output | TPS2211A PCMCIA |
| 489 | | PA15 | P_VPPD1 | Output | TPS2211A PCMCIA |
| 490 | | PB14 | SPIEN_FXO | Output | SPI CS for FXO daughter-board |
| 491 | | PB15 | SPIEN_S1 | Output | SPI CS for S-interface 1 (NetRoute only) |
| 492 | | PB16 | DREQ1 | Output | D channel request for S-interface chip 1. |
| 493 | | PB17 | L1ST3 | Periph | IDL1 timeslot enable signal for PPC |
| 494 | | PB18 | L1ST2 | Periph | IDL1 timeslot enable signal for PPC |
| 495 | | PB19 | SPIEN_S2 | Output | SPI CS for S-interface 2 (NetRoute only) |
| 496 | | PB20 | SPIEN_SEEPROM | Output | SPI CS for serial eeprom |
| 497 | | PB21 | LEDIO | Output | Led mode indication for PHY |
| 498 | | PB22 | UART_CTS | Input | UART CTS |
| 499 | | PB23 | UART_RTS | Output | UART RTS |
| 500 | | PB24 | UART_RX | Periph | UART Data Rx |
| 501 | | PB25 | UART_TX | Periph | UART Data Tx |
| 502 | | PB26 | RMII-MDC | Periph | Free for future use (MII mgt clock) |
| 503 | | PB27 | RMII-MDIO | Periph | Free for future use (MII mgt data) |
| 504 | | PB28 | SPI_RXD_3V | Input | SPI Data Rx |
| 505 | | PB29 | SPI_TXD | Output | SPI Data Tx |
| 506 | | PB30 | SPI_CLK | Output | SPI Clock |
| 507 | | PB31 | RMII1-REFCLK | Periph | RMII reference clock for FEC1 |
| 508 | | PC4 | PHY1_LINK | Input | PHY link state FEC1 (interrupt) |
| 509 | | PC5 | PHY2_LINK | Input | PHY link state FEC2 (interrupt) |
| 510 | | PC6 | RMII1-MDINT | Input | PHY prog interrupt FEC1 (interrupt) |
| 511 | | PC7 | RMII2-MDINT | Input | PHY prog interrupt FEC1 (interrupt) |
| 512 | | PC8 | P_OC | Input | TPS2211A PCMCIA overcurrent (interrupt) (1=OK) |
| 513 | | PC9 | COM_HOOK1 | Input | Codec interrupt chip #1 (interrupt) |
| 514 | | PC10 | COM_HOOK2 | Input | Codec interrupt chip #2 (interrupt) |
| 515 | | PC11 | COM_HOOK4 | Input | Codec interrupt chip #4 (interrupt) |
| 516 | | PC12 | COM_HOOK3 | Input | Codec interrupt chip #3 (interrupt) |
| 517 | | PC13 | F_RY_BY | Input | NAND ready signal (interrupt) |
| 518 | | PC14 | FAN_OK | Input | Fan status signal (interrupt) (1=OK) |
| 519 | | PC15 | PC15_DIRECT0 | Periph | PCMCIA DMA request. |
| 520 | | PD3 | F_ALE | Output | NAND |
| 521 | | PD4 | F_CLE | Output | NAND |
| 522 | | PD5 | F_CE | Output | NAND |
| 523 | | PD6 | DSP_INT | Output | DSP debug interrupt |
| 524 | | PD7 | DSP_RESET | Output | DSP reset |
| 525 | | PD8 | RMII_MDC | Periph | MII mgt clock |
| 526 | | PD9 | SPIEN_C1 | Output | SPI CS for codec #1 |
| 527 | | PD10 | SPIEN_C2 | Output | SPI CS for codec #2 |
| 528 | | PD11 | SPIEN_C3 | Output | SPI CS for codec #3 |
| 529 | | PD12 | FSC2 | Periph | IDL2 frame sync |
| 530 | | PD13 | DGRANT2 | Input | D channel grant from S #2 |
| 531 | | PD14 | SPIEN_C4 | Output | SPI CS for codec #4 |
| 532 | | PD15 | TP700 | Output | Testpoint for software debugging |
| 533 | | PE14 | RMII2-TXD0 | Periph | FEC2 transmit data |
| 534 | | PE15 | RMII2-TXD1 | Periph | FEC2 transmit data |
| 535 | | PE16 | RMII2-REFCLK | Periph | TA: RMII ref clock for |
| 536 | | | DCL2 | Periph | NetRoute: PCM clock #2 |
| 537 | | PE17 | TP703 | Output | Testpoint for software debugging |
| 538 | | PE18 | DGRANT1 | Input | D channel grant from S #1 |
| 539 | | PE19 | RMII2-TXEN | Periph | TA: FEC2 tx enable |
| 540 | | | PCM2OUT | Periph | NetRoute: Tx data for IDL2 |
| 541 | | PE20 | FSC1 | Periph | IDL1 frame sync |
| 542 | | PE21 | RMII2-RXD0 | Periph | FEC2 receive data |
| 543 | | PE22 | RMII2-RXD1 | Periph | FEC2 receive data |
| 544 | | PE23 | L1ST1 | Periph | IDL1 timeslot enable signal for PPC |
| 545 | | PE24 | U-N1 | Output | Select user/network for S #1 (0=user) |
| 546 | | PE25 | U-N2 | Output | Select user/network for S #2 (0=user) |
| 547 | | PE26 | RMII2-RXDV | Periph | FEC2 valid |
| 548 | | PE27 | DREQ2 | Output | D channel request for S #2. |
| 549 | | PE28 | FPGA_DONE | Input | FPGA done signal |
| 550 | | PE29 | FPGA_INIT | Output | FPGA init signal |
| 551 | | PE30 | UDOUT2_3V | Input | IDL2 PCM input |
| 552 | | PE31 | | | Free |
| 553 | +------+----------------+--------+--------------------------------------------------- |
| 554 | |
| 555 | Chip selects: |
| 556 | |
| 557 | +------+----------------+------------------------------------------------------------ |
| 558 | | # | Name | Comment |
| 559 | +------+----------------+------------------------------------------------------------ |
| 560 | | CS0 | CS0 | Boot flash |
| 561 | | CS1 | CS_FLASH | NAND flash |
| 562 | | CS2 | CS_DSP | DSP |
| 563 | | CS3 | DCS_DRAM | DRAM |
| 564 | | CS4 | CS_ER1 | External output register |
| 565 | +------+----------------+------------------------------------------------------------ |
| 566 | |
| 567 | Interrupts: |
| 568 | |
| 569 | +------+----------------+------------------------------------------------------------ |
| 570 | | # | Name | Comment |
| 571 | +------+----------------+------------------------------------------------------------ |
Mike Williams | 1626308 | 2011-07-22 04:01:30 +0000 | [diff] [blame] | 572 | | IRQ1 | UINTER_3V | S interrupt chips interrupt (common) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 573 | | IRQ3 | IRQ_DSP | DSP interrupt |
| 574 | | IRQ4 | IRQ_DSP1 | Extra DSP interrupt |
| 575 | +------+----------------+------------------------------------------------------------ |
| 576 | |
| 577 | *************************************************************************************************/ |
| 578 | |
| 579 | #define DSP_SIZE 0x00010000 /* 64K */ |
| 580 | #define NAND_SIZE 0x00010000 /* 64K */ |
| 581 | #define ER_SIZE 0x00010000 /* 64K */ |
| 582 | #define DUMMY_SIZE 0x00010000 /* 64K */ |
| 583 | |
| 584 | #define DSP_BASE 0xF1000000 |
| 585 | #define NAND_BASE 0xF1010000 |
| 586 | #define ER_BASE 0xF1020000 |
| 587 | #define DUMMY_BASE 0xF1FF0000 |
| 588 | |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 589 | /*****************************************************************************/ |
| 590 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 591 | #define CONFIG_SYS_DIRECT_FLASH_TFTP |
| 592 | #define CONFIG_SYS_DIRECT_NAND_TFTP |
wdenk | 79fa88f | 2004-06-07 23:46:25 +0000 | [diff] [blame] | 593 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 594 | /*****************************************************************************/ |
| 595 | |
| 596 | #if 1 |
| 597 | /*----------------------------------------------------------------------- |
| 598 | * PCMCIA stuff |
| 599 | *----------------------------------------------------------------------- |
| 600 | */ |
| 601 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 602 | #define CONFIG_SYS_PCMCIA_MEM_ADDR (0xE0000000) |
| 603 | #define CONFIG_SYS_PCMCIA_MEM_SIZE ( 64 << 20 ) |
| 604 | #define CONFIG_SYS_PCMCIA_DMA_ADDR (0xE4000000) |
| 605 | #define CONFIG_SYS_PCMCIA_DMA_SIZE ( 64 << 20 ) |
| 606 | #define CONFIG_SYS_PCMCIA_ATTRB_ADDR (0xE8000000) |
| 607 | #define CONFIG_SYS_PCMCIA_ATTRB_SIZE ( 64 << 20 ) |
| 608 | #define CONFIG_SYS_PCMCIA_IO_ADDR (0xEC000000) |
| 609 | #define CONFIG_SYS_PCMCIA_IO_SIZE ( 64 << 20 ) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 610 | |
| 611 | /*----------------------------------------------------------------------- |
| 612 | * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter) |
| 613 | *----------------------------------------------------------------------- |
| 614 | */ |
| 615 | |
Pavel Herrmann | 8d1165e11a | 2012-10-09 07:01:56 +0000 | [diff] [blame] | 616 | #define CONFIG_IDE_PREINIT 1 /* Use preinit IDE hook */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 617 | #define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */ |
| 618 | |
| 619 | #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ |
| 620 | #undef CONFIG_IDE_LED /* LED for ide not supported */ |
| 621 | #undef CONFIG_IDE_RESET /* reset for ide not supported */ |
| 622 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 623 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ |
| 624 | #define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */ |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 625 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 626 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 627 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 628 | #define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_PCMCIA_MEM_ADDR |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 629 | |
| 630 | /* Offset for data I/O */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 631 | #define CONFIG_SYS_ATA_DATA_OFFSET (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 632 | |
| 633 | /* Offset for normal register accesses */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 634 | #define CONFIG_SYS_ATA_REG_OFFSET (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320) |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 635 | |
| 636 | /* Offset for alternate registers */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 637 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0100 |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 638 | |
| 639 | #define CONFIG_MAC_PARTITION |
| 640 | #define CONFIG_DOS_PARTITION |
| 641 | #endif |
| 642 | |
| 643 | /*************************************************************************************************/ |
| 644 | |
| 645 | #define CONFIG_CDP_DEVICE_ID 20 |
| 646 | #define CONFIG_CDP_DEVICE_ID_PREFIX "NT" /* netta */ |
| 647 | #define CONFIG_CDP_PORT_ID "eth%d" |
| 648 | #define CONFIG_CDP_CAPABILITIES 0x00000010 |
Peter Tyser | 561858e | 2008-11-03 09:30:59 -0600 | [diff] [blame] | 649 | #define CONFIG_CDP_VERSION "u-boot 1.0" " " U_BOOT_DATE " " U_BOOT_TIME |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 650 | #define CONFIG_CDP_PLATFORM "Intracom NetTA" |
| 651 | #define CONFIG_CDP_TRIGGER 0x20020001 |
| 652 | #define CONFIG_CDP_POWER_CONSUMPTION 4300 /* 90 mA @ 48V */ |
| 653 | #define CONFIG_CDP_APPLIANCE_VLAN_TYPE 0x01 /* ipphone? */ |
| 654 | |
| 655 | /*************************************************************************************************/ |
| 656 | |
| 657 | #define CONFIG_AUTO_COMPLETE 1 |
| 658 | |
| 659 | /*************************************************************************************************/ |
| 660 | |
wdenk | c26e454 | 2004-04-18 10:13:26 +0000 | [diff] [blame] | 661 | #define CONFIG_CRC32_VERIFY 1 |
| 662 | |
| 663 | /*************************************************************************************************/ |
| 664 | |
| 665 | #define CONFIG_HUSH_OLD_PARSER_COMPATIBLE 1 |
| 666 | |
| 667 | /*************************************************************************************************/ |
| 668 | |
wdenk | 04a85b3 | 2004-04-15 18:22:41 +0000 | [diff] [blame] | 669 | #endif /* __CONFIG_H */ |