blob: 0cb62e9057d0f1bf7f44653fdceb4d30fc6e05df [file] [log] [blame]
Peter Baradae5b77e62011-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 Denkbd8ec7e2013-10-07 13:07:26 +02008 * SPDX-License-Identifier: GPL-2.0+
Peter Baradae5b77e62011-12-19 19:54:51 +00009 */
10
11#ifndef __CONFIG_H
12#define __CONFIG_H
13
Adam Ford5326c292016-01-29 20:12:34 -060014/* High Level Configuration Options */
Peter Baradae5b77e62011-12-19 19:54:51 +000015
Adam Ford04c848a2015-09-02 09:18:20 -050016#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
Peter Baradae5b77e62011-12-19 19:54:51 +000017
Peter Baradae5b77e62011-12-19 19:54:51 +000018/*
Adam Ford5326c292016-01-29 20:12:34 -060019 * 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.
Peter Baradae5b77e62011-12-19 19:54:51 +000024 */
Adam Ford5326c292016-01-29 20:12:34 -060025#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
30
31#include <configs/ti_omap3_common.h>
32
Adam Fordd92313a2016-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 Ford5326c292016-01-29 20:12:34 -060039/* Display CPU and Board information */
Adam Ford04c848a2015-09-02 09:18:20 -050040
Peter Baradae5b77e62011-12-19 19:54:51 +000041#define CONFIG_DISPLAY_CPUINFO
42#define CONFIG_DISPLAY_BOARDINFO
Adam Ford60da8c32016-02-17 21:49:49 -060043#define CONFIG_BOARD_LATE_INIT
Peter Baradae5b77e62011-12-19 19:54:51 +000044#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
Adam Ford5326c292016-01-29 20:12:34 -060045#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
Peter Baradae5b77e62011-12-19 19:54:51 +000046#define CONFIG_SETUP_MEMORY_TAGS
47#define CONFIG_INITRD_TAG
48#define CONFIG_REVISION_TAG
Adam Ford5326c292016-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 Baradae5b77e62011-12-19 19:54:51 +000051
Adam Ford5326c292016-01-29 20:12:34 -060052/* Hardware drivers */
Peter Baradae5b77e62011-12-19 19:54:51 +000053
Adam Fordcc276de2016-01-22 04:40:58 -060054/* GPIO banks */
55#define CONFIG_OMAP3_GPIO_6 /* GPIO160..191 is in GPIO bank 6 */
56
Adam Ford5326c292016-01-29 20:12:34 -060057#define CONFIG_USB_OMAP3
58
59/* select serial console configuration */
Adam Ford04c848a2015-09-02 09:18:20 -050060#undef CONFIG_CONS_INDEX
Peter Baradae5b77e62011-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 Baradae5b77e62011-12-19 19:54:51 +000065/* commands to include */
Adam Ford5326c292016-01-29 20:12:34 -060066#define CONFIG_CMD_NAND
Peter Baradae5b77e62011-12-19 19:54:51 +000067#define CONFIG_CMD_CACHE
Adam Ford5326c292016-01-29 20:12:34 -060068#define CONFIG_CMD_EXT2
69#define CONFIG_CMD_FAT
70#define CONFIG_CMD_MTDPARTS
Peter Baradae5b77e62011-12-19 19:54:51 +000071#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
Peter Baradae5b77e62011-12-19 19:54:51 +000072#define CONFIG_CMD_PING
73#define CONFIG_CMD_DHCP
Peter Baradae5b77e62011-12-19 19:54:51 +000074
Adam Ford5326c292016-01-29 20:12:34 -060075/* I2C */
Heiko Schocherf53f2b82013-10-22 11:03:18 +020076#define CONFIG_SYS_I2C_OMAP34XX
Adam Ford5326c292016-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 Baradae5b77e62011-12-19 19:54:51 +000080
Adam Fordd76b69c2016-01-31 13:34:39 -060081/* USB */
Adam Fordd76b69c2016-01-31 13:34:39 -060082#define CONFIG_USB_MUSB_OMAP2PLUS
83#define CONFIG_USB_MUSB_PIO_ONLY
Adam Fordd76b69c2016-01-31 13:34:39 -060084#define CONFIG_USB_ETHER
85#define CONFIG_USB_ETHER_RNDIS
Adam Fordd76b69c2016-01-31 13:34:39 -060086#define CONFIG_USB_FUNCTION_FASTBOOT
87#define CONFIG_CMD_FASTBOOT
88#define CONFIG_ANDROID_BOOT_IMAGE
89#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
90#define CONFIG_FASTBOOT_BUF_SIZE 0x07000000
91#define CONFIG_SYS_CACHELINE_SIZE 64
92
Adam Ford5326c292016-01-29 20:12:34 -060093/* TWL4030 */
94#define CONFIG_TWL4030_PWM
Adam Fordd76b69c2016-01-31 13:34:39 -060095#define CONFIG_TWL4030_USB
Adam Ford04c848a2015-09-02 09:18:20 -050096
Adam Ford5326c292016-01-29 20:12:34 -060097/* Board NAND Info. */
98#ifdef CONFIG_NAND
Peter Baradae5b77e62011-12-19 19:54:51 +000099#define CONFIG_NAND_OMAP_GPMC
Adam Ford04c848a2015-09-02 09:18:20 -0500100
Adam Ford5326c292016-01-29 20:12:34 -0600101#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
102#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
103#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
104#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
Peter Baradae5b77e62011-12-19 19:54:51 +0000105
Adam Ford5326c292016-01-29 20:12:34 -0600106#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
107 /* to access nand */
108#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
109 /* NAND devices */
Stefano Babic0cd41182015-07-26 15:18:15 +0200110#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
Adam Ford5326c292016-01-29 20:12:34 -0600111#define CONFIG_SYS_NAND_5_ADDR_CYCLE
112#define CONFIG_SYS_NAND_PAGE_COUNT 64
113#define CONFIG_SYS_NAND_PAGE_SIZE 2048
114#define CONFIG_SYS_NAND_OOBSIZE 64
115#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
116#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
117#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
118 13, 14, 16, 17, 18, 19, 20, 21, 22, \
119 23, 24, 25, 26, 27, 28, 30, 31, 32, \
120 33, 34, 35, 36, 37, 38, 39, 40, 41, \
121 42, 44, 45, 46, 47, 48, 49, 50, 51, \
122 52, 53, 54, 55, 56}
Adam Ford04c848a2015-09-02 09:18:20 -0500123
Adam Ford5326c292016-01-29 20:12:34 -0600124#define CONFIG_SYS_NAND_ECCSIZE 512
125#define CONFIG_SYS_NAND_ECCBYTES 13
126#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
127#define CONFIG_BCH
128#define CONFIG_SYS_NAND_MAX_OOBFREE 2
129#define CONFIG_SYS_NAND_MAX_ECCPOS 56
130#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
131#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
132#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
133#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
134#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(MLO),"\
135 "1920k(u-boot),128k(u-boot-env),"\
136 "4m(kernel),-(fs)"
137#endif
Peter Baradae5b77e62011-12-19 19:54:51 +0000138
139/* Environment information */
Peter Baradae5b77e62011-12-19 19:54:51 +0000140
141/*
142 * PREBOOT assumes the 4.3" display is attached. User can interrupt
143 * and modify display variable to suit their needs.
144 */
145#define CONFIG_PREBOOT \
146 "echo ======================NOTICE============================;"\
147 "echo \"The u-boot environment is not set.\";" \
148 "echo \"If using a display a valid display varible for your panel\";" \
149 "echo \"needs to be set.\";" \
150 "echo \"Valid display options are:\";" \
151 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \
152 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \
153 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \
154 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \
155 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \
156 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \
157 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \
158 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \
159 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \
160 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \
161 "setenv display 15;" \
162 "setenv preboot;" \
Adam Ford5326c292016-01-29 20:12:34 -0600163 "nand unlock;" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000164 "saveenv;"
165
Peter Baradae5b77e62011-12-19 19:54:51 +0000166#define CONFIG_EXTRA_ENV_SETTINGS \
167 "loadaddr=0x81000000\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600168 "uimage=uImage\0" \
169 "zimage=zImage\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000170 "mtdids=" MTDIDS_DEFAULT "\0" \
171 "mtdparts=" MTDPARTS_DEFAULT "\0" \
172 "mmcdev=0\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600173 "mmcroot=/dev/mmcblk0p2 rw\0" \
174 "mmcrootfstype=ext4 rootwait\0" \
Adam Ford193e9a12016-02-10 01:41:10 -0600175 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
176 "nandrootfstype=ubifs rootwait\0" \
Andrew Bradforde1c7c8a2012-10-01 05:06:52 +0000177 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000178 "if run loadbootscript; then " \
179 "run bootscript; " \
180 "else " \
181 "run defaultboot;" \
182 "fi; " \
183 "else run defaultboot; fi\0" \
184 "defaultboot=run mmcramboot\0" \
185 "consoledevice=ttyO0\0" \
186 "display=15\0" \
187 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
188 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
189 "rotation=0\0" \
190 "vrfb_arg=if itest ${rotation} -ne 0; then " \
191 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
192 "omapfb.rotate=${rotation}; " \
193 "fi\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600194 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000195 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \
196 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \
Adam Ford5326c292016-01-29 20:12:34 -0600197 "${optargs};" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000198 "run addmtdparts; " \
199 "run vrfb_arg\0" \
200 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
201 "bootscript=echo 'Running bootscript from mmc ...'; " \
202 "source ${loadaddr}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600203 "loaduimage=mmc rescan; " \
204 "fatload mmc ${mmcdev} ${loadaddr} ${uimage}\0" \
205 "loadzimage=mmc rescan; " \
206 "fatload mmc ${mmcdev} ${loadaddr} ${zimage}\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000207 "ramdisksize=64000\0" \
208 "ramdiskaddr=0x82000000\0" \
209 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600210 "loadramdisk=mmc rescan; " \
211 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +0000212 "ramargs=run setconsole; setenv bootargs console=${console} " \
213 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600214 "mmcargs=run setconsole; setenv bootargs console=${console} " \
215 "${optargs} " \
216 "root=${mmcroot} " \
217 "rootfstype=${mmcrootfstype}\0" \
Adam Ford193e9a12016-02-10 01:41:10 -0600218 "nandargs=run setconsole; setenv bootargs console=${console} " \
219 "${optargs} " \
220 "root=${nandroot} " \
221 "rootfstype=${nandrootfstype}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600222 "fdtaddr=0x86000000\0" \
223 "loadfdtimage=mmc rescan; " \
224 "fatload mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
225 "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \
226 "run mmcargs; " \
227 "run common_bootargs; " \
228 "run dump_bootargs; " \
229 "run loadzimage; " \
230 "run loadfdtimage; " \
231 "bootz ${loadaddr} - ${fdtaddr}\0" \
232 "mmcramboot=echo 'Booting uImage kernel from mmc w/ramdisk...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000233 "run ramargs; " \
234 "run common_bootargs; " \
235 "run dump_bootargs; " \
236 "run loaduimage; " \
Adam Ford5326c292016-01-29 20:12:34 -0600237 "run loadramdisk; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000238 "bootm ${loadaddr} ${ramdiskaddr}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600239 "mmcrambootz=echo 'Booting zImage kernel from mmc w/ramdisk...'; " \
240 "run ramargs; " \
241 "run common_bootargs; " \
242 "run dump_bootargs; " \
243 "run loadzimage; " \
244 "run loadramdisk; " \
245 "run loadfdtimage; " \
246 "bootz ${loadaddr} ${ramdiskaddr} ${fdtaddr}\0; " \
247 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000248 "run ramargs; " \
249 "run common_bootargs; " \
250 "run dump_bootargs; " \
Adam Ford5326c292016-01-29 20:12:34 -0600251 "tftpboot ${loadaddr} ${uimage}; " \
252 "tftpboot ${ramdiskaddr} ${ramdiskimage}; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000253 "bootm ${loadaddr} ${ramdiskaddr}\0"
254
255#define CONFIG_BOOTCOMMAND \
256 "run autoboot"
257
Adam Ford5326c292016-01-29 20:12:34 -0600258/* Miscellaneous configurable options */
Peter Baradae5b77e62011-12-19 19:54:51 +0000259#define CONFIG_AUTO_COMPLETE
Adam Ford04c848a2015-09-02 09:18:20 -0500260
Peter Baradae5b77e62011-12-19 19:54:51 +0000261/* memtest works on */
262#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
263#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
264 0x01F00000) /* 31MB */
265
Adam Ford5326c292016-01-29 20:12:34 -0600266/* FLASH and environment organization */
Peter Baradae5b77e62011-12-19 19:54:51 +0000267
268/* **** PISMO SUPPORT *** */
Peter Baradae5b77e62011-12-19 19:54:51 +0000269#if defined(CONFIG_CMD_NAND)
pekon gupta0a9ec452014-07-18 17:59:41 +0530270#define CONFIG_SYS_FLASH_BASE NAND_BASE
Peter Baradae5b77e62011-12-19 19:54:51 +0000271#elif defined(CONFIG_CMD_ONENAND)
pekon gupta0a9ec452014-07-18 17:59:41 +0530272#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
Peter Baradae5b77e62011-12-19 19:54:51 +0000273#endif
274
275/* Monitor at start of flash */
276#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
277
Adam Ford5326c292016-01-29 20:12:34 -0600278#define CONFIG_ENV_IS_IN_NAND 1
279#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
280#define ONENAND_ENV_OFFSET 0x260000 /* environment starts here */
Peter Baradae5b77e62011-12-19 19:54:51 +0000281#define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */
282
Peter Baradae5b77e62011-12-19 19:54:51 +0000283#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
Adam Ford5326c292016-01-29 20:12:34 -0600284#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
285#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
Peter Baradae5b77e62011-12-19 19:54:51 +0000286
Peter Baradae5b77e62011-12-19 19:54:51 +0000287
Adam Ford5326c292016-01-29 20:12:34 -0600288/* SMSC922x Ethernet */
Peter Baradae5b77e62011-12-19 19:54:51 +0000289#if defined(CONFIG_CMD_NET)
Peter Baradae5b77e62011-12-19 19:54:51 +0000290#define CONFIG_SMC911X
Adam Ford5a175cc2016-01-31 17:13:33 -0600291#define CONFIG_SMC911X_32_BIT
Peter Baradae5b77e62011-12-19 19:54:51 +0000292#define CONFIG_SMC911X_BASE 0x08000000
Peter Baradae5b77e62011-12-19 19:54:51 +0000293#endif /* (CONFIG_CMD_NET) */
294
Adam Ford5326c292016-01-29 20:12:34 -0600295/* Defines for SPL */
296
297#define CONFIG_SPL_OMAP3_ID_NAND
298
299/* NAND: SPL falcon mode configs */
300#ifdef CONFIG_SPL_OS_BOOT
301#define CONFIG_CMD_SPL_NAND_OFS 0x240000
302#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
303#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
304#endif
305
Peter Baradae5b77e62011-12-19 19:54:51 +0000306#endif /* __CONFIG_H */