blob: d6ef3b3d995fbcf3f47b126c54759e5a96806870 [file] [log] [blame]
wdenk2d5b5612003-10-14 19:43:55 +00001/*
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 Denkba94a1b2006-05-30 15:56:48 +020036#define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info (and speed) */
37#define CONFIG_DISPLAY_BOARDINFO 1 /* display board info */
38
Michael Schwingen973af332011-05-23 00:00:10 +020039/*
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
wdenk2d5b5612003-10-14 19:43:55 +000048/***************************************************************
49 * U-boot generic defines start here.
50 ***************************************************************/
51
wdenk2d5b5612003-10-14 19:43:55 +000052/*
53 * Size of malloc() pool
54 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020055#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
wdenk2d5b5612003-10-14 19:43:55 +000056
57/* allow to overwrite serial and ethaddr */
58#define CONFIG_ENV_OVERWRITE
59
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -050060/*
Jon Loeliger7f5c0152007-07-10 09:38:02 -050061 * 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 Schwingen973af332011-05-23 00:00:10 +020068/* Command line configuration. */
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -050069#include <config_cmd_default.h>
70
71#define CONFIG_CMD_ELF
wdenk2d5b5612003-10-14 19:43:55 +000072
wdenka1191902005-01-09 17:12:27 +000073#define CONFIG_PCI
Michael Schwingen973af332011-05-23 00:00:10 +020074#ifdef CONFIG_PCI
75#define CONFIG_CMD_PCI
76#define CONFIG_PCI_PNP
Jean-Christophe PLAGNIOL-VILLARD8cb79b52009-01-31 08:56:49 +010077#define CONFIG_IXP_PCI
Michael Schwingen973af332011-05-23 00:00:10 +020078#define CONFIG_PCI_SCAN_SHOW
79#define CONFIG_CMD_PCI_ENUM
wdenka1191902005-01-09 17:12:27 +000080#define CONFIG_EEPRO100
Michael Schwingen973af332011-05-23 00:00:10 +020081#endif
wdenk2d5b5612003-10-14 19:43:55 +000082
Michael Schwingen973af332011-05-23 00:00:10 +020083#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
wdenk2d5b5612003-10-14 19:43:55 +000088
Jon Loeliger1d2c6bc2007-07-04 22:32:32 -050089#if defined(CONFIG_CMD_KGDB)
wdenk2d5b5612003-10-14 19:43:55 +000090#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 Schwingen973af332011-05-23 00:00:10 +020094/* Miscellaneous configurable options */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020095#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 */
wdenk2d5b5612003-10-14 19:43:55 +0000101
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200102#define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */
103#define CONFIG_SYS_MEMTEST_END 0x00800000 /* 4 ... 8 MB in DRAM */
wdenk2d5b5612003-10-14 19:43:55 +0000104
Michael Schwingen973af332011-05-23 00:00:10 +0200105/* timer clock - 2* OSC_IN system clock */
106#define CONFIG_IXP425_TIMER_CLK 66666666
107#define CONFIG_SYS_HZ 1000
wdenk2d5b5612003-10-14 19:43:55 +0000108
Michael Schwingen973af332011-05-23 00:00:10 +0200109/* default load address */
110#define CONFIG_SYS_LOAD_ADDR 0x00010000
111
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200112#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
wdenk2d5b5612003-10-14 19:43:55 +0000113
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 */
wdenk2d5b5612003-10-14 19:43:55 +0000120
121/***************************************************************
122 * Platform/Board specific defines start here.
123 ***************************************************************/
124
125/*
126 * Hardware drivers
127 */
128
wdenk2d5b5612003-10-14 19:43:55 +0000129/*
130 * Physical Memory Map
131 */
Michael Schwingen973af332011-05-23 00:00:10 +0200132#define CONFIG_SYS_TEXT_BASE 0x50000000
wdenk2d5b5612003-10-14 19:43:55 +0000133
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-VILLARD6d0f6bc2008-10-16 15:01:15 +0200139#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 Schwingen973af332011-05-23 00:00:10 +0200142#define CONFIG_BOARD_SIZE_LIMIT 262144
wdenk2d5b5612003-10-14 19:43:55 +0000143
Michael Schwingen973af332011-05-23 00:00:10 +0200144/* Expansion bus settings */
145#define CONFIG_SYS_EXP_CS0 0xbcd23c42
wdenk2d5b5612003-10-14 19:43:55 +0000146
Michael Schwingen973af332011-05-23 00:00:10 +0200147/* 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-VILLARD6d0f6bc2008-10-16 15:01:15 +0200152#define CONFIG_SYS_SDR_CONFIG 0xd
153#define CONFIG_SYS_SDR_MODE_CONFIG 0x1
154#define CONFIG_SYS_SDRAM_REFRESH_CNT 0x81a
wdenk2d5b5612003-10-14 19:43:55 +0000155
156/*
Wolfgang Denkba94a1b2006-05-30 15:56:48 +0200157 * FLASH and environment organization
158 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200159#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 */
wdenk2d5b5612003-10-14 19:43:55 +0000161
Jean-Christophe PLAGNIOL-VILLARD5a1aceb2008-09-10 22:48:04 +0200162#define CONFIG_ENV_IS_IN_FLASH 1
wdenk2d5b5612003-10-14 19:43:55 +0000163
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200164#define CONFIG_SYS_FLASH_BANKS_LIST { PHYS_FLASH_1 }
Wolfgang Denkba94a1b2006-05-30 15:56:48 +0200165
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200166#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 Denkba94a1b2006-05-30 15:56:48 +0200168
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200169#define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */
Michael Schwingen973af332011-05-23 00:00:10 +0200170#define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x40000)
Jean-Christophe PLAGNIOL-VILLARD0e8d1582008-09-10 22:48:06 +0200171#define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
wdenk2d5b5612003-10-14 19:43:55 +0000172
Michael Schwingen973af332011-05-23 00:00:10 +0200173/* 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 Schwingen973af332011-05-23 00:00:10 +0200248/*
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
wdenk2d5b5612003-10-14 19:43:55 +0000268#endif /* __CONFIG_H */