]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/omap3_sdp3430.h
Merge branch 'next' of ../next
[people/ms/u-boot.git] / include / configs / omap3_sdp3430.h
1 /*
2 * (C) Copyright 2006-2009
3 * Texas Instruments Incorporated.
4 * Richard Woodruff <r-woodruff2@ti.com>
5 * Syed Mohammed Khasim <x0khasim@ti.com>
6 * Nishanth Menon <nm@ti.com>
7 *
8 * Configuration settings for the 3430 TI SDP3430 board.
9 *
10 * See file CREDITS for list of people who contributed to this
11 * project.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 * MA 02111-1307 USA
27 */
28
29 #ifndef __CONFIG_H
30 #define __CONFIG_H
31
32 /* TODO: REMOVE THE FOLLOWING
33 * Retained the following till size.h is removed in u-boot
34 */
35 #include <asm/sizes.h>
36 /*
37 * High Level Configuration Options
38 */
39 #define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */
40 #define CONFIG_OMAP 1 /* in a TI OMAP core */
41 #define CONFIG_OMAP34XX 1 /* which is a 34XX */
42 #define CONFIG_OMAP3430 1 /* which is in a 3430 */
43 #define CONFIG_OMAP3_3430SDP 1 /* working with SDP Rev2 */
44
45 #include <asm/arch/cpu.h> /* get chip and board defs */
46 #include <asm/arch/omap3.h>
47
48 /*
49 * NOTE: these #defines presume standard SDP jumper settings.
50 * In particular:
51 * - 26 MHz clock (not 19.2 or 38.4 MHz)
52 * - Boot from 128MB NOR, not NAND or OneNAND
53 *
54 * At this writing, OMAP3 U-Boot support doesn't permit concurrent
55 * support for all the flash types the board supports.
56 */
57 #define CONFIG_DISPLAY_CPUINFO 1
58 #define CONFIG_DISPLAY_BOARDINFO 1
59
60 /* Clock Defines */
61 #define V_OSCK 26000000 /* Clock output from T2 */
62 #define V_SCLK (V_OSCK >> 1)
63
64 #undef CONFIG_USE_IRQ /* no support for IRQs */
65 #define CONFIG_MISC_INIT_R
66
67 #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
68 #define CONFIG_SETUP_MEMORY_TAGS 1
69 #define CONFIG_INITRD_TAG 1
70 #define CONFIG_REVISION_TAG 1
71
72 /*
73 * Size of malloc() pool
74 * Total Size Environment - 256k
75 * Malloc - add 256k
76 */
77 #define CONFIG_ENV_SIZE (256 << 10)
78 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (256 << 10))
79 #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for */
80 /* initial data */
81
82 /*--------------------------------------------------------------------------*/
83
84 /*
85 * Hardware drivers
86 */
87
88 /*
89 * TWL4030
90 */
91 #define CONFIG_TWL4030_POWER 1
92
93 /*
94 * serial port - NS16550 compatible
95 */
96 #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
97
98 #define CONFIG_SYS_NS16550
99 #define CONFIG_SYS_NS16550_SERIAL
100 #define CONFIG_SYS_NS16550_REG_SIZE (-4)
101 #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
102
103 /* Original SDP u-boot used UART1 and thus J8 (innermost); that can be
104 * swapped with UART2 via jumpering. Downsides of using J8: it doesn't
105 * support UART boot (that's only for UART3); it prevents sharing a Linux
106 * kernel (LL_DEBUG_UART3) or filesystem (getty ttyS2) with most boards.
107 *
108 * UART boot uses UART3 on J9, and the SDP user's guide says to use
109 * that for console. Downsides of using J9: you can't use IRDA too;
110 * since UART3 isn't in the CORE power domain, it may be a bit less
111 * usable in certain PM-sensitive debug scenarios.
112 */
113 #undef CONSOLE_J9 /* else J8/UART1 (innermost) */
114
115 #ifdef CONSOLE_J9
116 #define CONFIG_CONS_INDEX 3
117 #define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
118 #define CONFIG_SERIAL3 3 /* UART3 */
119 #else
120 #define CONFIG_CONS_INDEX 1
121 #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
122 #define CONFIG_SERIAL1 1 /* UART1 */
123 #endif
124
125 #define CONFIG_ENV_OVERWRITE
126 #define CONFIG_BAUDRATE 115200
127 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
128 115200}
129
130 /*
131 * I2C for power management setup
132 */
133 #define CONFIG_HARD_I2C 1
134 #define CONFIG_SYS_I2C_SPEED 100000
135 #define CONFIG_SYS_I2C_SLAVE 1
136 #define CONFIG_SYS_I2C_BUS 0
137 #define CONFIG_SYS_I2C_BUS_SELECT 1
138 #define CONFIG_DRIVER_OMAP34XX_I2C 1
139
140 /* DDR - I use Infineon DDR */
141 #define CONFIG_OMAP3_INFINEON_DDR 1
142
143 /* OMITTED: single 1 Gbit MT29F1G NAND flash */
144
145 /*
146 * NOR boot support - single 1 Gbit PF48F6000M0 Strataflash
147 */
148 #define CONFIG_SYS_FLASH_BASE 0x10000000
149 #define CONFIG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */
150 #define CONFIG_SYS_FLASH_CFI 1 /* use CFI geometry data */
151 #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* ~10x faster writes */
152 #define CONFIG_SYS_FLASH_PROTECTION 1 /* hardware sector protection */
153 #define CONFIG_SYS_FLASH_EMPTY_INFO 1 /* flinfo 'E' for empty */
154 #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE}
155 #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
156
157 #define CONFIG_SYS_FLASH_CFI_WIDTH 2
158 #define PHYS_FLASH_SIZE (128 << 20)
159 #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max sectors on one chip */
160
161 /* timeout values are in milliseconds */
162 #define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)
163 #define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ)
164
165 /* OMITTED: single 2 Gbit KFM2G16 OneNAND flash */
166
167 #define CONFIG_ENV_IS_IN_FLASH 1
168 #define CONFIG_SYS_ENV_SECT_SIZE (256 << 10)
169 #define CONFIG_ENV_OFFSET CONFIG_SYS_ENV_SECT_SIZE
170 #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_ENV_SECT_SIZE)
171 /*--------------------------------------------------------------------------*/
172
173 /* commands to include */
174 #include <config_cmd_default.h>
175
176 /* Enabled commands */
177 #define CONFIG_CMD_DHCP /* DHCP Support */
178 #define CONFIG_CMD_EXT2 /* EXT2 Support */
179 #define CONFIG_CMD_FAT /* FAT support */
180 #define CONFIG_CMD_I2C /* I2C serial bus support */
181 #define CONFIG_CMD_JFFS2 /* JFFS2 Support */
182 #define CONFIG_CMD_MMC /* MMC support */
183 #define CONFIG_CMD_NET
184
185 /* Disabled commands */
186 #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
187 #undef CONFIG_CMD_IMLS /* List all found images */
188
189 /*--------------------------------------------------------------------------*/
190 /*
191 * MMC boot support
192 */
193
194 #if defined(CONFIG_CMD_MMC)
195 #define CONFIG_MMC 1
196 #define CONFIG_OMAP3_MMC 1
197 #define CONFIG_DOS_PARTITION 1
198 #endif
199
200 /*----------------------------------------------------------------------------
201 * SMSC9115 Ethernet from SMSC9118 family
202 *----------------------------------------------------------------------------
203 */
204 #if defined(CONFIG_CMD_NET)
205
206 #define CONFIG_DRIVER_LAN91C96
207 #define CONFIG_LAN91C96_BASE DEBUG_BASE
208 #define CONFIG_LAN91C96_EXT_PHY
209
210 #define CONFIG_BOOTP_SEND_HOSTNAME
211 /*
212 * BOOTP fields
213 */
214 #define CONFIG_BOOTP_SUBNETMASK 0x00000001
215 #define CONFIG_BOOTP_GATEWAY 0x00000002
216 #define CONFIG_BOOTP_HOSTNAME 0x00000004
217 #define CONFIG_BOOTP_BOOTPATH 0x00000010
218 #endif /* (CONFIG_CMD_NET) */
219
220 /*
221 * Environment setup
222 *
223 * Default boot order: mmc bootscript, MMC uImage, NOR image.
224 * Network booting environment must be configured at site.
225 */
226
227 /* allow overwriting serial config and ethaddr */
228 #define CONFIG_ENV_OVERWRITE
229
230 #define CONFIG_EXTRA_ENV_SETTINGS \
231 "loadaddr=0x82000000\0" \
232 "console=ttyS0,115200n8\0" \
233 "mmcargs=setenv bootargs console=${console} " \
234 "root=/dev/mmcblk0p2 rw " \
235 "rootfstype=ext3 rootwait\0" \
236 "norargs=setenv bootargs console=${console} " \
237 "root=/dev/mtdblock3 rw " \
238 "rootfstype=jffs2\0" \
239 "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
240 "bootscript=echo Running bootscript from MMC/SD ...; " \
241 "autoscr ${loadaddr}\0" \
242 "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
243 "mmcboot=echo Booting from MMC/SD ...; " \
244 "run mmcargs; " \
245 "bootm ${loadaddr}\0" \
246 "norboot=echo Booting from NOR ...; " \
247 "run norargs; " \
248 "bootm 0x80000\0" \
249
250 #define CONFIG_BOOTCOMMAND \
251 "if mmcinit; then " \
252 "if run loadbootscript; then " \
253 "run bootscript; " \
254 "else " \
255 "if run loaduimage; then " \
256 "run mmcboot; " \
257 "else run norboot; " \
258 "fi; " \
259 "fi; " \
260 "else run norboot; fi"
261
262 #define CONFIG_AUTO_COMPLETE 1
263
264 /*--------------------------------------------------------------------------*/
265
266 /*
267 * Miscellaneous configurable options
268 */
269 #define V_PROMPT "OMAP34XX SDP # "
270
271 #define CONFIG_SYS_LONGHELP /* undef to save memory */
272 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
273 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
274 #define CONFIG_SYS_PROMPT V_PROMPT
275 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
276 /* Print Buffer Size */
277 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
278 sizeof(CONFIG_SYS_PROMPT) + 16)
279 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
280 /* Boot Argument Buffer Size */
281 #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
282
283 /* SDRAM Test range - start at 16 meg boundary -ends at 32Meg -
284 * a basic sanity check ONLY
285 * IF you would like to increase coverage, increase the end address
286 * or run the test with custom options
287 */
288 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0 + 0x01000000)
289 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + (32 << 20))
290
291 /* Default load address */
292 #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
293
294 /*--------------------------------------------------------------------------*/
295
296 /*
297 * 3430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by
298 * 32KHz clk, or from external sig. This rate is divided by a local divisor.
299 */
300 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2)
301 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
302 #define CONFIG_SYS_HZ 1000
303
304 /*
305 * Stack sizes
306 *
307 * The stack sizes are set up in start.S using the settings below
308 */
309 #define CONFIG_STACKSIZE (128 << 10) /* Regular stack */
310 #ifdef CONFIG_USE_IRQ
311 #define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack */
312 #define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack */
313 #endif
314
315 /*
316 * SDRAM Memory Map
317 */
318 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
319 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
320 #define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 meg */
321 #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
322
323 /* SDRAM Bank Allocation method */
324 #define SDRC_R_B_C 1
325
326 /*--------------------------------------------------------------------------*/
327
328 /*
329 * NOR FLASH usage ... default nCS0:
330 * - one 256KB sector for U-Boot
331 * - one 256KB sector for its parameters (not all used)
332 * - eight sectors (2 MB) for kernel
333 * - rest for JFFS2
334 */
335
336 /* Monitor at start of flash */
337 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
338 #define CONFIG_SYS_MONITOR_LEN (256 << 10)
339
340 #define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS
341 #define CONFIG_SYS_JFFS2_NUM_BANKS 1
342
343 /*
344 * NAND FLASH usage ... default nCS1:
345 * - four 128KB sectors for X-Loader
346 * - four 128KB sectors for U-Boot
347 * - two 128KB sector for its parameters
348 * - 32 sectors (4 MB) for kernel
349 * - rest for filesystem
350 */
351
352 /*
353 * OneNAND FLASH usage ... default nCS2:
354 * - four 128KB sectors for X-Loader
355 * - two 128KB sectors for U-Boot
356 * - one 128KB sector for its parameters
357 * - sixteen sectors (2 MB) for kernel
358 * - rest for filesystem
359 */
360
361 /*--------------------------------------------------------------------------*/
362
363 #ifndef __ASSEMBLY__
364 extern struct gpmc *gpmc_cfg;
365 extern unsigned int boot_flash_base;
366 extern volatile unsigned int boot_flash_env_addr;
367 extern unsigned int boot_flash_off;
368 extern unsigned int boot_flash_sec;
369 extern unsigned int boot_flash_type;
370 #endif
371
372 #endif /* __CONFIG_H */