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 MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */
23 #define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM
26 #define V_OSCK 24000000 /* Clock output from T2 */
27 #define V_SCLK (V_OSCK)
29 /* Custom script for NOR */
30 #define CONFIG_SYS_LDSCRIPT "board/vscom/baltos/u-boot.lds"
32 /* Always 128 KiB env size */
33 #define CONFIG_ENV_SIZE (128 << 10)
36 #define CONFIG_SYS_BOOTM_LEN SZ_64M
39 #define CONFIG_CMD_MTDPARTS
40 #define CONFIG_MTD_PARTITIONS
41 #define CONFIG_MTD_DEVICE
44 #define CONFIG_CMD_UBIFS
46 /* I2C configuration */
47 #undef CONFIG_SYS_OMAP24_I2C_SPEED
48 #define CONFIG_SYS_OMAP24_I2C_SPEED 1000
51 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00080000
52 #ifdef CONFIG_SPL_OS_BOOT
53 #define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os parameters */
54 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */
55 #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
58 "mtdids=" MTDIDS_DEFAULT "\0" \
59 "mtdparts=" MTDPARTS_DEFAULT "\0" \
60 "nandargs=setenv bootargs console=${console} " \
64 "rootfstype=${nandrootfstype}\0" \
65 "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
66 "nandrootfstype=ubifs rootwait=1\0" \
67 "nandboot=echo Booting from nand ...; " \
69 "setenv loadaddr 0x84000000; " \
71 "ubifsmount ubi0:kernel; " \
72 "ubifsload $loadaddr kernel-fit.itb;" \
74 "bootm ${loadaddr}#conf${board_name}; " \
75 "if test $? -ne 0; then echo Using default FIT config; " \
76 "bootm ${loadaddr}; fi;\0"
81 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
83 #ifndef CONFIG_SPL_BUILD
84 #define CONFIG_EXTRA_ENV_SETTINGS \
85 DEFAULT_LINUX_BOOT_ENV \
90 "fdtfile=undefined\0" \
91 "console=ttyO0,115200n8\0" \
93 "uuid_disk=${uuid_gpt_disk};" \
94 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
97 "mmcroot=/dev/mmcblk0p2 ro\0" \
98 "usbroot=/dev/sda2 ro\0" \
99 "mmcrootfstype=ext4 rootwait\0" \
100 "usbrootfstype=ext4 rootwait\0" \
101 "rootpath=/export/rootfs\0" \
103 "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
105 "ramroot=/dev/ram0 rw\0" \
106 "ramrootfstype=ext2\0" \
107 "mmcargs=setenv bootargs console=${console} " \
111 "rootfstype=${mmcrootfstype}\0" \
112 "usbargs=setenv bootargs console=${console} " \
116 "rootfstype=${usbrootfstype}\0" \
117 "spiroot=/dev/mtdblock4 rw\0" \
118 "spirootfstype=jffs2\0" \
119 "spisrcaddr=0xe0000\0" \
120 "spiimgsize=0x362000\0" \
122 "spiargs=setenv bootargs console=${console} " \
125 "rootfstype=${spirootfstype}\0" \
126 "netargs=setenv bootargs console=${console} " \
129 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
131 "bootenv=uEnv.txt\0" \
132 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
133 "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
134 "importbootenv=echo Importing environment from mmc ...; " \
135 "env import -t $loadaddr $filesize\0" \
136 "usbimportbootenv=echo Importing environment from USB ...; " \
137 "env import -t $loadaddr $filesize\0" \
138 "ramargs=setenv bootargs console=${console} " \
141 "rootfstype=${ramrootfstype}\0" \
142 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
143 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
144 "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
145 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
146 "usbloados=run usbargs; " \
147 "bootm ${loadaddr}#conf${board_name}; " \
148 "if test $? -ne 0; then " \
149 "echo Using default FIT configuration; " \
150 "bootm ${loadaddr}; " \
152 "mmcloados=run mmcargs; " \
153 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
154 "if run loadfdt; then " \
155 "bootz ${loadaddr} - ${fdtaddr}; " \
157 "if test ${boot_fdt} = try; then " \
160 "echo WARN: Cannot load the DT; " \
166 "usbboot=usb reset; " \
167 "if usb storage; then " \
168 "echo USB drive found;" \
169 "if run usbloadbootenv; then " \
170 "echo Loaded environment from ${bootenv};" \
171 "run usbimportbootenv;" \
173 "if test -n $uenvcmd; then " \
174 "echo Running uenvcmd ...;" \
177 "if run usbloadimage; then " \
181 "mmcboot=mmc dev ${mmcdev}; " \
182 "if mmc rescan; then " \
183 "echo SD/MMC found on device ${mmcdev};" \
184 "if run loadbootenv; then " \
185 "echo Loaded environment from ${bootenv};" \
186 "run importbootenv;" \
188 "if test -n $uenvcmd; then " \
189 "echo Running uenvcmd ...;" \
192 "if run loadimage; then " \
196 "spiboot=echo Booting from spi ...; " \
198 "sf probe ${spibusno}:0; " \
199 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
200 "bootz ${loadaddr}\0" \
201 "netboot=echo Booting from network ...; " \
202 "setenv autoload no; " \
204 "tftp ${loadaddr} ${bootfile}; " \
205 "tftp ${fdtaddr} ${fdtfile}; " \
207 "bootz ${loadaddr} - ${fdtaddr}\0" \
208 "ramboot=echo Booting from ramdisk ...; " \
210 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
211 "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
216 #define CONFIG_BOOTCOMMAND \
220 "setenv mmcdev 1; " \
221 "setenv bootpart 1:2; " \
225 /* NS16550 Configuration */
226 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
227 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
228 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
229 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
230 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
231 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
232 #define CONFIG_BAUDRATE 115200
234 #define CONFIG_CMD_EEPROM
235 #define CONFIG_ENV_EEPROM_IS_ON_I2C
236 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
237 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
240 #define CONFIG_POWER_TPS65910
243 #ifndef CONFIG_NOR_BOOT
244 /* Bootcount using the RTC block */
245 #define CONFIG_BOOTCOUNT_LIMIT
246 #define CONFIG_BOOTCOUNT_AM33XX
248 /* USB gadget RNDIS */
250 /* General network SPL, both CPSW and USB gadget RNDIS */
251 #define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"*/
253 #define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
256 #define CONFIG_NAND_OMAP_GPMC
257 #define CONFIG_NAND_OMAP_GPMC_PREFETCH
258 #define CONFIG_NAND_OMAP_ELM
259 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
260 #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
261 CONFIG_SYS_NAND_PAGE_SIZE)
262 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
263 #define CONFIG_SYS_NAND_OOBSIZE 64
264 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
265 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
266 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
267 10, 11, 12, 13, 14, 15, 16, 17, \
268 18, 19, 20, 21, 22, 23, 24, 25, \
269 26, 27, 28, 29, 30, 31, 32, 33, \
270 34, 35, 36, 37, 38, 39, 40, 41, \
271 42, 43, 44, 45, 46, 47, 48, 49, \
272 50, 51, 52, 53, 54, 55, 56, 57, }
274 #define CONFIG_SYS_NAND_ECCSIZE 512
275 #define CONFIG_SYS_NAND_ECCBYTES 14
276 #define CONFIG_SYS_NAND_ONFI_DETECTION
277 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
278 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
283 * USB configuration. We enable MUSB support, both for host and for
284 * gadget. We set USB0 as peripheral and USB1 as host, based on the
285 * board schematic and physical port wired to each. Then for host we
286 * add mass storage support and for gadget we add both RNDIS ethernet
289 #define CONFIG_USB_MUSB_DSPS
290 #define CONFIG_USB_MUSB_PIO_ONLY
291 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
292 #define CONFIG_AM335X_USB0
293 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
294 #define CONFIG_AM335X_USB1
295 #define CONFIG_AM335X_USB1_MODE MUSB_OTG
297 #ifdef CONFIG_USB_MUSB_GADGET
298 #define CONFIG_USB_ETHER
299 #define CONFIG_USB_ETH_RNDIS
300 #define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"
301 #endif /* CONFIG_USB_MUSB_GADGET */
303 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
304 /* disable host part of MUSB in SPL */
305 /* disable EFI partitions and partition UUID support */
307 * Disable CPSW SPL support so we fit within the 101KiB limit.
312 #define CONFIG_PHY_GIGE
313 #define CONFIG_PHYLIB
314 #define CONFIG_PHY_ADDR 0
315 #define CONFIG_PHY_SMSC
317 #define CONFIG_PHY_ATHEROS
321 #define CONFIG_CMD_NAND
322 #define GPMC_NAND_ECC_LP_x8_LAYOUT 1
323 #if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT)
324 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
325 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \
326 "128k(SPL.backup1)," \
327 "128k(SPL.backup2)," \
328 "128k(SPL.backup3)," \
331 #define CONFIG_ENV_IS_NOWHERE
335 #endif /* ! __CONFIG_BALTOS_H */