blob: 5d6419fe1f2e73766c558e7626bd548eef352e15 [file] [log] [blame]
wdenkd9fd6ff2002-10-11 08:43:32 +00001/*
2 * (C) Copyright 2002
3 * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
4 *
5 * (C) Copyright 2002
6 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Marius Groeger <mgroeger@sysgo.de>
8 *
9 * See file CREDITS for list of people who contributed to this
10 * project.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA
26 */
27
28#ifndef __CONFIG_H
29#define __CONFIG_H
30
31/*
wdenkd9fd6ff2002-10-11 08:43:32 +000032 * High Level Configuration Options
33 * (easy to change)
34 */
35#define CONFIG_PXA250 1 /* This is an PXA250 CPU */
36#define CONFIG_HHP_CRADLE 1 /* on an Cradle Board */
37
38#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
39
40/*
41 * Size of malloc() pool
42 */
wdenk699b13a2002-11-03 18:03:52 +000043#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
wdenkc0aa5c52003-12-06 19:49:23 +000044#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
wdenkd9fd6ff2002-10-11 08:43:32 +000045
46/*
47 * Hardware drivers
48 */
49#define CONFIG_DRIVER_SMC91111
50#define CONFIG_SMC91111_BASE 0x10000300
51#define CONFIG_SMC91111_EXT_PHY
52#define CONFIG_SMC_USE_32_BIT
53
54/*
55 * select serial console configuration
56 */
57#define CONFIG_FFUART 1 /* we use FFUART on LUBBOCK */
58
59/* allow to overwrite serial and ethaddr */
60#define CONFIG_ENV_OVERWRITE
61
62#define CONFIG_BAUDRATE 115200
63
Jon Loeliger37ec35e2007-07-04 22:31:56 -050064
65/*
66 * Command line configuration.
67 */
68#include <config_cmd_default.h>
wdenkd9fd6ff2002-10-11 08:43:32 +000069
wdenkd9fd6ff2002-10-11 08:43:32 +000070
71#define CONFIG_BOOTDELAY 3
72#define CONFIG_BOOTARGS "root=/dev/mtdblock2 console=ttyS0,115200"
73#define CONFIG_ETHADDR 08:00:3e:26:0a:5b
74#define CONFIG_NETMASK 255.255.0.0
75#define CONFIG_IPADDR 192.168.0.21
76#define CONFIG_SERVERIP 192.168.0.250
77#define CONFIG_BOOTCOMMAND "bootm 40000"
78#define CONFIG_CMDLINE_TAG
79
80/*
81 * Miscellaneous configurable options
82 */
83#define CFG_LONGHELP /* undef to save memory */
84#define CFG_PROMPT "=> " /* Monitor Command Prompt */
85#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
86#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
87#define CFG_MAXARGS 16 /* max number of command args */
88#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
89
90#define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
91#define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
92
93#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
94
95#define CFG_LOAD_ADDR 0xa2000000 /* default load address */
96
97#define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
98#define CFG_CPUSPEED 0x141 /* set core clock to 200/200/100 MHz */
99
wdenk57b2d802003-06-27 21:31:46 +0000100 /* valid baudrates */
wdenkd9fd6ff2002-10-11 08:43:32 +0000101#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
102
103/*
104 * Stack sizes
105 *
106 * The stack sizes are set up in start.S using the settings below
107 */
108#define CONFIG_STACKSIZE (128*1024) /* regular stack */
109#ifdef CONFIG_USE_IRQ
110#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
111#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
112#endif
113
114/*
115 * Physical Memory Map
116 */
117#define CONFIG_NR_DRAM_BANKS 4 /* we have 2 banks of DRAM */
118#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
119#define PHYS_SDRAM_1_SIZE 0x01000000 /* 64 MB */
120#define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
121#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
122#define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
123#define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
124#define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
125#define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
126
127#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
128#define PHYS_FLASH_2 0x04000000 /* Flash Bank #1 */
129#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */
130
131#define CFG_DRAM_BASE 0xa0000000
132#define CFG_DRAM_SIZE 0x04000000
133
134#define CFG_FLASH_BASE PHYS_FLASH_1
135
136/*
137 * FLASH and environment organization
138 */
139#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
140#define CFG_MAX_FLASH_SECT 32 /* max number of sectors on one chip */
141
142/* timeout values are in ticks */
143#define CFG_FLASH_ERASE_TOUT (2*CFG_HZ) /* Timeout for Flash Erase */
144#define CFG_FLASH_WRITE_TOUT (2*CFG_HZ) /* Timeout for Flash Write */
145
146#define CFG_ENV_IS_IN_FLASH 1
147#define CFG_ENV_ADDR 0x00020000 /* absolute address for now */
148#define CFG_ENV_SIZE 0x20000 /* 8K ouch, this may later be */
149
150/******************************************************************************
151 *
152 * CPU specific defines
153 *
154 ******************************************************************************/
155
156/*
157 * GPIO settings
158 *
159 * GPIO pin assignments
160 * GPIO Name Dir Out AF
161 * 0 NC
162 * 1 NC
163 * 2 SIRQ1 I
164 * 3 SIRQ2 I
165 * 4 SIRQ3 I
166 * 5 DMAACK1 O 0
167 * 6 DMAACK2 O 0
168 * 7 DMAACK3 O 0
169 * 8 TC1 O 0
170 * 9 TC2 O 0
171 * 10 TC3 O 0
172 * 11 nDMAEN O 1
173 * 12 AENCTRL O 0
174 * 13 PLDTC O 0
175 * 14 ETHIRQ I
176 * 15 NC
177 * 16 NC
178 * 17 NC
179 * 18 RDY I
180 * 19 DMASIO I
181 * 20 ETHIRQ NC
182 * 21 NC
183 * 22 PGMEN O 1 FIXME for debug only enable flash
184 * 23 NC
185 * 24 NC
186 * 25 NC
187 * 26 NC
188 * 27 NC
189 * 28 NC
190 * 29 NC
191 * 30 NC
192 * 31 NC
193 * 32 NC
194 * 33 NC
195 * 34 FFRXD I 01
196 * 35 FFCTS I 01
197 * 36 FFDCD I 01
198 * 37 FFDSR I 01
199 * 38 FFRI I 01
200 * 39 FFTXD O 1 10
201 * 40 FFDTR O 0 10
202 * 41 FFRTS O 0 10
203 * 42 RS232FOFF O 0 00
204 * 43 NC
205 * 44 NC
206 * 45 IRSL0 O 0
207 * 46 IRRX0 I 01
208 * 47 IRTX0 O 0 10
209 * 48 NC
210 * 49 nIOWE O 0
211 * 50 NC
212 * 51 NC
213 * 52 NC
214 * 53 NC
215 * 54 NC
216 * 55 NC
217 * 56 NC
218 * 57 NC
219 * 58 DKDIRQ I
220 * 59 NC
221 * 60 NC
222 * 61 NC
223 * 62 NC
224 * 63 NC
225 * 64 COMLED O 0
226 * 65 COMLED O 0
227 * 66 COMLED O 0
228 * 67 COMLED O 0
229 * 68 COMLED O 0
230 * 69 COMLED O 0
231 * 70 COMLED O 0
232 * 71 COMLED O 0
233 * 72 NC
234 * 73 NC
235 * 74 NC
236 * 75 NC
237 * 76 NC
238 * 77 NC
239 * 78 CSIO O 1
240 * 79 NC
241 * 80 CSETH O 1
242 *
243 * NOTE: All NC's are defined to be outputs
244 *
245 */
246/* Pin direction control */
247/* NOTE GPIO 0, 61, 62 are set for inputs due to CPLD SPAREs */
248#define CFG_GPDR0_VAL 0xfff3bf02
249#define CFG_GPDR1_VAL 0xfbffbf83
250#define CFG_GPDR2_VAL 0x0001ffff
251/* Set and Clear registers */
252#define CFG_GPSR0_VAL 0x00400800
253#define CFG_GPSR1_VAL 0x00000480
254#define CFG_GPSR2_VAL 0x00014000
255#define CFG_GPCR0_VAL 0x00000000
256#define CFG_GPCR1_VAL 0x00000000
257#define CFG_GPCR2_VAL 0x00000000
258/* Edge detect registers (these are set by the kernel) */
259#define CFG_GRER0_VAL 0x00000000
260#define CFG_GRER1_VAL 0x00000000
261#define CFG_GRER2_VAL 0x00000000
262#define CFG_GFER0_VAL 0x00000000
263#define CFG_GFER1_VAL 0x00000000
264#define CFG_GFER2_VAL 0x00000000
265/* Alternate function registers */
266#define CFG_GAFR0_L_VAL 0x00000000
267#define CFG_GAFR0_U_VAL 0x00000010
268#define CFG_GAFR1_L_VAL 0x900a9550
269#define CFG_GAFR1_U_VAL 0x00000008
270#define CFG_GAFR2_L_VAL 0x20000000
271#define CFG_GAFR2_U_VAL 0x00000002
272
273/*
274 * Clocks, power control and interrupts
275 */
276#define CFG_PSSR_VAL 0x00000020
277#define CFG_CCCR_VAL 0x00000141 /* 100 MHz memory, 200 MHz CPU */
278#define CFG_CKEN_VAL 0x00000060 /* FFUART and STUART enabled */
279#define CFG_ICMR_VAL 0x00000000 /* No interrupts enabled */
280
281/* FIXME
282 *
283 * RTC settings
284 * Watchdog
285 *
286 */
287
288/*
289 * Memory settings
290 *
291 * FIXME Can ethernet be burst read and/or write?? This is set for lubbock
292 * Verify timings on all
293 */
294#define CFG_MSC0_VAL 0x000023FA /* flash bank (cs0) */
295/*#define CFG_MSC1_VAL 0x00003549 / * SuperIO bank (cs2) */
296#define CFG_MSC1_VAL 0x0000354c /* SuperIO bank (cs2) */
297#define CFG_MSC2_VAL 0x00001224 /* Ethernet bank (cs4) */
298#ifdef REDBOOT_WAY
299#define CFG_MDCNFG_VAL 0x00001aa1 /* FIXME can DTC be 01? */
300#define CFG_MDMRS_VAL 0x00000000
301#define CFG_MDREFR_VAL 0x00018018
302#else
303#define CFG_MDCNFG_VAL 0x00001aa1 /* FIXME can DTC be 01? */
304#define CFG_MDMRS_VAL 0x00000000
wdenk336b2bc2005-04-02 23:52:25 +0000305#define CFG_MDREFR_VAL 0x00403018 /* Initial setting, individual bits set in lowlevel_init.S */
wdenkd9fd6ff2002-10-11 08:43:32 +0000306#endif
307
308/*
309 * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
310 */
311#define CFG_MECR_VAL 0x00000000
312#define CFG_MCMEM0_VAL 0x00010504
313#define CFG_MCMEM1_VAL 0x00010504
314#define CFG_MCATT0_VAL 0x00010504
315#define CFG_MCATT1_VAL 0x00010504
316#define CFG_MCIO0_VAL 0x00004715
317#define CFG_MCIO1_VAL 0x00004715
318
319/* Board specific defines */
320
321/* LED defines */
322#define YELLOW 0x03
323#define RED 0x02
324#define GREEN 0x01
325#define OFF 0x00
326#define LED_IRDA0 0
327#define LED_IRDA1 2
328#define LED_IRDA2 4
329#define LED_IRDA3 6
330#define CRADLE_LED_SET_REG GPSR2
331#define CRADLE_LED_CLR_REG GPCR2
332
333/* SuperIO defines */
334#define CRADLE_SIO_INDEX 0x2e
335#define CRADLE_SIO_DATA 0x2f
336
337/* IO defines */
338#define CRADLE_CPLD_PHYS 0x08000000
339#define CRADLE_SIO1_PHYS 0x08100000
340#define CRADLE_SIO2_PHYS 0x08200000
341#define CRADLE_SIO3_PHYS 0x08300000
342#define CRADLE_ETH_PHYS 0x10000000
343
344#ifndef __ASSEMBLY__
345
346/* global prototypes */
347void led_code(int code, int color);
348
349#endif
350
351#endif /* __CONFIG_H */