blob: 304e1ce31c6e5235bf3dc2e0f02989e3ba8c3efe [file] [log] [blame]
Peter Barada86887f82011-12-19 19:54:51 +00001/*
2 * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
3 * Peter Barada <peter.barada@logicpd.com>
4 *
5 * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
6 * reference boards.
7 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02008 * SPDX-License-Identifier: GPL-2.0+
Peter Barada86887f82011-12-19 19:54:51 +00009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
Adam Ford49c73032016-01-29 20:12:34 -060014/* High Level Configuration Options */
Peter Barada86887f82011-12-19 19:54:51 +000015
Adam Ford7b77b1f2015-09-02 09:18:20 -050016#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
Adam Ford49c73032016-01-29 20:12:34 -060017
18/*
19 * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
20 * 64 bytes before this address should be set aside for u-boot.img's
21 * header. That is 0x800FFFC0--0x80100000 should not be used for any
22 * other needs. We use this rather than the inherited defines from
23 * ti_armv7_common.h for backwards compatibility.
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) /* 512 KB */
28#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
29#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
Peter Barada86887f82011-12-19 19:54:51 +000030
Adam Ford7b77b1f2015-09-02 09:18:20 -050031#include <configs/ti_omap3_common.h>
Adam Ford49c73032016-01-29 20:12:34 -060032
Adam Fordf92dfc82016-02-08 19:06:08 -060033/* Override default SPL info to minimize empty space and allow BCH8 in SPL */
34#undef CONFIG_SPL_TEXT_BASE
35#undef CONFIG_SPL_MAX_SIZE
36#define CONFIG_SPL_TEXT_BASE 0x40200000
37#define CONFIG_SPL_MAX_SIZE (64 * 1024)
38
Adam Ford49c73032016-01-29 20:12:34 -060039/* Display CPU and Board information */
Adam Ford7b77b1f2015-09-02 09:18:20 -050040
Peter Barada86887f82011-12-19 19:54:51 +000041#define CONFIG_DISPLAY_CPUINFO
42#define CONFIG_DISPLAY_BOARDINFO
Adam Ford26ef7a22016-02-17 21:49:49 -060043#define CONFIG_BOARD_LATE_INIT
Peter Barada86887f82011-12-19 19:54:51 +000044#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
Adam Ford49c73032016-01-29 20:12:34 -060045#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
Peter Barada86887f82011-12-19 19:54:51 +000046#define CONFIG_SETUP_MEMORY_TAGS
47#define CONFIG_INITRD_TAG
48#define CONFIG_REVISION_TAG
Adam Ford49c73032016-01-29 20:12:34 -060049#define CONFIG_CMDLINE_EDITING /* cmd line edit/history */
50#define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */
Peter Barada86887f82011-12-19 19:54:51 +000051
Adam Ford49c73032016-01-29 20:12:34 -060052/* Hardware drivers */
Peter Barada86887f82011-12-19 19:54:51 +000053
Adam Fordb99353b2016-01-22 04:40:58 -060054/* GPIO banks */
55#define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
56
Adam Ford49c73032016-01-29 20:12:34 -060057#define CONFIG_USB_OMAP3
58
59/* select serial console configuration */
Adam Ford7b77b1f2015-09-02 09:18:20 -050060#undef CONFIG_CONS_INDEX
Peter Barada86887f82011-12-19 19:54:51 +000061#define CONFIG_CONS_INDEX 1
62#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
63#define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */
64
Peter Barada86887f82011-12-19 19:54:51 +000065/* commands to include */
Adam Ford49c73032016-01-29 20:12:34 -060066#define CONFIG_CMD_NAND
Peter Barada86887f82011-12-19 19:54:51 +000067#define CONFIG_CMD_CACHE
Adam Ford49c73032016-01-29 20:12:34 -060068#define CONFIG_CMD_EXT2
69#define CONFIG_CMD_FAT
70#define CONFIG_CMD_MTDPARTS
Peter Barada86887f82011-12-19 19:54:51 +000071#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
Peter Barada86887f82011-12-19 19:54:51 +000072#define CONFIG_CMD_PING
73#define CONFIG_CMD_DHCP
Peter Barada86887f82011-12-19 19:54:51 +000074
Adam Ford49c73032016-01-29 20:12:34 -060075/* I2C */
Heiko Schocher6789e842013-10-22 11:03:18 +020076#define CONFIG_SYS_I2C_OMAP34XX
Adam Ford49c73032016-01-29 20:12:34 -060077#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */
78#define EXPANSION_EEPROM_I2C_BUS 2 /* I2C Bus for AT24C64 */
79#define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
Peter Barada86887f82011-12-19 19:54:51 +000080
Adam Ford588e41d2016-01-31 13:34:39 -060081/* USB */
82#define CONFIG_USB_MUSB_GADGET
83#define CONFIG_USB_MUSB_OMAP2PLUS
84#define CONFIG_USB_MUSB_PIO_ONLY
85#define CONFIG_USB_GADGET_DUALSPEED
86#define CONFIG_USB_ETHER
87#define CONFIG_USB_ETHER_RNDIS
Adam Ford588e41d2016-01-31 13:34:39 -060088#define CONFIG_USB_GADGET_VBUS_DRAW 0
89#define CONFIG_USB_GADGET_DOWNLOAD
90#define CONFIG_G_DNL_VENDOR_NUM 0x0451
91#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
92#define CONFIG_G_DNL_MANUFACTURER "TI"
93#define CONFIG_USB_FUNCTION_FASTBOOT
94#define CONFIG_CMD_FASTBOOT
95#define CONFIG_ANDROID_BOOT_IMAGE
96#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
97#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
98#define CONFIG_SYS_CACHELINE_SIZE 64
99
Adam Ford49c73032016-01-29 20:12:34 -0600100/* TWL4030 */
101#define CONFIG_TWL4030_PWM
Adam Ford588e41d2016-01-31 13:34:39 -0600102#define CONFIG_TWL4030_USB
Adam Ford7b77b1f2015-09-02 09:18:20 -0500103
Adam Ford49c73032016-01-29 20:12:34 -0600104/* Board NAND Info. */
105#ifdef CONFIG_NAND
Peter Barada86887f82011-12-19 19:54:51 +0000106#define CONFIG_NAND_OMAP_GPMC
Adam Ford7b77b1f2015-09-02 09:18:20 -0500107
Adam Ford49c73032016-01-29 20:12:34 -0600108#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
109#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
110#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
111#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
Peter Barada86887f82011-12-19 19:54:51 +0000112
Adam Ford49c73032016-01-29 20:12:34 -0600113#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
114 /* to access nand */
115#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
116 /* NAND devices */
Stefano Babic55f1b392015-07-26 15:18:15 +0200117#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
Adam Ford49c73032016-01-29 20:12:34 -0600118#define CONFIG_SYS_NAND_5_ADDR_CYCLE
119#define CONFIG_SYS_NAND_PAGE_COUNT 64
120#define CONFIG_SYS_NAND_PAGE_SIZE 2048
121#define CONFIG_SYS_NAND_OOBSIZE 64
122#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
123#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
124#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
125 13, 14, 16, 17, 18, 19, 20, 21, 22, \
126 23, 24, 25, 26, 27, 28, 30, 31, 32, \
127 33, 34, 35, 36, 37, 38, 39, 40, 41, \
128 42, 44, 45, 46, 47, 48, 49, 50, 51, \
129 52, 53, 54, 55, 56}
Adam Ford7b77b1f2015-09-02 09:18:20 -0500130
Adam Ford49c73032016-01-29 20:12:34 -0600131#define CONFIG_SYS_NAND_ECCSIZE 512
132#define CONFIG_SYS_NAND_ECCBYTES 13
133#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
134#define CONFIG_BCH
135#define CONFIG_SYS_NAND_MAX_OOBFREE 2
136#define CONFIG_SYS_NAND_MAX_ECCPOS 56
137#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
138#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
139#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
140#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
141#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\
142 "1920k(u-boot),128k(u-boot-env),"\
143 "4m(kernel),-(fs)"
144#endif
Peter Barada86887f82011-12-19 19:54:51 +0000145
146/* Environment information */
Peter Barada86887f82011-12-19 19:54:51 +0000147
148/*
149 * PREBOOT assumes the 4.3" display is attached. User can interrupt
150 * and modify display variable to suit their needs.
151 */
152#define CONFIG_PREBOOT \
153 "echo ======================NOTICE============================;"\
154 "echo \"The u-boot environment is not set.\";" \
155 "echo \"If using a display a valid display varible for your panel\";" \
156 "echo \"needs to be set.\";" \
157 "echo \"Valid display options are:\";" \
158 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
159 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
160 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
161 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
162 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
163 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
164 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
165 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
166 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
167 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
168 "setenv display 15;" \
169 "setenv preboot;" \
Adam Ford49c73032016-01-29 20:12:34 -0600170 "nand unlock;" \
Peter Barada86887f82011-12-19 19:54:51 +0000171 "saveenv;"
172
Peter Barada86887f82011-12-19 19:54:51 +0000173#define CONFIG_EXTRA_ENV_SETTINGS \
174 "loadaddr=0x81000000\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600175 "uimage=uImage\0" \
176 "zimage=zImage\0" \
Peter Barada86887f82011-12-19 19:54:51 +0000177 "mtdids=" MTDIDS_DEFAULT "\0" \
178 "mtdparts=" MTDPARTS_DEFAULT "\0" \
179 "mmcdev=0\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600180 "mmcroot=/dev/mmcblk0p2 rw\0" \
181 "mmcrootfstype=ext4 rootwait\0" \
Adam Forda094c922016-02-10 01:41:10 -0600182 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
183 "nandrootfstype=ubifs rootwait\0" \
Andrew Bradford66968112012-10-01 05:06:52 +0000184 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
Peter Barada86887f82011-12-19 19:54:51 +0000185 "if run loadbootscript; then " \
186 "run bootscript; " \
187 "else " \
188 "run defaultboot;" \
189 "fi; " \
190 "else run defaultboot; fi\0" \
191 "defaultboot=run mmcramboot\0" \
192 "consoledevice=ttyO0\0" \
193 "display=15\0" \
194 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
195 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
196 "rotation=0\0" \
197 "vrfb_arg=if itest ${rotation} -ne 0; then " \
198 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
199 "omapfb.rotate=${rotation}; " \
200 "fi\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600201 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
Peter Barada86887f82011-12-19 19:54:51 +0000202 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
203 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
Adam Ford49c73032016-01-29 20:12:34 -0600204 "${optargs};" \
Peter Barada86887f82011-12-19 19:54:51 +0000205 "run addmtdparts; " \
206 "run vrfb_arg\0" \
207 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
208 "bootscript=echo 'Running bootscript from mmc ...'; " \
209 "source ${loadaddr}\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600210 "loaduimage=mmc rescan; " \
211 "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \
212 "loadzimage=mmc rescan; " \
213 "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \
Peter Barada86887f82011-12-19 19:54:51 +0000214 "ramdisksize=64000\0" \
215 "ramdiskaddr=0x82000000\0" \
216 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600217 "loadramdisk=mmc rescan; " \
218 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \
Peter Barada86887f82011-12-19 19:54:51 +0000219 "ramargs=run setconsole; setenv bootargs console=${console} " \
220 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600221 "mmcargs=run setconsole; setenv bootargs console=${console} " \
222 "${optargs} " \
223 "root=${mmcroot} " \
224 "rootfstype=${mmcrootfstype}\0" \
Adam Forda094c922016-02-10 01:41:10 -0600225 "nandargs=run setconsole; setenv bootargs console=${console} " \
226 "${optargs} " \
227 "root=${nandroot} " \
228 "rootfstype=${nandrootfstype}\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600229 "fdtaddr=0x86000000\0" \
230 "loadfdtimage=mmc rescan; " \
231 "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
232 "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \
233 "run mmcargs; " \
234 "run common_bootargs; " \
235 "run dump_bootargs; " \
236 "run loadzimage; " \
237 "run loadfdtimage; " \
238 "bootz ${loadaddr} - ${fdtaddr}\0" \
239 "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \
Peter Barada86887f82011-12-19 19:54:51 +0000240 "run ramargs; " \
241 "run common_bootargs; " \
242 "run dump_bootargs; " \
243 "run loaduimage; " \
Adam Ford49c73032016-01-29 20:12:34 -0600244 "run loadramdisk; " \
Peter Barada86887f82011-12-19 19:54:51 +0000245 "bootm ${loadaddr} ${ramdiskaddr}\0" \
Adam Ford49c73032016-01-29 20:12:34 -0600246 "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \
Peter Barada86887f82011-12-19 19:54:51 +0000247 "run ramargs; " \
248 "run common_bootargs; " \
249 "run dump_bootargs; " \
Adam Ford49c73032016-01-29 20:12:34 -0600250 "run loadzimage; " \
251 "run loadramdisk; " \
252 "run loadfdtimage; " \
253 "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \
254 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
255 "run ramargs; " \
256 "run common_bootargs; " \
257 "run dump_bootargs; " \
258 "tftpboot ${loadaddr} ${uimage}; " \
259 "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \
Peter Barada86887f82011-12-19 19:54:51 +0000260 "bootm ${loadaddr} ${ramdiskaddr}\0"
261
262#define CONFIG_BOOTCOMMAND \
263 "run autoboot"
264
Adam Ford49c73032016-01-29 20:12:34 -0600265/* Miscellaneous configurable options */
Peter Barada86887f82011-12-19 19:54:51 +0000266#define CONFIG_AUTO_COMPLETE
Adam Ford7b77b1f2015-09-02 09:18:20 -0500267
Peter Barada86887f82011-12-19 19:54:51 +0000268/* memtest works on */
269#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
270#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
271 0x01F00000) /* 31MB */
272
Adam Ford49c73032016-01-29 20:12:34 -0600273/* FLASH and environment organization */
Peter Barada86887f82011-12-19 19:54:51 +0000274
275/* **** PISMO SUPPORT *** */
Peter Barada86887f82011-12-19 19:54:51 +0000276#if defined(CONFIG_CMD_NAND)
pekon gupta222a3112014-07-18 17:59:41 +0530277#define CONFIG_SYS_FLASH_BASE NAND_BASE
Peter Barada86887f82011-12-19 19:54:51 +0000278#elif defined(CONFIG_CMD_ONENAND)
pekon gupta222a3112014-07-18 17:59:41 +0530279#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
Peter Barada86887f82011-12-19 19:54:51 +0000280#endif
281
282/* Monitor at start of flash */
283#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
284
Adam Ford49c73032016-01-29 20:12:34 -0600285#define CONFIG_ENV_IS_IN_NAND 1
286#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
287#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
Peter Barada86887f82011-12-19 19:54:51 +0000288#define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
289
Peter Barada86887f82011-12-19 19:54:51 +0000290#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
Adam Ford49c73032016-01-29 20:12:34 -0600291#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
292#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
Peter Barada86887f82011-12-19 19:54:51 +0000293
Peter Barada86887f82011-12-19 19:54:51 +0000294
Adam Ford49c73032016-01-29 20:12:34 -0600295/* SMSC922x Ethernet */
Peter Barada86887f82011-12-19 19:54:51 +0000296#if defined(CONFIG_CMD_NET)
Peter Barada86887f82011-12-19 19:54:51 +0000297#define CONFIG_SMC911X
Adam Ford1e1acc72016-01-31 17:13:33 -0600298#define CONFIG_SMC911X_32_BIT
Peter Barada86887f82011-12-19 19:54:51 +0000299#define CONFIG_SMC911X_BASE 0x08000000
Peter Barada86887f82011-12-19 19:54:51 +0000300#endif /* (CONFIG_CMD_NET) */
301
Adam Ford49c73032016-01-29 20:12:34 -0600302/* Defines for SPL */
303
304#define CONFIG_SPL_OMAP3_ID_NAND
305
306/* NAND: SPL falcon mode configs */
307#ifdef CONFIG_SPL_OS_BOOT
308#define CONFIG_CMD_SPL_NAND_OFS 0x240000
309#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
310#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
311#endif
312
Peter Barada86887f82011-12-19 19:54:51 +0000313#endif /* __CONFIG_H */