4 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef __CONFIG_BALTOS_H
17 #define __CONFIG_BALTOS_H
19 #include <linux/sizes.h>
20 #include <configs/ti_am335x_common.h>
22 #define CONFIG_MACH_TYPE MACH_TYPE_AM335XEVM
25 #define V_OSCK 24000000 /* Clock output from T2 */
26 #define V_SCLK (V_OSCK)
28 /* Custom script for NOR */
29 #define CONFIG_SYS_LDSCRIPT "board/vscom/baltos/u-boot.lds"
31 /* Always 128 KiB env size */
32 #define CONFIG_ENV_SIZE (128 << 10)
35 #define CONFIG_SYS_BOOTM_LEN SZ_64M
38 #define CONFIG_CMD_MTDPARTS
39 #define CONFIG_MTD_PARTITIONS
40 #define CONFIG_MTD_DEVICE
43 #define CONFIG_CMD_UBIFS
45 /* I2C configuration */
46 #undef CONFIG_SYS_OMAP24_I2C_SPEED
47 #define CONFIG_SYS_OMAP24_I2C_SPEED 1000
50 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00080000
51 #ifdef CONFIG_SPL_OS_BOOT
52 #define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os parameters */
53 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */
54 #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
57 "mtdids=" MTDIDS_DEFAULT "\0" \
58 "mtdparts=" MTDPARTS_DEFAULT "\0" \
59 "nandargs=setenv bootargs console=${console} " \
63 "rootfstype=${nandrootfstype}\0" \
64 "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
65 "nandrootfstype=ubifs rootwait=1\0" \
66 "nandboot=echo Booting from nand ...; " \
68 "setenv loadaddr 0x84000000; " \
70 "ubifsmount ubi0:kernel; " \
71 "ubifsload $loadaddr kernel-fit.itb;" \
73 "bootm ${loadaddr}#conf${board_name}; " \
74 "if test $? -ne 0; then echo Using default FIT config; " \
75 "bootm ${loadaddr}; fi;\0"
80 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
82 #ifndef CONFIG_SPL_BUILD
83 #define CONFIG_EXTRA_ENV_SETTINGS \
84 DEFAULT_LINUX_BOOT_ENV \
89 "fdtfile=undefined\0" \
90 "console=ttyO0,115200n8\0" \
92 "uuid_disk=${uuid_gpt_disk};" \
93 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
96 "mmcroot=/dev/mmcblk0p2 ro\0" \
97 "usbroot=/dev/sda2 ro\0" \
98 "mmcrootfstype=ext4 rootwait\0" \
99 "usbrootfstype=ext4 rootwait\0" \
100 "rootpath=/export/rootfs\0" \
102 "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
104 "ramroot=/dev/ram0 rw\0" \
105 "ramrootfstype=ext2\0" \
106 "mmcargs=setenv bootargs console=${console} " \
110 "rootfstype=${mmcrootfstype}\0" \
111 "usbargs=setenv bootargs console=${console} " \
115 "rootfstype=${usbrootfstype}\0" \
116 "spiroot=/dev/mtdblock4 rw\0" \
117 "spirootfstype=jffs2\0" \
118 "spisrcaddr=0xe0000\0" \
119 "spiimgsize=0x362000\0" \
121 "spiargs=setenv bootargs console=${console} " \
124 "rootfstype=${spirootfstype}\0" \
125 "netargs=setenv bootargs console=${console} " \
128 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
130 "bootenv=uEnv.txt\0" \
131 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
132 "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
133 "importbootenv=echo Importing environment from mmc ...; " \
134 "env import -t $loadaddr $filesize\0" \
135 "usbimportbootenv=echo Importing environment from USB ...; " \
136 "env import -t $loadaddr $filesize\0" \
137 "ramargs=setenv bootargs console=${console} " \
140 "rootfstype=${ramrootfstype}\0" \
141 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
142 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
143 "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
144 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
145 "usbloados=run usbargs; " \
146 "bootm ${loadaddr}#conf${board_name}; " \
147 "if test $? -ne 0; then " \
148 "echo Using default FIT configuration; " \
149 "bootm ${loadaddr}; " \
151 "mmcloados=run mmcargs; " \
152 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
153 "if run loadfdt; then " \
154 "bootz ${loadaddr} - ${fdtaddr}; " \
156 "if test ${boot_fdt} = try; then " \
159 "echo WARN: Cannot load the DT; " \
165 "usbboot=usb reset; " \
166 "if usb storage; then " \
167 "echo USB drive found;" \
168 "if run usbloadbootenv; then " \
169 "echo Loaded environment from ${bootenv};" \
170 "run usbimportbootenv;" \
172 "if test -n $uenvcmd; then " \
173 "echo Running uenvcmd ...;" \
176 "if run usbloadimage; then " \
180 "mmcboot=mmc dev ${mmcdev}; " \
181 "if mmc rescan; then " \
182 "echo SD/MMC found on device ${mmcdev};" \
183 "if run loadbootenv; then " \
184 "echo Loaded environment from ${bootenv};" \
185 "run importbootenv;" \
187 "if test -n $uenvcmd; then " \
188 "echo Running uenvcmd ...;" \
191 "if run loadimage; then " \
195 "spiboot=echo Booting from spi ...; " \
197 "sf probe ${spibusno}:0; " \
198 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
199 "bootz ${loadaddr}\0" \
200 "netboot=echo Booting from network ...; " \
201 "setenv autoload no; " \
203 "tftp ${loadaddr} ${bootfile}; " \
204 "tftp ${fdtaddr} ${fdtfile}; " \
206 "bootz ${loadaddr} - ${fdtaddr}\0" \
207 "ramboot=echo Booting from ramdisk ...; " \
209 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
210 "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
215 #define CONFIG_BOOTCOMMAND \
219 "setenv mmcdev 1; " \
220 "setenv bootpart 1:2; " \
224 /* NS16550 Configuration */
225 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
226 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
227 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
228 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
229 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
230 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
232 #define CONFIG_CMD_EEPROM
233 #define CONFIG_ENV_EEPROM_IS_ON_I2C
234 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
235 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
238 #define CONFIG_POWER_TPS65910
241 #ifndef CONFIG_NOR_BOOT
242 /* Bootcount using the RTC block */
243 #define CONFIG_BOOTCOUNT_LIMIT
244 #define CONFIG_BOOTCOUNT_AM33XX
246 /* USB gadget RNDIS */
248 /* General network SPL, both CPSW and USB gadget RNDIS */
249 #define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"*/
251 #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
254 #define CONFIG_NAND_OMAP_GPMC
255 #define CONFIG_NAND_OMAP_GPMC_PREFETCH
256 #define CONFIG_NAND_OMAP_ELM
257 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
258 #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
259 CONFIG_SYS_NAND_PAGE_SIZE)
260 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
261 #define CONFIG_SYS_NAND_OOBSIZE 64
262 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
263 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
264 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
265 10, 11, 12, 13, 14, 15, 16, 17, \
266 18, 19, 20, 21, 22, 23, 24, 25, \
267 26, 27, 28, 29, 30, 31, 32, 33, \
268 34, 35, 36, 37, 38, 39, 40, 41, \
269 42, 43, 44, 45, 46, 47, 48, 49, \
270 50, 51, 52, 53, 54, 55, 56, 57, }
272 #define CONFIG_SYS_NAND_ECCSIZE 512
273 #define CONFIG_SYS_NAND_ECCBYTES 14
274 #define CONFIG_SYS_NAND_ONFI_DETECTION
275 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
276 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
281 * USB configuration. We enable MUSB support, both for host and for
282 * gadget. We set USB0 as peripheral and USB1 as host, based on the
283 * board schematic and physical port wired to each. Then for host we
284 * add mass storage support and for gadget we add both RNDIS ethernet
287 #define CONFIG_USB_MUSB_DSPS
288 #define CONFIG_USB_MUSB_PIO_ONLY
289 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
290 #define CONFIG_AM335X_USB0
291 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
292 #define CONFIG_AM335X_USB1
293 #define CONFIG_AM335X_USB1_MODE MUSB_OTG
295 #ifdef CONFIG_USB_MUSB_GADGET
296 #define CONFIG_USB_ETHER
297 #define CONFIG_USB_ETH_RNDIS
298 #define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
299 #endif /* CONFIG_USB_MUSB_GADGET */
301 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
302 /* disable host part of MUSB in SPL */
303 /* disable EFI partitions and partition UUID support */
305 * Disable CPSW SPL support so we fit within the 101KiB limit.
310 #define CONFIG_PHY_GIGE
311 #define CONFIG_PHYLIB
312 #define CONFIG_PHY_ADDR 0
313 #define CONFIG_PHY_SMSC
315 #define CONFIG_PHY_ATHEROS
319 #define CONFIG_CMD_NAND
320 #define GPMC_NAND_ECC_LP_x8_LAYOUT 1
321 #if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT)
322 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
323 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
324 "128k(SPL.backup1)," \
325 "128k(SPL.backup2)," \
326 "128k(SPL.backup3)," \
329 #define CONFIG_ENV_IS_NOWHERE
333 #endif /* ! __CONFIG_BALTOS_H */