wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net |
| 4 | * |
| 5 | * Configuation settings for the IXDP425 board. |
| 6 | * |
| 7 | * See file CREDITS for list of people who contributed to this |
| 8 | * project. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License as |
| 12 | * published by the Free Software Foundation; either version 2 of |
| 13 | * the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with this program; if not, write to the Free Software |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 23 | * MA 02111-1307 USA |
| 24 | */ |
| 25 | |
| 26 | #ifndef __CONFIG_H |
| 27 | #define __CONFIG_H |
| 28 | |
| 29 | /* |
| 30 | * High Level Configuration Options |
| 31 | * (easy to change) |
| 32 | */ |
| 33 | #define CONFIG_IXP425 1 /* This is an IXP425 CPU */ |
| 34 | #define CONFIG_IXDP425 1 /* on an IXDP425 Board */ |
| 35 | |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 36 | #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info (and speed) */ |
| 37 | #define CONFIG_DISPLAY_BOARDINFO 1 /* display board info */ |
| 38 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 39 | /* |
| 40 | * select serial console configuration |
| 41 | */ |
| 42 | #define CONFIG_IXP_SERIAL |
| 43 | #define CONFIG_SYS_IXP425_CONSOLE IXP425_UART1 |
| 44 | #define CONFIG_BAUDRATE 115200 |
| 45 | |
| 46 | #define CONFIG_BOARD_EARLY_INIT_F 1 |
| 47 | |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 48 | /*************************************************************** |
| 49 | * U-boot generic defines start here. |
| 50 | ***************************************************************/ |
| 51 | |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 52 | /* |
| 53 | * Size of malloc() pool |
| 54 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 55 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 56 | |
| 57 | /* allow to overwrite serial and ethaddr */ |
| 58 | #define CONFIG_ENV_OVERWRITE |
| 59 | |
Jon Loeliger | 1d2c6bc | 2007-07-04 22:32:32 -0500 | [diff] [blame] | 60 | /* |
Jon Loeliger | 7f5c015 | 2007-07-10 09:38:02 -0500 | [diff] [blame] | 61 | * BOOTP options |
| 62 | */ |
| 63 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 64 | #define CONFIG_BOOTP_BOOTPATH |
| 65 | #define CONFIG_BOOTP_GATEWAY |
| 66 | #define CONFIG_BOOTP_HOSTNAME |
| 67 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 68 | /* Command line configuration. */ |
Jon Loeliger | 1d2c6bc | 2007-07-04 22:32:32 -0500 | [diff] [blame] | 69 | #include <config_cmd_default.h> |
| 70 | |
| 71 | #define CONFIG_CMD_ELF |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 72 | |
wdenk | a119190 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 73 | #define CONFIG_PCI |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 74 | #ifdef CONFIG_PCI |
| 75 | #define CONFIG_CMD_PCI |
| 76 | #define CONFIG_PCI_PNP |
Jean-Christophe PLAGNIOL-VILLARD | 8cb79b5 | 2009-01-31 08:56:49 +0100 | [diff] [blame] | 77 | #define CONFIG_IXP_PCI |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 78 | #define CONFIG_PCI_SCAN_SHOW |
| 79 | #define CONFIG_CMD_PCI_ENUM |
wdenk | a119190 | 2005-01-09 17:12:27 +0000 | [diff] [blame] | 80 | #define CONFIG_EEPRO100 |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 81 | #endif |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 82 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 83 | #define CONFIG_BOOTCOMMAND "run boot_flash" |
| 84 | /* enable passing of ATAGs */ |
| 85 | #define CONFIG_CMDLINE_TAG 1 |
| 86 | #define CONFIG_SETUP_MEMORY_TAGS 1 |
| 87 | #define CONFIG_INITRD_TAG 1 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 88 | |
Jon Loeliger | 1d2c6bc | 2007-07-04 22:32:32 -0500 | [diff] [blame] | 89 | #if defined(CONFIG_CMD_KGDB) |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 90 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
| 91 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
| 92 | #endif |
| 93 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 94 | /* Miscellaneous configurable options */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 95 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 96 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
| 97 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 98 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 99 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 100 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 101 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 102 | #define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ |
| 103 | #define CONFIG_SYS_MEMTEST_END 0x00800000 /* 4 ... 8 MB in DRAM */ |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 104 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 105 | /* timer clock - 2* OSC_IN system clock */ |
| 106 | #define CONFIG_IXP425_TIMER_CLK 66666666 |
| 107 | #define CONFIG_SYS_HZ 1000 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 108 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 109 | /* default load address */ |
| 110 | #define CONFIG_SYS_LOAD_ADDR 0x00010000 |
| 111 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 112 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 113 | |
| 114 | /* |
| 115 | * Stack sizes |
| 116 | * |
| 117 | * The stack sizes are set up in start.S using the settings below |
| 118 | */ |
| 119 | #define CONFIG_STACKSIZE (128*1024) /* regular stack */ |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 120 | |
| 121 | /*************************************************************** |
| 122 | * Platform/Board specific defines start here. |
| 123 | ***************************************************************/ |
| 124 | |
| 125 | /* |
| 126 | * Hardware drivers |
| 127 | */ |
| 128 | |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 129 | /* |
| 130 | * Physical Memory Map |
| 131 | */ |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 132 | #define CONFIG_SYS_TEXT_BASE 0x50000000 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 133 | |
| 134 | #define PHYS_FLASH_1 0x50000000 /* Flash Bank #1 */ |
| 135 | #define PHYS_FLASH_SIZE 0x00800000 /* 8 MB */ |
| 136 | #define PHYS_FLASH_BANK_SIZE 0x00800000 /* 8 MB Banks */ |
| 137 | #define PHYS_FLASH_SECT_SIZE 0x00020000 /* 128 KB sectors (x1) */ |
| 138 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 139 | #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 |
| 140 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 141 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 142 | #define CONFIG_BOARD_SIZE_LIMIT 262144 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 143 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 144 | /* Expansion bus settings */ |
| 145 | #define CONFIG_SYS_EXP_CS0 0xbcd23c42 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 146 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 147 | /* SDRAM settings */ |
| 148 | #define CONFIG_NR_DRAM_BANKS 1 /* we have 2 banks of DRAM */ |
| 149 | #define PHYS_SDRAM_1 0x00000000 /* SDRAM Bank #1 */ |
| 150 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 151 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 152 | #define CONFIG_SYS_SDR_CONFIG 0xd |
| 153 | #define CONFIG_SYS_SDR_MODE_CONFIG 0x1 |
| 154 | #define CONFIG_SYS_SDRAM_REFRESH_CNT 0x81a |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 155 | |
| 156 | /* |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 157 | * FLASH and environment organization |
| 158 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 159 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 160 | #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 161 | |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 162 | #define CONFIG_ENV_IS_IN_FLASH 1 |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 163 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 164 | #define CONFIG_SYS_FLASH_BANKS_LIST { PHYS_FLASH_1 } |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 165 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 166 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 167 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
Wolfgang Denk | ba94a1b | 2006-05-30 15:56:48 +0200 | [diff] [blame] | 168 | |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 169 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 170 | #define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 171 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 172 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 173 | /* Use common CFI driver */ |
| 174 | #define CONFIG_SYS_FLASH_CFI |
| 175 | #define CONFIG_FLASH_CFI_DRIVER |
| 176 | /* no byte writes on IXP4xx */ |
| 177 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
| 178 | /* print 'E' for empty sector on flinfo */ |
| 179 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
| 180 | |
| 181 | /* Ethernet */ |
| 182 | |
| 183 | /* include IXP4xx NPE support */ |
| 184 | #define CONFIG_IXP4XX_NPE 1 |
| 185 | #define CONFIG_NET_MULTI 1 |
| 186 | /* NPE0 PHY address */ |
| 187 | #define CONFIG_PHY_ADDR 0 |
| 188 | /* NPE1 PHY address (HW Release E only) */ |
| 189 | #define CONFIG_PHY1_ADDR 1 |
| 190 | /* MII PHY management */ |
| 191 | #define CONFIG_MII 1 |
| 192 | /* Number of ethernet rx buffers & descriptors */ |
| 193 | #define CONFIG_SYS_RX_ETH_BUFFER 16 |
| 194 | |
| 195 | #define CONFIG_HAS_ETH1 1 |
| 196 | |
| 197 | #define CONFIG_CMD_DHCP |
| 198 | #define CONFIG_CMD_NET |
| 199 | #define CONFIG_CMD_MII |
| 200 | #define CONFIG_CMD_PING |
| 201 | #undef CONFIG_CMD_NFS |
| 202 | |
| 203 | /* Cache Configuration */ |
| 204 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
| 205 | |
| 206 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 207 | "npe_ucode=50060000\0" \ |
| 208 | "mtd=IXP4XX-Flash.0:256k(uboot),128k(env),128k(ucode),2048k(linux),-(root)\0" \ |
| 209 | "kerneladdr=50080000\0" \ |
| 210 | "kernelfile=ixdp425/uImage\0" \ |
| 211 | "rootfile=ixdp425/rootfs\0" \ |
| 212 | "rootaddr=50280000\0" \ |
| 213 | "loadaddr=10000\0" \ |
| 214 | "updateboot_ser=mw.b 10000 ff 40000;" \ |
| 215 | " loady ${loadaddr};" \ |
| 216 | " run eraseboot writeboot\0" \ |
| 217 | "updateboot_net=mw.b 10000 ff 40000;" \ |
| 218 | " tftp ${loadaddr} ixdp425/u-boot.bin;" \ |
| 219 | " run eraseboot writeboot\0" \ |
| 220 | "eraseboot=protect off 50000000 5003ffff;" \ |
| 221 | " erase 50000000 5003ffff\0" \ |
| 222 | "writeboot=cp.b 10000 50000000 ${filesize}\0" \ |
| 223 | "updateucode=loady;" \ |
| 224 | " era ${npe_ucode} +${filesize};" \ |
| 225 | " cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \ |
| 226 | "updateroot=tftp ${loadaddr} ${rootfile};" \ |
| 227 | " era ${rootaddr} +${filesize};" \ |
| 228 | " cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \ |
| 229 | "updatekern=tftp ${loadaddr} ${kernelfile};" \ |
| 230 | " era ${kerneladdr} +${filesize};" \ |
| 231 | " cp.b ${loadaddr} ${kerneladdr} ${filesize}\0" \ |
| 232 | "flashargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \ |
| 233 | " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \ |
| 234 | "netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \ |
| 235 | " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \ |
| 236 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ |
| 237 | "addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0" \ |
| 238 | "boot_flash=run flashargs addtty addeth;" \ |
| 239 | " bootm ${kerneladdr}\0" \ |
| 240 | "boot_net=run netargs addtty addeth;" \ |
| 241 | " tftpboot ${loadaddr} ${kernelfile};" \ |
| 242 | " bootm\0" |
| 243 | |
| 244 | /* additions for new relocation code, must be added to all boards */ |
| 245 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 246 | (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) |
| 247 | |
Michael Schwingen | 973af33 | 2011-05-23 00:00:10 +0200 | [diff] [blame] | 248 | /* |
| 249 | * GPIO settings |
| 250 | */ |
| 251 | #define CONFIG_SYS_GPIO_UTOPIA_GPIO1 0 |
| 252 | #define CONFIG_SYS_GPIO_UTOPIA_IRQ_N 1 |
| 253 | #define CONFIG_SYS_GPIO_HSS1_IRQ_N 2 |
| 254 | #define CONFIG_SYS_GPIO_HSS0_IRQ_N 3 |
| 255 | #define CONFIG_SYS_GPIO_ETH0_IRQ_N 4 |
| 256 | #define CONFIG_SYS_GPIO_ETH1_IRQ_N 5 |
| 257 | #define CONFIG_SYS_GPIO_I2C_SCL 6 |
| 258 | #define CONFIG_SYS_GPIO_I2C_SDA 7 |
| 259 | #define CONFIG_SYS_GPIO_PCI_INTD_N 8 |
| 260 | #define CONFIG_SYS_GPIO_PCI_INTC_N 9 |
| 261 | #define CONFIG_SYS_GPIO_PCI_INTB_N 10 |
| 262 | #define CONFIG_SYS_GPIO_PCI_INTA_N 11 |
| 263 | #define CONFIG_SYS_GPIO_UTOPIA_GPIO0 12 |
| 264 | #define CONFIG_SYS_GPIO_PCI_RESET_N 13 |
| 265 | #define CONFIG_SYS_GPIO_PCI_CLK 14 |
| 266 | #define CONFIG_SYS_GPIO_EXTBUS_CLK 15 |
| 267 | |
wdenk | 2d5b561 | 2003-10-14 19:43:55 +0000 | [diff] [blame] | 268 | #endif /* __CONFIG_H */ |