1 /*
2  * (C) Copyright 2006-2008
3  * Texas Instruments.
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 TI OMAP3430 Zoom MDK board.
9  *
10  * SPDX-License-Identifier:	GPL-2.0+
11  */
12 
13 #ifndef __CONFIG_H
14 #define __CONFIG_H
15 
16 #define CONFIG_NAND
17 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
18 #include <asm/arch/cpu.h>		/* get chip and board defs */
19 #include <asm/arch/omap.h>
20 #include <configs/ti_omap3_common.h>
21 
22 /* Remove SPL boot option - we do not support that on LDP yet */
23 #undef CONFIG_SPL_FRAMEWORK
24 
25 /* Generic NAND definition conflicts with debug_base */
26 #undef CONFIG_SYS_NAND_BASE
27 
28 #define CONFIG_MISC_INIT_R
29 
30 #define CONFIG_REVISION_TAG		1
31 
32 #define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */
33 
34 /*
35  * Hardware drivers
36  */
37 
38 /* USB */
39 #define CONFIG_USB_MUSB_UDC			1
40 #define CONFIG_USB_OMAP3		1
41 #define CONFIG_TWL4030_USB		1
42 
43 /* USB device configuration */
44 #define CONFIG_USB_DEVICE		1
45 #define CONFIG_USB_TTY			1
46 /* Change these to suit your needs */
47 #define CONFIG_USBD_VENDORID		0x0451
48 #define CONFIG_USBD_PRODUCTID		0x5678
49 #define CONFIG_USBD_MANUFACTURER	"Texas Instruments"
50 #define CONFIG_USBD_PRODUCT_NAME	"Zoom1"
51 
52 #define MTDIDS_DEFAULT			"nand0=nand"
53 #define MTDPARTS_DEFAULT		"mtdparts=nand:512k(x-loader),"\
54 					"1920k(u-boot),128k(u-boot-env),"\
55 					"4m(kernel),-(fs)"
56 
57 #if defined(CONFIG_CMD_NAND)
58 /* NAND: SPL falcon mode configs */
59 #ifdef CONFIG_SPL_OS_BOOT
60 #define CONFIG_CMD_SPL_NAND_OFS		0x240000
61 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x280000
62 #define CONFIG_CMD_SPL_WRITE_SIZE	0x2000
63 #endif
64 #endif
65 
66 /*
67  * TWL4030
68  */
69 #define CONFIG_TWL4030_LED		1
70 
71 /*
72  * Board NAND Info.
73  */
74 #define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
75 							/* to access nand */
76 #define CONFIG_SYS_NAND_BASE		NAND_BASE	/* physical address */
77 							/* to access nand at */
78 							/* CS0 */
79 #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
80 
81 /* Environment information */
82 
83 #define CONFIG_EXTRA_ENV_SETTINGS \
84 	"loadaddr=0x82000000\0" \
85 	"fdtaddr=0x80f80000\0" \
86 	"bootfile=uImage\0" \
87 	"fdtfile=omap3-ldp.dtb\0" \
88 	"bootdir=/\0" \
89 	"bootpart=0:1\0" \
90 	"usbtty=cdc_acm\0" \
91 	"console=ttyO2,115200n8\0" \
92 	"mmcdev=0\0" \
93 	"videomode=1024x768@60,vxres=1024,vyres=768\0" \
94 	"videospec=omapfb:vram:2M,vram:4M\0" \
95 	"mmcargs=setenv bootargs console=${console} " \
96 		"video=${videospec},mode:${videomode} " \
97 		"root=/dev/mmcblk0p2 rw " \
98 		"rootfstype=ext3 rootwait\0" \
99 	"nandargs=setenv bootargs console=${console} " \
100 		"video=${videospec},mode:${videomode} " \
101 		"root=/dev/mtdblock4 rw " \
102 		"rootfstype=jffs2\0" \
103 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
104 	"bootscript=echo Running bootscript from mmc ...; " \
105 		"source ${loadaddr}\0" \
106 	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
107 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
108 	"loadzimage=setenv bootfile zImage; if run loadimage; then run loadfdt;fi\0"\
109 	"mmcboot=echo Booting from mmc ...; " \
110 		"run mmcargs; " \
111 		"bootm ${loadaddr}\0" \
112 	"mmczboot=echo Booting from mmc ...; " \
113 		"run mmcargs; " \
114 		"bootz ${loadaddr} - ${fdtaddr}\0" \
115 	"nandboot=echo Booting from nand ...; " \
116 		"run nandargs; " \
117 		"nand read ${loadaddr} 280000 400000; " \
118 		"bootm ${loadaddr}\0" \
119 
120 #define CONFIG_BOOTCOMMAND \
121 	"mmc dev ${mmcdev}; if mmc rescan; then " \
122 		"if run loadbootscript; then " \
123 			"run bootscript; " \
124 		"else " \
125 			"if run loadimage; then " \
126 				"run mmcboot; " \
127 			"else if run loadzimage; then " \
128 				"run mmczboot; " \
129 			"else run nandboot; " \
130 			"fi; fi;" \
131 		"fi; " \
132 	"else run nandboot; fi"
133 
134 /*
135  * Miscellaneous configurable options
136  */
137 #define CONFIG_SYS_MEMTEST_START	(PHYS_SDRAM_1)	/* memtest */
138 #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_2 + \
139 					0x01F00000) /* 31MB */
140 
141 /*-----------------------------------------------------------------------
142  * FLASH and environment organization
143  */
144 
145 /* **** PISMO SUPPORT *** */
146 #if defined(CONFIG_CMD_NAND)
147 #define CONFIG_SYS_FLASH_BASE		NAND_BASE
148 #endif
149 
150 /* Monitor at start of flash */
151 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
152 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
153 
154 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
155 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
156 
157 #define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
158 #define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
159 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
160 
161 #ifdef CONFIG_CMD_NET
162 /* Ethernet (LAN9211 from SMSC9118 family) */
163 #define CONFIG_SMC911X
164 #define CONFIG_SMC911X_32_BIT
165 #define CONFIG_SMC911X_BASE		DEBUG_BASE
166 
167 #endif
168 
169 #endif				/* __CONFIG_H */
170