wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * EMK Elektronik GmbH <www.emk-elektronik.de> |
| 4 | * Reinhard Meyer <r.meyer@emk-elektronik.de> |
| 5 | * |
| 6 | * Configuation settings for the TOP860 board. |
| 7 | * |
| 8 | * ----------------------------------------------------------------- |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 9 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 10 | */ |
| 11 | /* |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 12 | * TOP860 is a simple module: |
| 13 | * 16-bit wide FLASH on CS0 (2MB or more) |
| 14 | * 32-bit wide DRAM on CS2 (either 4MB or 16MB) |
| 15 | * FEC with Am79C874 100-Base-T and Fiber Optic |
| 16 | * Ports available, but we choose SMC1 for Console |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 17 | * 8k I2C EEPROM at address 0xae, 6k user available, 2k factory set |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 18 | * 32768Hz crystal PLL set for 49.152MHz Core and 24.576MHz Bus Clock |
| 19 | * |
| 20 | * This config has been copied from MBX.h / MBX860T.h |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 21 | */ |
| 22 | /* |
| 23 | * board/config.h - configuration options, board specific |
| 24 | */ |
| 25 | |
| 26 | #ifndef __CONFIG_H |
| 27 | #define __CONFIG_H |
| 28 | |
| 29 | /* |
| 30 | * High Level Configuration Options |
| 31 | * (easy to change) |
| 32 | */ |
| 33 | |
| 34 | /*----------------------------------------------------------------------- |
| 35 | * CPU and BOARD type |
| 36 | */ |
| 37 | #define CONFIG_MPC860 1 /* This is a MPC860 CPU */ |
| 38 | #define CONFIG_MPC860T 1 /* even better... an FEC! */ |
| 39 | #define CONFIG_TOP860 1 /* ...on a TOP860 module */ |
Wolfgang Denk | 2ae1824 | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 40 | |
| 41 | #define CONFIG_SYS_TEXT_BASE 0x80000000 |
| 42 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 43 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 44 | #define CONFIG_IDENT_STRING " EMK TOP860" |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 45 | |
| 46 | /*----------------------------------------------------------------------- |
| 47 | * CLOCK settings |
| 48 | */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 49 | #define CONFIG_SYSCLK 49152000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 50 | #define CONFIG_SYS_XTAL 32768 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 51 | #define CONFIG_EBDF 1 |
| 52 | #define CONFIG_COM 3 |
| 53 | #define CONFIG_RTC_MPC8xx |
| 54 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 55 | /*----------------------------------------------------------------------- |
| 56 | * Physical memory map as defined by EMK |
| 57 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 58 | #define CONFIG_SYS_IMMR 0xFFF00000 /* Internal Memory Mapped Register */ |
| 59 | #define CONFIG_SYS_FLASH_BASE 0x80000000 /* FLASH in final mapping */ |
| 60 | #define CONFIG_SYS_DRAM_BASE 0x00000000 /* DRAM in final mapping */ |
| 61 | #define CONFIG_SYS_FLASH_MAX 0x00400000 /* max FLASH to expect */ |
| 62 | #define CONFIG_SYS_DRAM_MAX 0x01000000 /* max DRAM to expect */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 63 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 64 | /*----------------------------------------------------------------------- |
| 65 | * derived values |
| 66 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 67 | #define CONFIG_SYS_MF (CONFIG_SYSCLK/CONFIG_SYS_XTAL) |
| 68 | #define CONFIG_SYS_CPUCLOCK CONFIG_SYSCLK |
| 69 | #define CONFIG_SYS_BRGCLOCK CONFIG_SYSCLK |
| 70 | #define CONFIG_SYS_BUSCLOCK (CONFIG_SYSCLK >> CONFIG_EBDF) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 71 | #define CONFIG_8xx_GCLK_FREQ CONFIG_SYSCLK |
| 72 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 73 | /*----------------------------------------------------------------------- |
| 74 | * FLASH organization |
| 75 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 76 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 77 | #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 78 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 79 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 80 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 81 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 82 | #define CONFIG_SYS_FLASH_CFI |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 83 | |
| 84 | /*----------------------------------------------------------------------- |
| 85 | * Command interpreter |
| 86 | */ |
| 87 | #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ |
| 88 | #undef CONFIG_8xx_CONS_SMC2 |
| 89 | #define CONFIG_BAUDRATE 9600 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 90 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 91 | /* |
| 92 | * Allow partial commands to be matched to uniqueness. |
| 93 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 94 | #define CONFIG_SYS_MATCH_PARTIAL_CMD |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 95 | |
Jon Loeliger | a556290 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 96 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 97 | /* |
Jon Loeliger | a556290 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 98 | * Command line configuration. |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 99 | */ |
Jon Loeliger | a556290 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 100 | #include <config_cmd_default.h> |
| 101 | |
| 102 | #define CONFIG_CMD_ASKENV |
| 103 | #define CONFIG_CMD_DHCP |
| 104 | #define CONFIG_CMD_I2C |
| 105 | #define CONFIG_CMD_EEPROM |
| 106 | #define CONFIG_CMD_REGINFO |
| 107 | #define CONFIG_CMD_IMMAP |
| 108 | #define CONFIG_CMD_ELF |
| 109 | #define CONFIG_CMD_DATE |
| 110 | #define CONFIG_CMD_MII |
| 111 | #define CONFIG_CMD_BEDBUG |
| 112 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 113 | |
Wolfgang Denk | 74de7ae | 2009-04-01 23:34:12 +0200 | [diff] [blame] | 114 | #define CONFIG_SOURCE 1 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 115 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 116 | #undef CONFIG_LOADS_ECHO /* NO echo on for serial download */ |
| 117 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 118 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 119 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 120 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 121 | #undef CONFIG_SYS_HUSH_PARSER /* Hush parse for U-Boot */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 122 | |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 123 | |
Jon Loeliger | a556290 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 124 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 125 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 126 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 127 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 128 | #endif |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 129 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 130 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 131 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 132 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 133 | |
| 134 | /*----------------------------------------------------------------------- |
| 135 | * Memory Test Command |
| 136 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 137 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
| 138 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 139 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 140 | /*----------------------------------------------------------------------- |
| 141 | * Environment handler |
| 142 | * only the first 6k in EEPROM are available for user. Of that we use 256b |
| 143 | */ |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 144 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* turn on EEPROM env feature */ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 145 | #define CONFIG_ENV_OFFSET 0x1000 |
| 146 | #define CONFIG_ENV_SIZE 0x0700 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 147 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 |
| 148 | #define CONFIG_SYS_FACT_OFFSET 0x1800 |
| 149 | #define CONFIG_SYS_FACT_SIZE 0x0800 |
| 150 | #define CONFIG_SYS_I2C_FACT_ADDR 0x57 |
| 151 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
| 152 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
| 153 | #define CONFIG_SYS_EEPROM_SIZE 0x2000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 154 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 155 | #define CONFIG_ENV_OVERWRITE |
| 156 | #define CONFIG_MISC_INIT_R |
| 157 | |
Heiko Schocher | ea818db | 2013-01-29 08:53:15 +0100 | [diff] [blame] | 158 | #define CONFIG_SYS_I2C |
| 159 | #define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ |
| 160 | #define CONFIG_SYS_I2C_SOFT_SPEED 100000 |
| 161 | #define CONFIG_SYS_I2C_SOFT_SLAVE 0xFE |
| 162 | /**/ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 163 | #define SDA 0x00010 |
| 164 | #define SCL 0x00020 |
Wolfgang Denk | f57f70a | 2005-10-13 01:45:54 +0200 | [diff] [blame] | 165 | #define __I2C_DIR immr->im_cpm.cp_pbdir |
| 166 | #define __I2C_DAT immr->im_cpm.cp_pbdat |
| 167 | #define __I2C_PAR immr->im_cpm.cp_pbpar |
| 168 | #define __I2C_ODR immr->im_cpm.cp_pbodr |
| 169 | #define I2C_INIT { __I2C_PAR &= ~(SDA|SCL); \ |
| 170 | __I2C_ODR &= ~(SDA|SCL); \ |
| 171 | __I2C_DAT |= (SDA|SCL); \ |
| 172 | __I2C_DIR|=(SDA|SCL); } |
| 173 | #define I2C_READ ((__I2C_DAT & SDA) ? 1 : 0) |
| 174 | #define I2C_SDA(x) { if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; } |
| 175 | #define I2C_SCL(x) { if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; } |
| 176 | #define I2C_DELAY { udelay(5); } |
| 177 | #define I2C_ACTIVE { __I2C_DIR |= SDA; } |
| 178 | #define I2C_TRISTATE { __I2C_DIR &= ~SDA; } |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 179 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 180 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 181 | |
| 182 | /*----------------------------------------------------------------------- |
| 183 | * defines we need to get FEC running |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 184 | */ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 185 | #define CONFIG_FEC_ENET 1 /* Ethernet only via FEC */ |
| 186 | #define FEC_ENET 1 /* eth.c needs it that way... */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 187 | #define CONFIG_SYS_DISCOVER_PHY 1 |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 188 | #define CONFIG_MII 1 |
TsiChung Liew | 0f3ba7e | 2008-03-30 01:22:13 -0500 | [diff] [blame] | 189 | #define CONFIG_MII_INIT 1 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 190 | #define CONFIG_PHY_ADDR 31 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 191 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 192 | /*----------------------------------------------------------------------- |
| 193 | * adresses |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 194 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 195 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
Wolfgang Denk | 14d0a02 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 196 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 197 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 198 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 199 | /*----------------------------------------------------------------------- |
| 200 | * Start addresses for the final memory configuration |
| 201 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 202 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 203 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 204 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 205 | #define CONFIG_SYS_FLASH_BASE 0x80000000 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 206 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 207 | /*----------------------------------------------------------------------- |
| 208 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 209 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 210 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR |
Wolfgang Denk | 553f098 | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 211 | #define CONFIG_SYS_INIT_RAM_SIZE 0x2f00 /* Size of used area in DPRAM */ |
Wolfgang Denk | 25ddd1f | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 212 | #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] | 213 | #define CONFIG_SYS_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */ |
| 214 | #define CONFIG_SYS_INIT_VPD_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE) |
| 215 | #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_VPD_OFFSET-8) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 216 | |
| 217 | /*----------------------------------------------------------------------- |
| 218 | * Cache Configuration |
| 219 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 220 | #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ |
Jon Loeliger | a556290 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 221 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 222 | #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 223 | #endif |
| 224 | |
| 225 | /* Interrupt level assignments. |
| 226 | */ |
| 227 | #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ |
| 228 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 229 | /*----------------------------------------------------------------------- |
| 230 | * Debug Enable Register |
| 231 | *----------------------------------------------------------------------- |
| 232 | * |
| 233 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 234 | #define CONFIG_SYS_DER 0 /* used in start.S */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 235 | |
| 236 | /*----------------------------------------------------------------------- |
| 237 | * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 |
| 238 | *----------------------------------------------------------------------- |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 239 | * set up PLPRCR (PLL, Low-Power, and Reset Control Register) |
| 240 | * 12 MF calculated Multiplication factor |
| 241 | * 4 0 0000 |
| 242 | * 1 SPLSS 0 System PLL lock status sticky |
| 243 | * 1 TEXPS 1 Timer expired status |
| 244 | * 1 0 0 |
| 245 | * 1 TMIST 0 Timers interrupt status |
| 246 | * 1 0 0 |
| 247 | * 1 CSRC 0 Clock source (0=DFNH, 1=DFNL) |
| 248 | * 2 LPM 00 Low-power modes |
| 249 | * 1 CSR 0 Checkstop reset enable |
| 250 | * 1 LOLRE 0 Loss-of-lock reset enable |
| 251 | * 1 FIOPD 0 Force I/O pull down |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 252 | * 5 0 00000 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 253 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 254 | #define CONFIG_SYS_PLPRCR (PLPRCR_TEXPS | ((CONFIG_SYS_MF-1)<<20)) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 255 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 256 | /*----------------------------------------------------------------------- |
| 257 | * SYPCR - System Protection Control 11-9 |
| 258 | * SYPCR can only be written once after reset! |
| 259 | *----------------------------------------------------------------------- |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 260 | * set up SYPCR: |
| 261 | * 16 SWTC 0xffff Software watchdog timer count |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 262 | * 8 BMT 0xff Bus monitor timing |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 263 | * 1 BME 1 Bus monitor enable |
| 264 | * 3 0 000 |
| 265 | * 1 SWF 1 Software watchdog freeze |
| 266 | * 1 SWE 0/1 Software watchdog enable |
| 267 | * 1 SWRI 0/1 Software watchdog reset/interrupt select (1=HRESET) |
| 268 | * 1 SWP 0/1 Software watchdog prescale (1=/2048) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 269 | */ |
| 270 | #if defined (CONFIG_WATCHDOG) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 271 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 272 | SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 273 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 274 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 275 | #endif |
| 276 | |
| 277 | /*----------------------------------------------------------------------- |
| 278 | * SIUMCR - SIU Module Configuration 11-6 |
| 279 | *----------------------------------------------------------------------- |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 280 | * set up SIUMCR |
| 281 | * 1 EARB 0 External arbitration |
| 282 | * 3 EARP 000 External arbitration request priority |
| 283 | * 4 0 0000 |
| 284 | * 1 DSHW 0 Data show cycles |
| 285 | * 2 DBGC 00 Debug pin configuration |
| 286 | * 2 DBPC 00 Debug port pins configuration |
| 287 | * 1 0 0 |
| 288 | * 1 FRC 0 FRZ pin configuration |
| 289 | * 1 DLK 0 Debug register lock |
| 290 | * 1 OPAR 0 Odd parity |
| 291 | * 1 PNCS 0 Parity enable for non memory controller regions |
| 292 | * 1 DPC 0 Data parity pins configuration |
| 293 | * 1 MPRE 0 Multiprocessor reservation enable |
| 294 | * 2 MLRC 11 Multi level reservation control (00=IRQ4, 01=3State, 10=KR/RETRY, 11=SPKROUT) |
| 295 | * 1 AEME 0 Async external master enable |
| 296 | * 1 SEME 0 Sync external master enable |
| 297 | * 1 BSC 0 Byte strobe configuration |
| 298 | * 1 GB5E 0 GPL_B5 enable |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 299 | * 1 B2DD 0 Bank 2 double drive |
| 300 | * 1 B3DD 0 Bank 3 double drive |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 301 | * 4 0 0000 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 302 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 303 | #define CONFIG_SYS_SIUMCR (SIUMCR_MLRC11) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 304 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 305 | /*----------------------------------------------------------------------- |
| 306 | * TBSCR - Time Base Status and Control 11-26 |
| 307 | *----------------------------------------------------------------------- |
| 308 | * Clear Reference Interrupt Status, Timebase freezing enabled |
| 309 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 310 | #define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 311 | |
| 312 | /*----------------------------------------------------------------------- |
| 313 | * PISCR - Periodic Interrupt Status and Control 11-31 |
| 314 | *----------------------------------------------------------------------- |
| 315 | * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled |
| 316 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 317 | #define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE) |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 318 | |
| 319 | /*----------------------------------------------------------------------- |
| 320 | * SCCR - System Clock and reset Control Register 15-27 |
| 321 | *----------------------------------------------------------------------- |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 322 | * set up SCCR (System Clock and Reset Control Register) |
| 323 | * 1 0 0 |
| 324 | * 2 COM 11 Clock output module (00=full, 01=half, 11=off) |
| 325 | * 3 0 000 |
| 326 | * 1 TBS 1 Timebase source (0=OSCCLK, 1=GCLK2) |
| 327 | * 1 RTDIV 0 Real-time clock divide (0=/4, 1=/512) |
| 328 | * 1 RTSEL 0 Real-time clock select (0=OSCM, 1=EXTCLK) |
| 329 | * 1 CRQEN 0 CPM request enable |
| 330 | * 1 PRQEN 0 Power management request enable |
| 331 | * 2 0 00 |
| 332 | * 2 EBDF xx External bus division factor |
| 333 | * 2 0 00 |
| 334 | * 2 DFSYNC 00 Division factor for SYNCLK |
| 335 | * 2 DFBRG 00 Division factor for BRGCLK |
| 336 | * 3 DFNL 000 Division factor low frequency |
| 337 | * 3 DFNH 000 Division factor high frequency |
| 338 | * 5 0 00000 |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 339 | */ |
| 340 | #define SCCR_MASK 0 |
wdenk | 42dfe7a | 2004-03-14 22:25:36 +0000 | [diff] [blame] | 341 | #ifdef CONFIG_EBDF |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 342 | #define CONFIG_SYS_SCCR (SCCR_COM11 | SCCR_TBS | SCCR_EBDF01) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 343 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 344 | #define CONFIG_SYS_SCCR (SCCR_COM11 | SCCR_TBS) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 345 | #endif |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 346 | |
| 347 | /*----------------------------------------------------------------------- |
| 348 | * Chip Select 0 - FLASH |
| 349 | *----------------------------------------------------------------------- |
| 350 | * Preliminary Values |
| 351 | */ |
| 352 | /* FLASH timing: CSNT=1 ACS=10 BIH=1 SCY=4 SETA=0 TLRX=1 EHTR=1 */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 353 | #define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_4_CLK | OR_TRLX | OR_EHTR) |
| 354 | #define CONFIG_SYS_OR0_PRELIM (-CONFIG_SYS_FLASH_MAX | CONFIG_SYS_OR_TIMING_FLASH) |
| 355 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V ) |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 356 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 357 | /*----------------------------------------------------------------------- |
| 358 | * misc |
| 359 | *----------------------------------------------------------------------- |
| 360 | * |
| 361 | */ |
| 362 | /* |
| 363 | * Set the autoboot delay in seconds. A delay of -1 disables autoboot |
| 364 | */ |
| 365 | #define CONFIG_BOOTDELAY 5 |
| 366 | |
| 367 | /* |
| 368 | * Pass the clock frequency to the Linux kernel in units of MHz |
| 369 | */ |
| 370 | #define CONFIG_CLOCKS_IN_MHZ |
| 371 | |
| 372 | #define CONFIG_PREBOOT \ |
| 373 | "echo;echo" |
| 374 | |
| 375 | #undef CONFIG_BOOTARGS |
| 376 | #define CONFIG_BOOTCOMMAND \ |
| 377 | "bootp;" \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 378 | "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ |
| 379 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 380 | "bootm" |
| 381 | |
| 382 | /* |
| 383 | * BOOTP options |
| 384 | */ |
Jon Loeliger | 37d4bb7 | 2007-07-09 21:38:02 -0500 | [diff] [blame] | 385 | #define CONFIG_BOOTP_SUBNETMASK |
| 386 | #define CONFIG_BOOTP_GATEWAY |
| 387 | #define CONFIG_BOOTP_HOSTNAME |
| 388 | #define CONFIG_BOOTP_BOOTPATH |
| 389 | #define CONFIG_BOOTP_BOOTFILESIZE |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 390 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 391 | |
| 392 | /* |
| 393 | * Set default IP stuff just to get bootstrap entries into the |
Wolfgang Denk | 74de7ae | 2009-04-01 23:34:12 +0200 | [diff] [blame] | 394 | * environment so that we can source the full default environment. |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 395 | */ |
| 396 | #define CONFIG_ETHADDR 9a:52:63:15:85:25 |
| 397 | #define CONFIG_SERVERIP 10.0.4.200 |
| 398 | #define CONFIG_IPADDR 10.0.4.111 |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 399 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 400 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ |
wdenk | 945af8d | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 401 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 402 | /* |
| 403 | * For booting Linux, the board info and command line data |
| 404 | * have to be in the first 8 MB of memory, since this is |
| 405 | * the maximum mapped by the Linux kernel during initialization. |
| 406 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 407 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 408 | |
wdenk | db2f721f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 409 | #endif /* __CONFIG_H */ |