1
2
3
4
5
6
7
8
9
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
14
15
16#define CONFIG_NR_DRAM_BANKS 2
17
18
19
20
21
22
23
24
25#define CONFIG_SYS_TEXT_BASE 0x80100000
26#define CONFIG_SPL_BSS_START_ADDR 0x80000000
27#define CONFIG_SPL_BSS_MAX_SIZE (512 << 10)
28#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
29#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
30
31#include <configs/ti_omap3_common.h>
32
33
34
35
36
37
38#undef CONFIG_SPL_TEXT_BASE
39#define CONFIG_SPL_TEXT_BASE 0x40200000
40
41
42
43#define CONFIG_DISPLAY_CPUINFO
44#define CONFIG_DISPLAY_BOARDINFO
45#define CONFIG_BOARD_LATE_INIT
46#define CONFIG_MISC_INIT_R
47#define CONFIG_CMDLINE_TAG
48#define CONFIG_SETUP_MEMORY_TAGS
49#define CONFIG_INITRD_TAG
50#define CONFIG_REVISION_TAG
51#define CONFIG_CMDLINE_EDITING
52
53
54
55
56#define CONFIG_OMAP3_GPIO_6
57
58#define CONFIG_USB_OMAP3
59
60
61#undef CONFIG_CONS_INDEX
62#define CONFIG_CONS_INDEX 1
63#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
64#define CONFIG_SERIAL1 1
65
66
67#define CONFIG_CMD_NAND
68#define CONFIG_CMD_MTDPARTS
69#define CONFIG_CMD_NAND_LOCK_UNLOCK
70
71
72#define CONFIG_SYS_I2C_OMAP34XX
73#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
74#define EXPANSION_EEPROM_I2C_BUS 2
75#define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
76
77
78#define CONFIG_USB_MUSB_OMAP2PLUS
79#define CONFIG_USB_MUSB_PIO_ONLY
80#define CONFIG_USB_ETHER
81#define CONFIG_USB_ETHER_RNDIS
82#define CONFIG_USB_FUNCTION_FASTBOOT
83#define CONFIG_CMD_FASTBOOT
84#define CONFIG_ANDROID_BOOT_IMAGE
85#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
86#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
87
88
89#define CONFIG_TWL4030_PWM
90#define CONFIG_TWL4030_USB
91
92
93#ifdef CONFIG_NAND
94#define CONFIG_NAND_OMAP_GPMC
95
96#define CONFIG_CMD_UBI
97#define CONFIG_CMD_UBIFS
98#define CONFIG_RBTREE
99#define CONFIG_LZO
100
101#define CONFIG_SYS_NAND_ADDR NAND_BASE
102
103#define CONFIG_SYS_MAX_NAND_DEVICE 1
104
105#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
106#define CONFIG_SYS_NAND_5_ADDR_CYCLE
107#define CONFIG_SYS_NAND_PAGE_COUNT 64
108#define CONFIG_SYS_NAND_PAGE_SIZE 2048
109#define CONFIG_SYS_NAND_OOBSIZE 64
110#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
111#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
112#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
113 13, 14, 16, 17, 18, 19, 20, 21, 22, \
114 23, 24, 25, 26, 27, 28, 30, 31, 32, \
115 33, 34, 35, 36, 37, 38, 39, 40, 41, \
116 42, 44, 45, 46, 47, 48, 49, 50, 51, \
117 52, 53, 54, 55, 56}
118
119#define CONFIG_SYS_NAND_ECCSIZE 512
120#define CONFIG_SYS_NAND_ECCBYTES 13
121#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
122#define CONFIG_BCH
123#define CONFIG_SYS_NAND_MAX_OOBFREE 2
124#define CONFIG_SYS_NAND_MAX_ECCPOS 56
125#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
126#define CONFIG_MTD_DEVICE
127#define CONFIG_MTD_PARTITIONS
128#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
129#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\
130 "1920k(u-boot),128k(u-boot-env),"\
131 "4m(kernel),-(fs)"
132#endif
133
134
135
136
137
138
139
140#define CONFIG_PREBOOT \
141 "echo ======================NOTICE============================;"\
142 "echo \"The u-boot environment is not set.\";" \
143 "echo \"If using a display a valid display variable for your panel\";" \
144 "echo \"needs to be set.\";" \
145 "echo \"Valid display options are:\";" \
146 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
147 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
148 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
149 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
150 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
151 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
152 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
153 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
154 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
155 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
156 "setenv display 15;" \
157 "setenv preboot;" \
158 "nand unlock;" \
159 "saveenv;"
160
161#define CONFIG_EXTRA_ENV_SETTINGS \
162 "loadaddr=0x81000000\0" \
163 "uimage=uImage\0" \
164 "zimage=zImage\0" \
165 "mtdids=" MTDIDS_DEFAULT "\0" \
166 "mtdparts=" MTDPARTS_DEFAULT "\0" \
167 "mmcdev=0\0" \
168 "mmcroot=/dev/mmcblk0p2 rw\0" \
169 "mmcrootfstype=ext4 rootwait\0" \
170 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
171 "nandrootfstype=ubifs rootwait\0" \
172 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
173 "if run loadbootscript; then " \
174 "run bootscript; " \
175 "else " \
176 "run defaultboot;" \
177 "fi; " \
178 "else run defaultboot; fi\0" \
179 "defaultboot=run mmcramboot\0" \
180 "consoledevice=ttyO0\0" \
181 "display=15\0" \
182 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
183 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
184 "rotation=0\0" \
185 "vrfb_arg=if itest ${rotation} -ne 0; then " \
186 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
187 "omapfb.rotate=${rotation}; " \
188 "fi\0" \
189 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
190 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
191 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
192 "${optargs};" \
193 "run addmtdparts; " \
194 "run vrfb_arg\0" \
195 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
196 "bootscript=echo 'Running bootscript from mmc ...'; " \
197 "source ${loadaddr}\0" \
198 "loaduimage=mmc rescan; " \
199 "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \
200 "loadzimage=mmc rescan; " \
201 "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \
202 "ramdisksize=64000\0" \
203 "ramdiskaddr=0x82000000\0" \
204 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
205 "loadramdisk=mmc rescan; " \
206 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \
207 "ramargs=run setconsole; setenv bootargs console=${console} " \
208 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
209 "mmcargs=run setconsole; setenv bootargs console=${console} " \
210 "${optargs} " \
211 "root=${mmcroot} " \
212 "rootfstype=${mmcrootfstype}\0" \
213 "nandargs=run setconsole; setenv bootargs console=${console} " \
214 "${optargs} " \
215 "root=${nandroot} " \
216 "rootfstype=${nandrootfstype}\0" \
217 "fdtaddr=0x86000000\0" \
218 "loadfdtimage=mmc rescan; " \
219 "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
220 "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \
221 "run mmcargs; " \
222 "run common_bootargs; " \
223 "run dump_bootargs; " \
224 "run loadzimage; " \
225 "run loadfdtimage; " \
226 "bootz ${loadaddr} - ${fdtaddr}\0" \
227 "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \
228 "run ramargs; " \
229 "run common_bootargs; " \
230 "run dump_bootargs; " \
231 "run loaduimage; " \
232 "run loadramdisk; " \
233 "bootm ${loadaddr} ${ramdiskaddr}\0" \
234 "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \
235 "run ramargs; " \
236 "run common_bootargs; " \
237 "run dump_bootargs; " \
238 "run loadzimage; " \
239 "run loadramdisk; " \
240 "run loadfdtimage; " \
241 "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \
242 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
243 "run ramargs; " \
244 "run common_bootargs; " \
245 "run dump_bootargs; " \
246 "tftpboot ${loadaddr} ${uimage}; " \
247 "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \
248 "bootm ${loadaddr} ${ramdiskaddr}\0"
249
250#define CONFIG_BOOTCOMMAND \
251 "run autoboot"
252
253
254#define CONFIG_AUTO_COMPLETE
255
256
257#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
258#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
259 0x01F00000)
260
261
262
263
264#if defined(CONFIG_CMD_NAND)
265#define CONFIG_SYS_FLASH_BASE NAND_BASE
266#elif defined(CONFIG_CMD_ONENAND)
267#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
268#endif
269
270
271#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
272
273#define CONFIG_ENV_IS_IN_NAND 1
274#define CONFIG_ENV_SIZE (128 << 10)
275#define ONENAND_ENV_OFFSET 0x260000
276#define SMNAND_ENV_OFFSET 0x260000
277
278#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10)
279#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
280#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
281
282
283#if defined(CONFIG_CMD_NET)
284#define CONFIG_SMC911X
285#define CONFIG_SMC911X_32_BIT
286#define CONFIG_SMC911X_BASE 0x08000000
287#endif
288
289
290
291#define CONFIG_SPL_OMAP3_ID_NAND
292
293
294#ifdef CONFIG_SPL_OS_BOOT
295#define CONFIG_CMD_SPL_NAND_OFS 0x240000
296#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
297#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
298#endif
299
300#endif
301