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_MTD_PARTITIONS
39 #define CONFIG_MTD_DEVICE
41 /* I2C configuration */
44 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00080000
45 #ifdef CONFIG_SPL_OS_BOOT
46 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */
49 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
50 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
51 "nandargs=setenv bootargs console=${console} " \
55 "rootfstype=${nandrootfstype}\0" \
56 "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
57 "nandrootfstype=ubifs rootwait=1\0" \
58 "nandboot=echo Booting from nand ...; " \
60 "setenv loadaddr 0x84000000; " \
62 "ubifsmount ubi0:kernel; " \
63 "ubifsload $loadaddr kernel-fit.itb;" \
65 "bootm ${loadaddr}#conf${board_name}; " \
66 "if test $? -ne 0; then echo Using default FIT config; " \
67 "bootm ${loadaddr}; fi;\0"
72 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
74 #ifndef CONFIG_SPL_BUILD
75 #define CONFIG_EXTRA_ENV_SETTINGS \
76 DEFAULT_LINUX_BOOT_ENV \
81 "fdtfile=undefined\0" \
82 "console=ttyO0,115200n8\0" \
84 "uuid_disk=${uuid_gpt_disk};" \
85 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
88 "mmcroot=/dev/mmcblk0p2 ro\0" \
89 "usbroot=/dev/sda2 ro\0" \
90 "mmcrootfstype=ext4 rootwait\0" \
91 "usbrootfstype=ext4 rootwait\0" \
92 "rootpath=/export/rootfs\0" \
94 "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
96 "ramroot=/dev/ram0 rw\0" \
97 "ramrootfstype=ext2\0" \
98 "mmcargs=setenv bootargs console=${console} " \
102 "rootfstype=${mmcrootfstype}\0" \
103 "usbargs=setenv bootargs console=${console} " \
107 "rootfstype=${usbrootfstype}\0" \
108 "spiroot=/dev/mtdblock4 rw\0" \
109 "spirootfstype=jffs2\0" \
110 "spisrcaddr=0xe0000\0" \
111 "spiimgsize=0x362000\0" \
113 "spiargs=setenv bootargs console=${console} " \
116 "rootfstype=${spirootfstype}\0" \
117 "netargs=setenv bootargs console=${console} " \
120 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
122 "bootenv=uEnv.txt\0" \
123 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
124 "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
125 "importbootenv=echo Importing environment from mmc ...; " \
126 "env import -t $loadaddr $filesize\0" \
127 "usbimportbootenv=echo Importing environment from USB ...; " \
128 "env import -t $loadaddr $filesize\0" \
129 "ramargs=setenv bootargs console=${console} " \
132 "rootfstype=${ramrootfstype}\0" \
133 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
134 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
135 "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
136 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
137 "usbloados=run usbargs; " \
138 "bootm ${loadaddr}#conf${board_name}; " \
139 "if test $? -ne 0; then " \
140 "echo Using default FIT configuration; " \
141 "bootm ${loadaddr}; " \
143 "mmcloados=run mmcargs; " \
144 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
145 "if run loadfdt; then " \
146 "bootz ${loadaddr} - ${fdtaddr}; " \
148 "if test ${boot_fdt} = try; then " \
151 "echo WARN: Cannot load the DT; " \
157 "usbboot=usb reset; " \
158 "if usb storage; then " \
159 "echo USB drive found;" \
160 "if run usbloadbootenv; then " \
161 "echo Loaded environment from ${bootenv};" \
162 "run usbimportbootenv;" \
164 "if test -n $uenvcmd; then " \
165 "echo Running uenvcmd ...;" \
168 "if run usbloadimage; then " \
172 "mmcboot=mmc dev ${mmcdev}; " \
173 "if mmc rescan; then " \
174 "echo SD/MMC found on device ${mmcdev};" \
175 "if run loadbootenv; then " \
176 "echo Loaded environment from ${bootenv};" \
177 "run importbootenv;" \
179 "if test -n $uenvcmd; then " \
180 "echo Running uenvcmd ...;" \
183 "if run loadimage; then " \
187 "spiboot=echo Booting from spi ...; " \
189 "sf probe ${spibusno}:0; " \
190 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
191 "bootz ${loadaddr}\0" \
192 "netboot=echo Booting from network ...; " \
193 "setenv autoload no; " \
195 "tftp ${loadaddr} ${bootfile}; " \
196 "tftp ${fdtaddr} ${fdtfile}; " \
198 "bootz ${loadaddr} - ${fdtaddr}\0" \
199 "ramboot=echo Booting from ramdisk ...; " \
201 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
202 "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
207 #define CONFIG_BOOTCOMMAND \
211 "setenv mmcdev 1; " \
212 "setenv bootpart 1:2; " \
216 /* NS16550 Configuration */
217 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
218 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
219 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
220 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
221 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
222 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
224 #define CONFIG_ENV_EEPROM_IS_ON_I2C
225 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
226 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
229 #define CONFIG_POWER_TPS65910
232 #ifndef CONFIG_NOR_BOOT
234 /* USB gadget RNDIS */
236 /* General network SPL, both CPSW and USB gadget RNDIS */
237 #define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"*/
240 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
241 #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
242 CONFIG_SYS_NAND_PAGE_SIZE)
243 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
244 #define CONFIG_SYS_NAND_OOBSIZE 64
245 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
246 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
247 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
248 10, 11, 12, 13, 14, 15, 16, 17, \
249 18, 19, 20, 21, 22, 23, 24, 25, \
250 26, 27, 28, 29, 30, 31, 32, 33, \
251 34, 35, 36, 37, 38, 39, 40, 41, \
252 42, 43, 44, 45, 46, 47, 48, 49, \
253 50, 51, 52, 53, 54, 55, 56, 57, }
255 #define CONFIG_SYS_NAND_ECCSIZE 512
256 #define CONFIG_SYS_NAND_ECCBYTES 14
257 #define CONFIG_SYS_NAND_ONFI_DETECTION
258 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
259 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
264 * USB configuration. We enable MUSB support, both for host and for
265 * gadget. We set USB0 as peripheral and USB1 as host, based on the
266 * board schematic and physical port wired to each. Then for host we
267 * add mass storage support and for gadget we add both RNDIS ethernet
270 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
271 #define CONFIG_AM335X_USB0
272 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
273 #define CONFIG_AM335X_USB1
274 #define CONFIG_AM335X_USB1_MODE MUSB_OTG
276 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USB_ETHER)
277 /* disable host part of MUSB in SPL */
278 /* disable EFI partitions and partition UUID support */
280 * Disable CPSW SPL support so we fit within the 101KiB limit.
285 #define CONFIG_PHY_SMSC
287 #define CONFIG_PHY_ATHEROS
291 #define GPMC_NAND_ECC_LP_x8_LAYOUT 1
294 #endif /* ! __CONFIG_BALTOS_H */