]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/xm250.h
arm: clean cache management
[karo-tx-uboot.git] / include / configs / xm250.h
1 /*
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 /*
32  * High Level Configuration Options
33  * (easy to change)
34  */
35 #define CONFIG_PXA250          1        /* This is an PXA250 CPU        */
36 #define CONFIG_XM250           1        /* on a MicroSys XM250 Board    */
37 #undef CONFIG_USE_IRQ                   /* we don't need IRQ/FIQ stuff  */
38
39 /* we will never enable dcache, because we have to setup MMU first */
40 #define CONFIG_SYS_NO_DCACHE
41
42 /*
43  * Size of malloc() pool; this lives below the uppermost 128 KiB which are
44  * used for the RAM copy of the uboot code
45  *
46  */
47 #define CONFIG_SYS_MALLOC_LEN           (256*1024)
48 #define CONFIG_SYS_GBL_DATA_SIZE        128     /* size in bytes reserved for initial data */
49
50 /*
51  * Hardware drivers
52  */
53 #define CONFIG_DRIVER_SMC91111
54 #define CONFIG_SMC91111_BASE            0x04000300
55 #undef  CONFIG_SMC91111_EXT_PHY
56 #define CONFIG_SMC_USE_32_BIT
57 #undef  CONFIG_SHOW_ACTIVITY
58 #define CONFIG_NET_RETRY_COUNT          10         /* # of retries              */
59
60 /*
61  * I2C bus
62  */
63 #define CONFIG_HARD_I2C                 1
64 #define CONFIG_SYS_I2C_SPEED                    50000
65 #define CONFIG_SYS_I2C_SLAVE                    0xfe
66
67 #define CONFIG_RTC_PCF8563              1
68 #define CONFIG_SYS_I2C_RTC_ADDR         0x51
69
70 #define CONFIG_SYS_I2C_EEPROM_ADDR              0x58    /* A0 = 0 (hardwired)           */
71 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS       4       /* 4 bits = 16 octets           */
72 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS   10      /* between stop and start       */
73 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN          1       /* length of address            */
74 #define CONFIG_SYS_EEPROM_SIZE                  2048    /* size in bytes                */
75 #undef  CONFIG_SYS_I2C_INIT_BOARD                       /* board has no own init        */
76
77 /*
78  * select serial console configuration
79  */
80 #define CONFIG_FFUART          1       /* we use FFUART */
81
82 /* allow to overwrite serial and ethaddr */
83 #define CONFIG_ENV_OVERWRITE
84
85 #define CONFIG_BAUDRATE         115200
86
87
88 /*
89  * BOOTP options
90  */
91 #define CONFIG_BOOTP_BOOTFILESIZE
92 #define CONFIG_BOOTP_BOOTPATH
93 #define CONFIG_BOOTP_GATEWAY
94 #define CONFIG_BOOTP_HOSTNAME
95
96
97 /*
98  * Command line configuration.
99  */
100 #include <config_cmd_default.h>
101
102 #define CONFIG_CMD_ELF
103 #define CONFIG_CMD_EEPROM
104 #define CONFIG_CMD_DATE
105 #define CONFIG_CMD_I2C
106
107
108 #define CONFIG_BOOTDELAY        3
109
110 /*
111  * Miscellaneous configurable options
112  */
113 #define CONFIG_SYS_LONGHELP                             /* undef to save memory         */
114 #define CONFIG_SYS_PROMPT               "=> "           /* Monitor Command Prompt       */
115 #define CONFIG_SYS_CBSIZE               256             /* Console I/O Buffer Size      */
116 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
117 #define CONFIG_SYS_MAXARGS              16              /* max number of command args   */
118 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
119
120 #define CONFIG_SYS_MEMTEST_START        0xa0400000      /* memtest works on             */
121 #define CONFIG_SYS_MEMTEST_END          0xa0800000      /* 4 ... 8 MB in DRAM           */
122
123 #define CONFIG_SYS_LOAD_ADDR            0xa3000000      /* default load address */
124
125 #define CONFIG_SYS_HZ                   1000
126 #define CONFIG_SYS_CPUSPEED             0x161           /* set core clock to 400/400/100 MHz */
127
128                                                 /* valid baudrates */
129
130 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
131
132 /*
133  * Definitions related to passing arguments to kernel.
134  */
135 #define CONFIG_CMDLINE_TAG       1       /* send commandline to Kernel          */
136 #define CONFIG_SETUP_MEMORY_TAGS 1       /* send memory definition to kernel    */
137 #define CONFIG_INITRD_TAG        1       /* do not send initrd params           */
138 #undef  CONFIG_VFD                       /* do not send framebuffer setup       */
139
140 /*
141  * Stack sizes
142  *
143  * The stack sizes are set up in start.S using the settings below
144  */
145 #define CONFIG_STACKSIZE        (128*1024)      /* regular stack */
146 #ifdef CONFIG_USE_IRQ
147 #define CONFIG_STACKSIZE_IRQ    (4*1024)        /* IRQ stack */
148 #define CONFIG_STACKSIZE_FIQ    (4*1024)        /* FIQ stack */
149 #endif
150
151 /*
152  * Physical Memory Map
153  */
154 #define CONFIG_NR_DRAM_BANKS    4
155 #define PHYS_SDRAM_1            0xa0000000 /* SDRAM Bank #1     */
156 #define PHYS_SDRAM_1_SIZE       0x04000000 /* 64 MB             */
157 #define PHYS_SDRAM_2            0xa4000000 /* SDRAM Bank #2     */
158 #define PHYS_SDRAM_2_SIZE       0x00000000 /* 0 MB              */
159 #define PHYS_SDRAM_3            0xa8000000 /* SDRAM Bank #3     */
160 #define PHYS_SDRAM_3_SIZE       0x00000000 /* 0 MB              */
161 #define PHYS_SDRAM_4            0xac000000 /* SDRAM Bank #4     */
162 #define PHYS_SDRAM_4_SIZE       0x00000000 /* 0 MB              */
163
164 #define PHYS_FLASH_1            0x00000000 /* Flash Bank #1     */
165 #define PHYS_FLASH_2            0x04000000 /* Flash Bank #1     */
166 #define PHYS_FLASH_SIZE         0x01000000 /* 16 MB             */
167 #define PHYS_FLASH_BANK_SIZE    0x01000000 /* 16 MB Banks       */
168 #define PHYS_FLASH_SECT_SIZE    0x00040000 /* 256 KB sectors (x2) */
169
170 #define CONFIG_SYS_DRAM_BASE            0xa0000000
171 #define CONFIG_SYS_DRAM_SIZE            0x04000000
172
173 #define CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
174
175 /*
176  * FLASH and environment organization
177  */
178 #define CONFIG_SYS_MAX_FLASH_BANKS      1     /* max number of memory banks             */
179 #define CONFIG_SYS_MAX_FLASH_SECT       128   /* max number of sectors on one chip      */
180
181 /* timeout values are in ticks */
182 #define CONFIG_SYS_FLASH_ERASE_TOUT     (2*CONFIG_SYS_HZ)       /* Timeout for Flash Erase      */
183 #define CONFIG_SYS_FLASH_WRITE_TOUT     (2*CONFIG_SYS_HZ)       /* Timeout for Flash Write      */
184 #define CONFIG_SYS_FLASH_LOCK_TOUT      (2*CONFIG_SYS_HZ)       /* Timeout for Flash Set Lock Bit */
185 #define CONFIG_SYS_FLASH_UNLOCK_TOUT    (2*CONFIG_SYS_HZ)       /* Timeout for Flash Clear Lock Bits */
186 #define CONFIG_SYS_FLASH_PROTECTION                     /* "Real" (hardware) sectors protection */
187
188 #define CONFIG_ENV_IS_IN_FLASH  1
189 #define CONFIG_ENV_ADDR         (PHYS_FLASH_1 + 0x40000)        /* Addr of Environment Sector   */
190 #define CONFIG_ENV_SIZE         0x4000
191 #define CONFIG_ENV_SECT_SIZE    0x40000                         /* Size of the Environment Sector       */
192 #define CONFIG_SYS_MONITOR_LEN          0x20000                         /* 128 KiB */
193
194 /******************************************************************************
195  *
196  * CPU specific defines
197  *
198  ******************************************************************************/
199
200 /*
201  * GPIO settings
202  *
203  * GPIO pin assignments
204  * GPIO     Name        Dir Out AF
205  * 0        NC
206  * 1        NC
207  * 2        SIRQ1       I
208  * 3        SIRQ2       I
209  * 4        SIRQ3       I
210  * 5        DMAACK1     O   0
211  * 6        DMAACK2     O   0
212  * 7        DMAACK3     O   0
213  * 8        TC1         O   0
214  * 9        TC2         O   0
215  * 10       TC3         O   0
216  * 11       nDMAEN      O   1
217  * 12       AENCTRL     O   0
218  * 13       PLDTC       O   0
219  * 14       ETHIRQ      I
220  * 15       NC
221  * 16       NC
222  * 17       NC
223  * 18       RDY         I
224  * 19       DMASIO      I
225  * 20       ETHIRQ      NC
226  * 21       NC
227  * 22       PGMEN       O   1    FIXME for debug only enable flash
228  * 23       NC
229  * 24       NC
230  * 25       NC
231  * 26       NC
232  * 27       NC
233  * 28       NC
234  * 29       NC
235  * 30       NC
236  * 31       NC
237  * 32       NC
238  * 33       NC
239  * 34       FFRXD       I       01
240  * 35       FFCTS       I       01
241  * 36       FFDCD       I       01
242  * 37       FFDSR       I       01
243  * 38       FFRI        I       01
244  * 39       FFTXD       O   1   10
245  * 40       FFDTR       O   0   10
246  * 41       FFRTS       O   0   10
247  * 42       RS232FOFF   O   0   00
248  * 43       NC
249  * 44       NC
250  * 45       IRSL0       O   0
251  * 46       IRRX0       I       01
252  * 47       IRTX0       O   0   10
253  * 48       NC
254  * 49       nIOWE       O   0
255  * 50       NC
256  * 51       NC
257  * 52       NC
258  * 53       NC
259  * 54       NC
260  * 55       NC
261  * 56       NC
262  * 57       NC
263  * 58       DKDIRQ      I
264  * 59       NC
265  * 60       NC
266  * 61       NC
267  * 62       NC
268  * 63       NC
269  * 64       COMLED      O   0
270  * 65       COMLED      O   0
271  * 66       COMLED      O   0
272  * 67       COMLED      O   0
273  * 68       COMLED      O   0
274  * 69       COMLED      O   0
275  * 70       COMLED      O   0
276  * 71       COMLED      O   0
277  * 72       NC
278  * 73       NC
279  * 74       NC
280  * 75       NC
281  * 76       NC
282  * 77       NC
283  * 78       CSIO        O   1
284  * 79       NC
285  * 80       CSETH       O   1
286  *
287  * NOTE: All NC's are defined to be outputs
288  *
289  */
290 /* Pin direction control */
291 #define CONFIG_SYS_GPDR0_VAL        0xd3808000
292 #define CONFIG_SYS_GPDR1_VAL        0xfcffab83
293 #define CONFIG_SYS_GPDR2_VAL        0x0001ffff
294 /* Set and Clear registers */
295 #define CONFIG_SYS_GPSR0_VAL        0x00008000
296 #define CONFIG_SYS_GPSR1_VAL        0x00ff0002
297 #define CONFIG_SYS_GPSR2_VAL        0x0001c000
298 #define CONFIG_SYS_GPCR0_VAL        0x00000000
299 #define CONFIG_SYS_GPCR1_VAL        0x00000000
300 #define CONFIG_SYS_GPCR2_VAL        0x00000000
301 /* Edge detect registers (these are set by the kernel) */
302 #define CONFIG_SYS_GRER0_VAL        0x00002180
303 #define CONFIG_SYS_GRER1_VAL        0x00000000
304 #define CONFIG_SYS_GRER2_VAL        0x00000000
305 #define CONFIG_SYS_GFER0_VAL        0x000043e0
306 #define CONFIG_SYS_GFER1_VAL        0x00000000
307 #define CONFIG_SYS_GFER2_VAL        0x00000000
308 /* Alternate function registers */
309 #define CONFIG_SYS_GAFR0_L_VAL      0x80000004
310 #define CONFIG_SYS_GAFR0_U_VAL      0x595a8010
311 #define CONFIG_SYS_GAFR1_L_VAL      0x699a9559
312 #define CONFIG_SYS_GAFR1_U_VAL      0xaaa5aaaa
313 #define CONFIG_SYS_GAFR2_L_VAL      0xaaaaaaaa
314 #define CONFIG_SYS_GAFR2_U_VAL      0x00000002
315
316 /*
317  * Clocks, power control and interrupts
318  */
319 #define CONFIG_SYS_PSSR_VAL         0x00000030
320 #define CONFIG_SYS_CCCR_VAL         0x00000161  /* 100 MHz memory, 400 MHz CPU, 400 Turbo  */
321 #define CONFIG_SYS_CKEN_VAL         0x000141ec  /* FFUART and STUART enabled    */
322 #define CONFIG_SYS_ICMR_VAL         0x00000000  /* No interrupts enabled        */
323
324 /* FIXME
325  *
326  * RTC settings
327  * Watchdog
328  *
329  */
330
331 /*
332  * Memory settings
333  *
334  */
335 #define CONFIG_SYS_MSC0_VAL         0x122423f0  /* FLASH   / LAN            (cs0)/(cS1)   */
336 #define CONFIG_SYS_MSC1_VAL         0x35f4aa4c  /* USB     / ST3+ST5        (cs2)/(cS3)   */
337 #define CONFIG_SYS_MSC2_VAL         0x35f435fc  /* IDE     / BCR + WatchDog (cs4)/(cS5)   */
338 #define CONFIG_SYS_MDCNFG_VAL       0x000009c9
339 #define CONFIG_SYS_MDMRS_VAL        0x00220022
340 #define CONFIG_SYS_MDREFR_VAL       0x000da018  /* Initial setting, individual bits set in lowlevel_init.S */
341
342 /*
343  * PCMCIA and CF Interfaces (NOT USED, these values from lubbock init)
344  */
345 #define CONFIG_SYS_MECR_VAL           0x00000000
346 #define CONFIG_SYS_MCMEM0_VAL         0x00010504
347 #define CONFIG_SYS_MCMEM1_VAL         0x00010504
348 #define CONFIG_SYS_MCATT0_VAL         0x00010504
349 #define CONFIG_SYS_MCATT1_VAL         0x00010504
350 #define CONFIG_SYS_MCIO0_VAL          0x00004715
351 #define CONFIG_SYS_MCIO1_VAL          0x00004715
352
353 /* Board specific defines */
354
355 #ifndef __ASSEMBLY__
356
357 /* global prototypes */
358 void led_code(int code, int color);
359
360 #endif
361
362 #endif  /* __CONFIG_H */