]>
Commit | Line | Data |
---|---|---|
0e4018d2 WD |
1 | /* |
2 | * 2004-2005 Gary Jennejohn <garyj@denx.de> | |
3 | * | |
4 | * Modified for the MP2USB by (C) Copyright 2005 Eric Benard | |
5 | * ebenard@eukrea.com | |
6 | * | |
7 | * Configuration settings for the MP2USB board. | |
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 | ||
425de62d JS |
31 | #define CONFIG_AT91_LEGACY |
32 | ||
0e4018d2 WD |
33 | /* ARM asynchronous clock */ |
34 | #define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 45) */ | |
35 | #define AT91C_MASTER_CLOCK (AT91C_MAIN_CLOCK/3) /* peripheral clock */ | |
36 | ||
37 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | |
38 | ||
39 | #define CONFIG_ARM920T 1 /* This is an ARM920T Core */ | |
40 | #define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */ | |
41 | #define CONFIG_AT91RM9200DK 1 /* on an AT91RM9200DK Board */ | |
42 | #define CONFIG_MP2USB 1 /* on an MP2USB Board */ | |
43 | #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ | |
44 | #define USE_920T_MMU 1 | |
45 | ||
46 | #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ | |
47 | #define CONFIG_SETUP_MEMORY_TAGS 1 | |
48 | #define CONFIG_INITRD_TAG 1 | |
49 | ||
6d0f6bcf | 50 | #define CONFIG_SYS_ATMEL_PLL_INIT_BUG 1 |
0e4018d2 | 51 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT |
6d0f6bcf | 52 | #define CONFIG_SYS_USE_MAIN_OSCILLATOR 1 |
0e4018d2 | 53 | /* flash */ |
d481c80d JCPV |
54 | #define CONFIG_SYS_EBI_CFGR_VAL 0x00000000 |
55 | #define CONFIG_SYS_SMC_CSR0_VAL 0x00003084 /* 16bit, 2 TDF, 4 WS */ | |
0e4018d2 WD |
56 | |
57 | /* clocks */ | |
d481c80d JCPV |
58 | #define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 180 MHz for PCK */ |
59 | #define CONFIG_SYS_PLLBR_VAL 0x1048bE0E /* 48 MHz (divider by 2 for USB) */ | |
60 | #define CONFIG_SYS_MCKR_VAL 0x00000202 /* PCK/3 = MCK Master Clock = 60MHz from PLLA */ | |
0e4018d2 WD |
61 | |
62 | /* sdram */ | |
d481c80d JCPV |
63 | #define CONFIG_SYS_PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */ |
64 | #define CONFIG_SYS_PIOC_BSR_VAL 0x00000000 | |
65 | #define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000 | |
66 | #define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */ | |
67 | #define CONFIG_SYS_SDRC_CR_VAL 0x3211295A /* set up the CONFIG_SYS_SDRAM */ | |
68 | #define CONFIG_SYS_SDRAM 0x20000000 /* address of the CONFIG_SYS_SDRAM */ | |
69 | #define CONFIG_SYS_SDRAM1 0x20000020 /* address of the CONFIG_SYS_SDRAM */ | |
70 | #define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to CONFIG_SYS_SDRAM */ | |
71 | #define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */ | |
72 | #define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */ | |
73 | #define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */ | |
74 | #define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */ | |
75 | #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */ | |
8052352f JS |
76 | #else |
77 | #define CONFIG_SKIP_RELOCATE_UBOOT | |
0e4018d2 WD |
78 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ |
79 | ||
80 | /* | |
81 | * Size of malloc() pool | |
82 | */ | |
6d0f6bcf JCPV |
83 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) |
84 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ | |
0e4018d2 WD |
85 | |
86 | #define CONFIG_BAUDRATE 115200 | |
87 | ||
6d0f6bcf | 88 | #define CONFIG_SYS_AT91C_BRGR_DIVISOR 33 /* hardcode so no __divsi3 : AT91C_MASTER_CLOCK /(baudrate * 16) */ |
0e4018d2 WD |
89 | |
90 | /* | |
91 | * Hardware drivers | |
92 | */ | |
93 | ||
94 | /* define one of these to choose the DBGU, USART0 or USART1 as console */ | |
beebd851 | 95 | #define CONFIG_AT91RM9200_USART |
0e4018d2 WD |
96 | #define CONFIG_DBGU |
97 | #undef CONFIG_USART0 | |
98 | #undef CONFIG_USART1 | |
99 | ||
100 | #undef CONFIG_HWFLOW /* don't include RTS/CTS flow control support */ | |
101 | ||
102 | #undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */ | |
103 | ||
7b59b3c7 | 104 | #define CONFIG_USB_OHCI_NEW 1 |
d8e7e0f0 WD |
105 | #define CONFIG_USB_KEYBOARD 1 |
106 | #define CONFIG_USB_STORAGE 1 | |
107 | #define CONFIG_DOS_PARTITION 1 | |
108 | #define CONFIG_AT91C_PQFP_UHPBUG 1 | |
109 | ||
6d0f6bcf JCPV |
110 | #undef CONFIG_SYS_USB_OHCI_BOARD_INIT |
111 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 | |
112 | #define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE | |
113 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" | |
114 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 | |
301f1aa3 | 115 | |
0e4018d2 WD |
116 | #undef CONFIG_HARD_I2C |
117 | ||
118 | #ifdef CONFIG_HARD_I2C | |
6d0f6bcf JCPV |
119 | #define CONFIG_SYS_I2C_SPEED 0 /* not used */ |
120 | #define CONFIG_SYS_I2C_SLAVE 0 /* not used */ | |
0e4018d2 | 121 | #define CONFIG_RTC_RS5C372A /* RICOH I2C RTC */ |
6d0f6bcf JCPV |
122 | #define CONFIG_SYS_I2C_RTC_ADDR 0x32 |
123 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 | |
124 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | |
125 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW | |
0e4018d2 WD |
126 | #endif |
127 | /* still about 20 kB free with this defined */ | |
6d0f6bcf | 128 | #define CONFIG_SYS_LONGHELP |
0e4018d2 WD |
129 | |
130 | #define CONFIG_BOOTDELAY 3 | |
131 | ||
5dc11a51 | 132 | #if !defined(CONFIG_HARD_I2C) |
0e4018d2 WD |
133 | #define CONFIG_TIMESTAMP |
134 | #endif | |
0e4018d2 | 135 | |
5dc11a51 | 136 | |
7f5c0157 JL |
137 | /* |
138 | * BOOTP options | |
139 | */ | |
140 | #define CONFIG_BOOTP_BOOTFILESIZE | |
141 | #define CONFIG_BOOTP_BOOTPATH | |
142 | #define CONFIG_BOOTP_GATEWAY | |
143 | #define CONFIG_BOOTP_HOSTNAME | |
144 | ||
145 | ||
5dc11a51 JL |
146 | /* |
147 | * Command line configuration. | |
148 | */ | |
149 | #include <config_cmd_default.h> | |
150 | ||
151 | #define CONFIG_CMD_DHCP | |
152 | #define CONFIG_CMD_NFS | |
153 | #define CONFIG_CMD_SNTP | |
154 | ||
155 | #if defined(CONFIG_HARD_I2C) | |
156 | ||
157 | #define CONFIG_CMD_DATE | |
158 | #define CONFIG_CMD_EEPROM | |
159 | #define CONFIG_CMD_I2C | |
160 | #define CONFIG_CMD_MISC | |
161 | ||
162 | #else | |
163 | ||
5dc11a51 | 164 | #define CONFIG_CMD_CACHE |
74de7aef | 165 | #define CONFIG_CMD_USB |
5dc11a51 | 166 | |
5dc11a51 JL |
167 | #undef CONFIG_CMD_BDI |
168 | #undef CONFIG_CMD_FPGA | |
169 | #undef CONFIG_CMD_IMI | |
170 | #undef CONFIG_CMD_LOADS | |
171 | #undef CONFIG_CMD_MISC | |
74de7aef | 172 | #undef CONFIG_CMD_SOURCE |
5dc11a51 JL |
173 | |
174 | #endif | |
175 | ||
176 | ||
6d0f6bcf | 177 | #define CONFIG_SYS_LONGHELP |
0e4018d2 WD |
178 | |
179 | #define CONFIG_NR_DRAM_BANKS 1 | |
180 | #define PHYS_SDRAM 0x20000000 | |
301f1aa3 | 181 | #define PHYS_SDRAM_SIZE 0x08000000 /* 128 megs */ |
0e4018d2 | 182 | |
6d0f6bcf JCPV |
183 | #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM |
184 | #define CONFIG_SYS_MEMTEST_END CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144 | |
0e4018d2 | 185 | |
c041e9d2 JS |
186 | #define CONFIG_NET_MULTI 1 |
187 | #ifdef CONFIG_NET_MULTI | |
188 | #define CONFIG_DRIVER_AT91EMAC 1 | |
189 | #define CONFIG_SYS_RX_ETH_BUFFER 8 | |
190 | #else | |
191 | #define CONFIG_DRIVER_ETHER 1 | |
192 | #endif | |
0e4018d2 WD |
193 | #define CONFIG_NET_RETRY_COUNT 20 |
194 | #undef CONFIG_AT91C_USE_RMII | |
195 | ||
196 | #define PHYS_FLASH_1 0x10000000 | |
197 | #define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */ | |
6d0f6bcf JCPV |
198 | #define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 |
199 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | |
200 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | |
201 | #define CONFIG_SYS_MAX_FLASH_SECT 256 | |
202 | #define CONFIG_SYS_FLASH_ERASE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Erase */ | |
203 | #define CONFIG_SYS_FLASH_WRITE_TOUT (2 * CONFIG_SYS_HZ) /* Timeout for Flash Write */ | |
204 | #define CONFIG_SYS_FLASH_LOCK_TOUT (10*CONFIG_SYS_HZ) /* Timeout for Flash Set Lock Bit */ | |
205 | #define CONFIG_SYS_FLASH_UNLOCK_TOUT (10*CONFIG_SYS_HZ) /* Timeout for Flash Clear Lock Bits */ | |
206 | #define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */ | |
0e4018d2 | 207 | |
5a1aceb0 | 208 | #define CONFIG_ENV_IS_IN_FLASH 1 |
0e8d1586 | 209 | #define CONFIG_ENV_OFFSET 0x20000 /* after u-boot.bin */ |
6d0f6bcf | 210 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE+CONFIG_ENV_OFFSET) |
0e8d1586 | 211 | #define CONFIG_ENV_SIZE 0x20000 |
0e4018d2 | 212 | |
6d0f6bcf | 213 | #define CONFIG_SYS_LOAD_ADDR 0x21000000 /* default load address */ |
0e4018d2 | 214 | |
6d0f6bcf | 215 | #define CONFIG_SYS_BAUDRATE_TABLE { 115200, 57600, 38400, 19200, 9600 } |
0e4018d2 | 216 | |
6d0f6bcf JCPV |
217 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
218 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | |
219 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ | |
220 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | |
0e4018d2 | 221 | |
52cb4d4f | 222 | #define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */ |
d8e7e0f0 | 223 | |
6d0f6bcf JCPV |
224 | #define CONFIG_SYS_HZ 1000 |
225 | #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2) /* AT91C_TC0_CMR is implicitly set to */ | |
0e4018d2 WD |
226 | /* AT91C_TC_TIMER_DIV1_CLOCK */ |
227 | ||
228 | #define CONFIG_STACKSIZE (32*1024) /* regular stack */ | |
229 | ||
230 | #ifdef CONFIG_USE_IRQ | |
231 | #error CONFIG_USE_IRQ not supported | |
232 | #endif | |
233 | ||
6d0f6bcf | 234 | #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ |
0e4018d2 WD |
235 | #undef CONFIG_SILENT_CONSOLE /* enable silent startup */ |
236 | ||
237 | #define CONFIG_AUTOBOOT_KEYED | |
f2302d44 SR |
238 | #define CONFIG_AUTOBOOT_PROMPT \ |
239 | "Press SPACE to abort autoboot in %d seconds\n", bootdelay | |
0e4018d2 WD |
240 | #define CONFIG_AUTOBOOT_STOP_STR " " |
241 | #define CONFIG_AUTOBOOT_DELAY_STR "d" | |
242 | ||
243 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ | |
244 | ||
245 | #endif /* __CONFIG_H */ |