]>
Commit | Line | Data |
---|---|---|
7237d22b SK |
1 | /* |
2 | * U-boot - Configuration file for Cirrus Logic EDB93xx boards | |
3 | */ | |
4 | ||
5 | #ifndef __CONFIG_H | |
6 | #define __CONFIG_H | |
7 | ||
8 | #ifdef CONFIG_MK_edb9301 | |
9 | #define CONFIG_EDB9301 | |
10 | #elif defined(CONFIG_MK_edb9302) | |
11 | #define CONFIG_EDB9302 | |
12 | #elif defined(CONFIG_MK_edb9302a) | |
13 | #define CONFIG_EDB9302A | |
14 | #elif defined(CONFIG_MK_edb9307) | |
15 | #define CONFIG_EDB9307 | |
16 | #elif defined(CONFIG_MK_edb9307a) | |
17 | #define CONFIG_EDB9307A | |
18 | #elif defined(CONFIG_MK_edb9312) | |
19 | #define CONFIG_EDB9312 | |
20 | #elif defined(CONFIG_MK_edb9315) | |
21 | #define CONFIG_EDB9315 | |
22 | #elif defined(CONFIG_MK_edb9315a) | |
23 | #define CONFIG_EDB9315A | |
24 | #else | |
25 | #error "no board defined" | |
26 | #endif | |
27 | ||
278bd4e7 SK |
28 | #define CONFIG_SYS_GENERIC_BOARD |
29 | ||
7237d22b SK |
30 | /* Initial environment and monitor configuration options. */ |
31 | #define CONFIG_BOOTDELAY 2 | |
32 | #define CONFIG_CMDLINE_TAG 1 | |
33 | #define CONFIG_INITRD_TAG 1 | |
34 | #define CONFIG_SETUP_MEMORY_TAGS 1 | |
35 | #define CONFIG_BOOTARGS "root=/dev/nfs console=ttyAM0,115200 ip=dhcp" | |
36 | #define CONFIG_BOOTFILE "edb93xx.img" | |
37 | ||
38 | #define CONFIG_SYS_HUSH_PARSER 1 | |
39 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | |
40 | ||
41 | ||
42 | #define CONFIG_SYS_LDSCRIPT "board/cirrus/edb93xx/u-boot.lds" | |
43 | ||
181bd9dc | 44 | #undef CONFIG_SYS_PROMPT |
7237d22b SK |
45 | #ifdef CONFIG_EDB9301 |
46 | #define CONFIG_EP9301 | |
47 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9301 | |
48 | #define CONFIG_SYS_PROMPT "EDB9301> " | |
49 | #define CONFIG_ENV_SECT_SIZE 0x00020000 | |
50 | #elif defined(CONFIG_EDB9302) | |
51 | #define CONFIG_EP9302 | |
52 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9302 | |
53 | #define CONFIG_SYS_PROMPT "EDB9302> " | |
54 | #define CONFIG_ENV_SECT_SIZE 0x00020000 | |
55 | #elif defined(CONFIG_EDB9302A) | |
56 | #define CONFIG_EP9302 | |
57 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9302A | |
58 | #define CONFIG_SYS_PROMPT "EDB9302A> " | |
59 | #define CONFIG_ENV_SECT_SIZE 0x00020000 | |
60 | #elif defined(CONFIG_EDB9307) | |
61 | #define CONFIG_EP9307 | |
62 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9307 | |
63 | #define CONFIG_SYS_PROMPT "EDB9307> " | |
64 | #define CONFIG_ENV_SECT_SIZE 0x00040000 | |
65 | #elif defined(CONFIG_EDB9307A) | |
66 | #define CONFIG_EP9307 | |
67 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9307A | |
68 | #define CONFIG_SYS_PROMPT "EDB9307A> " | |
69 | #define CONFIG_ENV_SECT_SIZE 0x00020000 | |
70 | #elif defined(CONFIG_EDB9312) | |
71 | #define CONFIG_EP9312 | |
72 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9312 | |
73 | #define CONFIG_SYS_PROMPT "EDB9312> " | |
74 | #define CONFIG_ENV_SECT_SIZE 0x00040000 | |
75 | #elif defined(CONFIG_EDB9315) | |
76 | #define CONFIG_EP9315 | |
77 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9315 | |
78 | #define CONFIG_SYS_PROMPT "EDB9315> " | |
79 | #define CONFIG_ENV_SECT_SIZE 0x00040000 | |
80 | #elif defined(CONFIG_EDB9315A) | |
81 | #define CONFIG_EP9315 | |
82 | #define CONFIG_MACH_TYPE MACH_TYPE_EDB9315A | |
83 | #define CONFIG_SYS_PROMPT "EDB9315A> " | |
84 | #define CONFIG_ENV_SECT_SIZE 0x00020000 | |
85 | #else | |
86 | #error "no board defined" | |
87 | #endif | |
88 | ||
89 | /* High-level configuration options */ | |
f2168440 | 90 | #define CONFIG_EP93XX 1 /* This is a Cirrus Logic 93xx SoC */ |
7237d22b SK |
91 | |
92 | #define CONFIG_SYS_CLK_FREQ 14745600 /* EP93xx has a 14.7456 clock */ | |
7237d22b SK |
93 | #undef CONFIG_USE_IRQ /* Don't need IRQ/FIQ */ |
94 | ||
95 | /* Monitor configuration */ | |
7237d22b SK |
96 | #undef CONFIG_CMD_DATE |
97 | #define CONFIG_CMD_DHCP | |
98 | #define CONFIG_CMD_JFFS2 | |
99 | ||
100 | #define CONFIG_SYS_LONGHELP /* Enable "long" help in mon */ | |
101 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O buffer size */ | |
102 | /* Print buffer size */ | |
103 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) | |
104 | /* Boot argument buffer size */ | |
105 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | |
106 | #define CONFIG_SYS_MAXARGS 16 /* Max number of command args */ | |
107 | ||
108 | /* Serial port hardware configuration */ | |
109 | #define CONFIG_PL010_SERIAL | |
110 | #define CONFIG_CONS_INDEX 0 | |
111 | #define CONFIG_BAUDRATE 115200 | |
112 | #define CONFIG_SYS_BAUDRATE_TABLE {9600, 19200, 38400, 57600, \ | |
113 | 115200, 230400} | |
114 | #define CONFIG_SYS_SERIAL0 0x808C0000 | |
115 | #define CONFIG_SYS_SERIAL1 0x808D0000 | |
116 | /*#define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \ | |
117 | (void *)CONFIG_SYS_SERIAL1} */ | |
118 | ||
119 | #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0} | |
120 | ||
121 | /* Status LED */ | |
122 | #define CONFIG_STATUS_LED 1 /* Status LED enabled */ | |
123 | #define CONFIG_BOARD_SPECIFIC_LED 1 | |
124 | #define STATUS_LED_GREEN 0 | |
125 | #define STATUS_LED_RED 1 | |
126 | /* Green */ | |
127 | #define STATUS_LED_BIT STATUS_LED_GREEN | |
128 | #define STATUS_LED_STATE STATUS_LED_ON | |
129 | #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) | |
130 | /* Red */ | |
131 | #define STATUS_LED_BIT1 STATUS_LED_RED | |
132 | #define STATUS_LED_STATE1 STATUS_LED_OFF | |
133 | #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2) | |
134 | /* Optional value */ | |
135 | #define STATUS_LED_BOOT STATUS_LED_BIT | |
136 | ||
137 | /* Network hardware configuration */ | |
138 | #define CONFIG_DRIVER_EP93XX_MAC | |
139 | #define CONFIG_MII_SUPPRESS_PREAMBLE | |
140 | #define CONFIG_MII | |
141 | #define CONFIG_PHY_ADDR 1 | |
7237d22b SK |
142 | #undef CONFIG_NETCONSOLE |
143 | ||
144 | /* SDRAM configuration */ | |
145 | #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \ | |
146 | defined(CONFIG_EDB9307) || defined CONFIG_EDB9312 || \ | |
147 | defined(CONFIG_EDB9315) | |
148 | /* | |
149 | * EDB9301/2 has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75 | |
150 | * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set | |
151 | * the SROMLL bit on the processor, resulting in this non-contiguous memory map. | |
152 | * | |
153 | * The EDB9307, EDB9312, and EDB9315 have 2 banks of SDRAM consisting of | |
154 | * 2x Samsung K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of | |
155 | * 64 MB of SDRAM. | |
156 | */ | |
157 | ||
158 | #define CONFIG_EDB93XX_SDCS3 | |
159 | ||
160 | #elif defined(CONFIG_EDB9302A) || \ | |
161 | defined(CONFIG_EDB9307A) || defined(CONFIG_EDB9315A) | |
162 | /* | |
163 | * EDB9302a has 4 banks of SDRAM consisting of 1x Samsung K4S561632E-TC75 | |
164 | * 256 Mbit SDRAM on a 16-bit data bus, for a total of 32MB of SDRAM. We set | |
165 | * the SROMLL bit on the processor, resulting in this non-contiguous memory map. | |
166 | * | |
167 | * The EDB9307A and EDB9315A have 2 banks of SDRAM consisting of 2x Samsung | |
168 | * K4S561632E-TC75 256 Mbit on a 32-bit data bus, for a total of 64 MB of SDRAM. | |
169 | */ | |
170 | #define CONFIG_EDB93XX_SDCS0 | |
171 | ||
172 | #else | |
173 | #error "no SDCS configuration for this board" | |
174 | #endif | |
175 | ||
176 | ||
177 | #if defined(CONFIG_EDB93XX_SDCS3) | |
178 | #define CONFIG_SYS_LOAD_ADDR 0x01000000 /* Default load address */ | |
179 | #define PHYS_SDRAM_1 0x00000000 | |
180 | #elif defined(CONFIG_EDB93XX_SDCS0) | |
181 | #define CONFIG_SYS_LOAD_ADDR 0xc1000000 /* Default load address */ | |
182 | #define PHYS_SDRAM_1 0xc0000000 | |
183 | #endif | |
184 | ||
185 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 | |
186 | #define CONFIG_NR_DRAM_BANKS 8 | |
187 | ||
188 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
189 | (CONFIG_SYS_SDRAM_BASE + 32*1024 - GENERATED_GBL_DATA_SIZE) | |
190 | ||
191 | ||
192 | /* Must match kernel config */ | |
193 | #define LINUX_BOOT_PARAM_ADDR (PHYS_SDRAM_1 + 0x100) | |
194 | ||
195 | /* Run-time memory allocatons */ | |
196 | #define CONFIG_SYS_GBL_DATA_SIZE 128 | |
197 | #define CONFIG_STACKSIZE (128 * 1024) | |
198 | ||
199 | #if defined(CONFIG_USE_IRQ) | |
200 | #define CONFIG_STACKSIZE_IRQ (4 * 1024) | |
201 | #define CONFIG_STACKSIZE_FIQ (4 * 1024) | |
202 | #endif | |
203 | ||
204 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) | |
205 | ||
206 | /* ----------------------------------------------------------------------------- | |
207 | * FLASH and environment organization | |
208 | * | |
209 | * The EDB9301, EDB9302(a), EDB9307a, EDB9315a have 1 bank of flash memory at | |
210 | * 0x60000000 consisting of 1x Intel TE28F128J3C-150 128 Mbit flash on a 16-bit | |
211 | * data bus, for a total of 16 MB of CFI-compatible flash. | |
212 | * | |
213 | * The EDB9307, EDB9312, and EDB9315 have 1 bank of flash memory at | |
214 | * 0x60000000 consisting of 2x Micron MT28F128J3-12 128 Mbit flash on a 32-bit | |
215 | * data bus, for a total of 32 MB of CFI-compatible flash. | |
216 | * | |
217 | * | |
218 | * EDB9301/02(a)7a/15a EDB9307/12/15 | |
219 | * 0x60000000 - 0x0003FFFF u-boot u-boot | |
220 | * 0x60040000 - 0x0005FFFF environment #1 environment #1 | |
221 | * 0x60060000 - 0x0007FFFF environment #2 environment #1 (continued) | |
222 | * 0x60080000 - 0x0009FFFF unused environment #2 | |
223 | * 0x600A0000 - 0x000BFFFF unused environment #2 (continued) | |
224 | * 0x600C0000 - 0x00FFFFFF unused unused | |
225 | * 0x61000000 - 0x01FFFFFF not present unused | |
226 | */ | |
227 | #define CONFIG_SYS_FLASH_CFI | |
228 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | |
229 | ||
230 | ||
231 | #define CONFIG_SYS_FLASH_PROTECTION | |
232 | #define CONFIG_FLASH_CFI_DRIVER | |
233 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | |
234 | #define CONFIG_SYS_MAX_FLASH_SECT (256+8) | |
235 | ||
236 | #define CONFIG_SYS_TEXT_BASE 0x60000000 | |
237 | #define PHYS_FLASH_1 CONFIG_SYS_TEXT_BASE | |
238 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE | |
239 | ||
240 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | |
241 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) | |
242 | ||
243 | #define CONFIG_ENV_OVERWRITE /* Vendor params unprotected */ | |
244 | #define CONFIG_ENV_IS_IN_FLASH | |
245 | ||
246 | #define CONFIG_ENV_ADDR 0x60040000 | |
247 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) | |
248 | ||
249 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE | |
250 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | |
251 | ||
252 | /* Define to enable MMC on SPI support */ | |
253 | /* #define CONFIG_EP93XX_SPI_MMC */ | |
254 | ||
255 | #ifdef CONFIG_EP93XX_SPI_MMC | |
256 | #define CONFIG_EP93XX_SPI | |
257 | #define CONFIG_MMC | |
258 | #define CONFIG_GENERIC_MMC | |
259 | #define CONFIG_MMC_SPI | |
260 | #define CONFIG_CMD_MMC | |
261 | #define CONFIG_MMC_SPI_NPOWER_EGPIO 9 | |
262 | #endif | |
263 | ||
264 | #define CONFIG_USB_STORAGE | |
265 | #define CONFIG_USB_OHCI_NEW | |
266 | #define CONFIG_USB_OHCI_EP93XX | |
267 | #define CONFIG_SYS_USB_OHCI_CPU_INIT | |
268 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3 | |
269 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ep93xx-ohci" | |
270 | #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x80020000 | |
271 | ||
272 | #define CONFIG_CMD_EXT2 | |
273 | #define CONFIG_CMD_EXT4 | |
274 | #define CONFIG_CMD_FAT | |
275 | #define CONFIG_CMD_USB | |
276 | ||
277 | #define CONFIG_BOARD_EARLY_INIT_F | |
278 | #define CONFIG_CMD_BOOTZ | |
279 | ||
280 | /* Define to disable flash configuration*/ | |
281 | /* #define CONFIG_EP93XX_NO_FLASH_CFG */ | |
282 | ||
283 | /* Define this for indusrial rated chips */ | |
284 | /* #define CONFIG_EDB93XX_INDUSTRIAL */ | |
285 | ||
286 | #endif /* !defined (__CONFIG_H) */ |