]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/ixdp425.h
update/fix IXDP425 / IXDPG425 boards
[karo-tx-uboot.git] / include / configs / ixdp425.h
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
36 #define CONFIG_DISPLAY_CPUINFO  1       /* display cpu info (and speed) */
37 #define CONFIG_DISPLAY_BOARDINFO 1      /* display board info           */
38
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
48 /***************************************************************
49  * U-boot generic defines start here.
50  ***************************************************************/
51
52 /*
53  * Size of malloc() pool
54  */
55 #define CONFIG_SYS_MALLOC_LEN      (CONFIG_ENV_SIZE + 128*1024)
56
57 /* allow to overwrite serial and ethaddr */
58 #define CONFIG_ENV_OVERWRITE
59
60 /*
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
68 /* Command line configuration. */
69 #include <config_cmd_default.h>
70
71 #define CONFIG_CMD_ELF
72
73 #define CONFIG_PCI
74 #ifdef CONFIG_PCI
75 #define CONFIG_CMD_PCI
76 #define CONFIG_PCI_PNP
77 #define CONFIG_IXP_PCI
78 #define CONFIG_PCI_SCAN_SHOW
79 #define CONFIG_CMD_PCI_ENUM
80 #define CONFIG_EEPRO100
81 #endif
82
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
88
89 #if defined(CONFIG_CMD_KGDB)
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
94 /* Miscellaneous configurable options */
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    */
101
102 #define CONFIG_SYS_MEMTEST_START       0x00400000      /* memtest works on     */
103 #define CONFIG_SYS_MEMTEST_END         0x00800000      /* 4 ... 8 MB in DRAM   */
104
105 /* timer clock - 2* OSC_IN system clock */
106 #define CONFIG_IXP425_TIMER_CLK                 66666666
107 #define CONFIG_SYS_HZ                           1000
108
109 /* default load address */
110 #define CONFIG_SYS_LOAD_ADDR                    0x00010000
111
112 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
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 */
120
121 /***************************************************************
122  * Platform/Board specific defines start here.
123  ***************************************************************/
124
125 /*
126  * Hardware drivers
127  */
128
129
130
131 /*
132  * Physical Memory Map
133  */
134 #define CONFIG_SYS_TEXT_BASE    0x50000000
135
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
141 #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   */
144 #define CONFIG_BOARD_SIZE_LIMIT         262144
145
146 /* Expansion bus settings */
147 #define CONFIG_SYS_EXP_CS0      0xbcd23c42
148
149 /* 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
154 #define CONFIG_SYS_SDR_CONFIG           0xd
155 #define CONFIG_SYS_SDR_MODE_CONFIG      0x1
156 #define CONFIG_SYS_SDRAM_REFRESH_CNT    0x81a
157
158 /*
159  * FLASH and environment organization
160  */
161 #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    */
163
164 #define CONFIG_ENV_IS_IN_FLASH  1
165
166 #define CONFIG_SYS_FLASH_BANKS_LIST     { PHYS_FLASH_1 }
167
168 #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)      */
170
171 #define CONFIG_ENV_SECT_SIZE    0x20000 /* size of one complete sector  */
172 #define CONFIG_ENV_ADDR         (PHYS_FLASH_1 + 0x40000)
173 #define CONFIG_ENV_SIZE         0x2000  /* Total Size of Environment Sector     */
174
175 /* 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
271 #endif  /* __CONFIG_H */