blob: 4bad31dfedd34e992a059f18554c7e3b946328fd [file] [log] [blame]
wdenkbd1575f2003-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 Denk4646d2a2006-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 Schwingen892df4e2011-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
wdenkbd1575f2003-10-14 19:43:55 +000048/***************************************************************
49 * U-boot generic defines start here.
50 ***************************************************************/
51
wdenkbd1575f2003-10-14 19:43:55 +000052/*
53 * Size of malloc() pool
54 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020055#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
wdenkbd1575f2003-10-14 19:43:55 +000056
57/* allow to overwrite serial and ethaddr */
58#define CONFIG_ENV_OVERWRITE
59
Jon Loeliger860435b2007-07-04 22:32:32 -050060/*
Jon Loeliger140b69c2007-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 Schwingen892df4e2011-05-23 00:00:10 +020068/* Command line configuration. */
Jon Loeliger860435b2007-07-04 22:32:32 -050069#include <config_cmd_default.h>
70
71#define CONFIG_CMD_ELF
wdenkbd1575f2003-10-14 19:43:55 +000072
wdenk26c58432005-01-09 17:12:27 +000073#define CONFIG_PCI
Michael Schwingen892df4e2011-05-23 00:00:10 +020074#ifdef CONFIG_PCI
75#define CONFIG_CMD_PCI
76#define CONFIG_PCI_PNP
Jean-Christophe PLAGNIOL-VILLARD24953612009-01-31 08:56:49 +010077#define CONFIG_IXP_PCI
Michael Schwingen892df4e2011-05-23 00:00:10 +020078#define CONFIG_PCI_SCAN_SHOW
79#define CONFIG_CMD_PCI_ENUM
wdenk26c58432005-01-09 17:12:27 +000080#define CONFIG_EEPRO100
Michael Schwingen892df4e2011-05-23 00:00:10 +020081#endif
wdenkbd1575f2003-10-14 19:43:55 +000082
Michael Schwingen892df4e2011-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
wdenkbd1575f2003-10-14 19:43:55 +000088
Jon Loeliger860435b2007-07-04 22:32:32 -050089#if defined(CONFIG_CMD_KGDB)
wdenkbd1575f2003-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 Schwingen892df4e2011-05-23 00:00:10 +020094/* Miscellaneous configurable options */
Jean-Christophe PLAGNIOL-VILLARD03836942008-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 */
wdenkbd1575f2003-10-14 19:43:55 +0000101
Jean-Christophe PLAGNIOL-VILLARD03836942008-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 */
wdenkbd1575f2003-10-14 19:43:55 +0000104
Michael Schwingen892df4e2011-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
wdenkbd1575f2003-10-14 19:43:55 +0000108
Michael Schwingen892df4e2011-05-23 00:00:10 +0200109/* default load address */
110#define CONFIG_SYS_LOAD_ADDR 0x00010000
111
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200112#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
wdenkbd1575f2003-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 */
wdenkbd1575f2003-10-14 19:43:55 +0000120
121/***************************************************************
122 * Platform/Board specific defines start here.
123 ***************************************************************/
124
125/*
126 * Hardware drivers
127 */
128
129
wdenkbd1575f2003-10-14 19:43:55 +0000130
131/*
132 * Physical Memory Map
133 */
Michael Schwingen892df4e2011-05-23 00:00:10 +0200134#define CONFIG_SYS_TEXT_BASE 0x50000000
wdenkbd1575f2003-10-14 19:43:55 +0000135
136#define PHYS_FLASH_1 0x50000000 /* Flash Bank #1 */
137#define PHYS_FLASH_SIZE 0x00800000 /* 8 MB */
138#define PHYS_FLASH_BANK_SIZE 0x00800000 /* 8 MB Banks */
139#define PHYS_FLASH_SECT_SIZE 0x00020000 /* 128 KB sectors (x1) */
140
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200141#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
142#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
143#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
Michael Schwingen892df4e2011-05-23 00:00:10 +0200144#define CONFIG_BOARD_SIZE_LIMIT 262144
wdenkbd1575f2003-10-14 19:43:55 +0000145
Michael Schwingen892df4e2011-05-23 00:00:10 +0200146/* Expansion bus settings */
147#define CONFIG_SYS_EXP_CS0 0xbcd23c42
wdenkbd1575f2003-10-14 19:43:55 +0000148
Michael Schwingen892df4e2011-05-23 00:00:10 +0200149/* SDRAM settings */
150#define CONFIG_NR_DRAM_BANKS 1 /* we have 2 banks of DRAM */
151#define PHYS_SDRAM_1 0x00000000 /* SDRAM Bank #1 */
152#define CONFIG_SYS_SDRAM_BASE 0x00000000
153
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200154#define CONFIG_SYS_SDR_CONFIG 0xd
155#define CONFIG_SYS_SDR_MODE_CONFIG 0x1
156#define CONFIG_SYS_SDRAM_REFRESH_CNT 0x81a
wdenkbd1575f2003-10-14 19:43:55 +0000157
158/*
wdenkbd1575f2003-10-14 19:43:55 +0000159 * FLASH and environment organization
160 */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200161#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
162#define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
wdenkbd1575f2003-10-14 19:43:55 +0000163
Jean-Christophe PLAGNIOL-VILLARD53db4cd2008-09-10 22:48:04 +0200164#define CONFIG_ENV_IS_IN_FLASH 1
Wolfgang Denk4646d2a2006-05-30 15:56:48 +0200165
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200166#define CONFIG_SYS_FLASH_BANKS_LIST { PHYS_FLASH_1 }
Wolfgang Denk4646d2a2006-05-30 15:56:48 +0200167
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +0200168#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
169#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
Wolfgang Denk4646d2a2006-05-30 15:56:48 +0200170
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200171#define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */
Michael Schwingen892df4e2011-05-23 00:00:10 +0200172#define CONFIG_ENV_ADDR (PHYS_FLASH_1 + 0x40000)
Jean-Christophe PLAGNIOL-VILLARD7e1cda62008-09-10 22:48:06 +0200173#define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
wdenkbd1575f2003-10-14 19:43:55 +0000174
Michael Schwingen892df4e2011-05-23 00:00:10 +0200175/* Use common CFI driver */
176#define CONFIG_SYS_FLASH_CFI
177#define CONFIG_FLASH_CFI_DRIVER
178/* no byte writes on IXP4xx */
179#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
180/* print 'E' for empty sector on flinfo */
181#define CONFIG_SYS_FLASH_EMPTY_INFO
182
183/* Ethernet */
184
185/* include IXP4xx NPE support */
186#define CONFIG_IXP4XX_NPE 1
187#define CONFIG_NET_MULTI 1
188/* NPE0 PHY address */
189#define CONFIG_PHY_ADDR 0
190/* NPE1 PHY address (HW Release E only) */
191#define CONFIG_PHY1_ADDR 1
192/* MII PHY management */
193#define CONFIG_MII 1
194/* Number of ethernet rx buffers & descriptors */
195#define CONFIG_SYS_RX_ETH_BUFFER 16
196
197#define CONFIG_HAS_ETH1 1
198
199#define CONFIG_CMD_DHCP
200#define CONFIG_CMD_NET
201#define CONFIG_CMD_MII
202#define CONFIG_CMD_PING
203#undef CONFIG_CMD_NFS
204
205/* Cache Configuration */
206#define CONFIG_SYS_CACHELINE_SIZE 32
207
208#define CONFIG_EXTRA_ENV_SETTINGS \
209 "npe_ucode=50060000\0" \
210 "mtd=IXP4XX-Flash.0:256k(uboot),128k(env),128k(ucode),2048k(linux),-(root)\0" \
211 "kerneladdr=50080000\0" \
212 "kernelfile=ixdp425/uImage\0" \
213 "rootfile=ixdp425/rootfs\0" \
214 "rootaddr=50280000\0" \
215 "loadaddr=10000\0" \
216 "updateboot_ser=mw.b 10000 ff 40000;" \
217 " loady ${loadaddr};" \
218 " run eraseboot writeboot\0" \
219 "updateboot_net=mw.b 10000 ff 40000;" \
220 " tftp ${loadaddr} ixdp425/u-boot.bin;" \
221 " run eraseboot writeboot\0" \
222 "eraseboot=protect off 50000000 5003ffff;" \
223 " erase 50000000 5003ffff\0" \
224 "writeboot=cp.b 10000 50000000 ${filesize}\0" \
225 "updateucode=loady;" \
226 " era ${npe_ucode} +${filesize};" \
227 " cp.b ${loadaddr} ${npe_ucode} ${filesize}\0" \
228 "updateroot=tftp ${loadaddr} ${rootfile};" \
229 " era ${rootaddr} +${filesize};" \
230 " cp.b ${loadaddr} ${rootaddr} ${filesize}\0" \
231 "updatekern=tftp ${loadaddr} ${kernelfile};" \
232 " era ${kerneladdr} +${filesize};" \
233 " cp.b ${loadaddr} ${kerneladdr} ${filesize}\0" \
234 "flashargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \
235 " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
236 "netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock4" \
237 " rootfstype=squashfs,jffs2 init=/etc/preinit\0" \
238 "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \
239 "addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0" \
240 "boot_flash=run flashargs addtty addeth;" \
241 " bootm ${kerneladdr}\0" \
242 "boot_net=run netargs addtty addeth;" \
243 " tftpboot ${loadaddr} ${kernelfile};" \
244 " bootm\0"
245
246/* additions for new relocation code, must be added to all boards */
247#define CONFIG_SYS_INIT_SP_ADDR \
248 (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
249
250
251/*
252 * GPIO settings
253 */
254#define CONFIG_SYS_GPIO_UTOPIA_GPIO1 0
255#define CONFIG_SYS_GPIO_UTOPIA_IRQ_N 1
256#define CONFIG_SYS_GPIO_HSS1_IRQ_N 2
257#define CONFIG_SYS_GPIO_HSS0_IRQ_N 3
258#define CONFIG_SYS_GPIO_ETH0_IRQ_N 4
259#define CONFIG_SYS_GPIO_ETH1_IRQ_N 5
260#define CONFIG_SYS_GPIO_I2C_SCL 6
261#define CONFIG_SYS_GPIO_I2C_SDA 7
262#define CONFIG_SYS_GPIO_PCI_INTD_N 8
263#define CONFIG_SYS_GPIO_PCI_INTC_N 9
264#define CONFIG_SYS_GPIO_PCI_INTB_N 10
265#define CONFIG_SYS_GPIO_PCI_INTA_N 11
266#define CONFIG_SYS_GPIO_UTOPIA_GPIO0 12
267#define CONFIG_SYS_GPIO_PCI_RESET_N 13
268#define CONFIG_SYS_GPIO_PCI_CLK 14
269#define CONFIG_SYS_GPIO_EXTBUS_CLK 15
270
wdenkbd1575f2003-10-14 19:43:55 +0000271#endif /* __CONFIG_H */