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)
29 #define CONFIG_SYS_BOOTM_LEN SZ_64M
31 #ifdef CONFIG_MTD_RAW_NAND
34 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
35 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
36 "nandargs=setenv bootargs console=${console} " \
40 "rootfstype=${nandrootfstype}\0" \
41 "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
42 "nandrootfstype=ubifs rootwait=1\0" \
43 "nandboot=echo Booting from nand ...; " \
45 "setenv loadaddr 0x84000000; " \
47 "ubifsmount ubi0:kernel; " \
48 "ubifsload $loadaddr kernel-fit.itb;" \
50 "bootm ${loadaddr}#conf${board_name}; " \
51 "if test $? -ne 0; then echo Using default FIT config; " \
52 "bootm ${loadaddr}; fi;\0"
57 #ifndef CONFIG_SPL_BUILD
58 #define CONFIG_EXTRA_ENV_SETTINGS \
59 DEFAULT_LINUX_BOOT_ENV \
64 "fdtfile=undefined\0" \
65 "console=ttyO0,115200n8\0" \
67 "uuid_disk=${uuid_gpt_disk};" \
68 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
71 "mmcroot=/dev/mmcblk0p2 ro\0" \
72 "usbroot=/dev/sda2 ro\0" \
73 "mmcrootfstype=ext4 rootwait\0" \
74 "usbrootfstype=ext4 rootwait\0" \
75 "rootpath=/export/rootfs\0" \
77 "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
79 "ramroot=/dev/ram0 rw\0" \
80 "ramrootfstype=ext2\0" \
81 "mmcargs=setenv bootargs console=${console} " \
85 "rootfstype=${mmcrootfstype}\0" \
86 "usbargs=setenv bootargs console=${console} " \
90 "rootfstype=${usbrootfstype}\0" \
91 "spiroot=/dev/mtdblock4 rw\0" \
92 "spirootfstype=jffs2\0" \
93 "spisrcaddr=0xe0000\0" \
94 "spiimgsize=0x362000\0" \
96 "spiargs=setenv bootargs console=${console} " \
99 "rootfstype=${spirootfstype}\0" \
100 "netargs=setenv bootargs console=${console} " \
103 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
105 "bootenv=uEnv.txt\0" \
106 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
107 "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
108 "importbootenv=echo Importing environment from mmc ...; " \
109 "env import -t $loadaddr $filesize\0" \
110 "usbimportbootenv=echo Importing environment from USB ...; " \
111 "env import -t $loadaddr $filesize\0" \
112 "ramargs=setenv bootargs console=${console} " \
115 "rootfstype=${ramrootfstype}\0" \
116 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
117 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
118 "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
119 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
120 "usbloados=run usbargs; " \
121 "bootm ${loadaddr}#conf${board_name}; " \
122 "if test $? -ne 0; then " \
123 "echo Using default FIT configuration; " \
124 "bootm ${loadaddr}; " \
126 "mmcloados=run mmcargs; " \
127 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
128 "if run loadfdt; then " \
129 "bootz ${loadaddr} - ${fdtaddr}; " \
131 "if test ${boot_fdt} = try; then " \
134 "echo WARN: Cannot load the DT; " \
140 "usbboot=usb reset; " \
141 "if usb storage; then " \
142 "echo USB drive found;" \
143 "if run usbloadbootenv; then " \
144 "echo Loaded environment from ${bootenv};" \
145 "run usbimportbootenv;" \
147 "if test -n $uenvcmd; then " \
148 "echo Running uenvcmd ...;" \
151 "if run usbloadimage; then " \
155 "mmcboot=mmc dev ${mmcdev}; " \
156 "if mmc rescan; then " \
157 "echo SD/MMC found on device ${mmcdev};" \
158 "if run loadbootenv; then " \
159 "echo Loaded environment from ${bootenv};" \
160 "run importbootenv;" \
162 "if test -n $uenvcmd; then " \
163 "echo Running uenvcmd ...;" \
166 "if run loadimage; then " \
170 "spiboot=echo Booting from spi ...; " \
172 "sf probe ${spibusno}:0; " \
173 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
174 "bootz ${loadaddr}\0" \
175 "netboot=echo Booting from network ...; " \
176 "setenv autoload no; " \
178 "tftp ${loadaddr} ${bootfile}; " \
179 "tftp ${fdtaddr} ${fdtfile}; " \
181 "bootz ${loadaddr} - ${fdtaddr}\0" \
182 "ramboot=echo Booting from ramdisk ...; " \
184 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
185 "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
190 #define CONFIG_BOOTCOMMAND \
194 "setenv mmcdev 1; " \
195 "setenv bootpart 1:2; " \
199 /* NS16550 Configuration */
200 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
201 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
202 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
203 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
204 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
205 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
207 #define CONFIG_ENV_EEPROM_IS_ON_I2C
208 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
209 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
212 #define CONFIG_POWER_TPS65910
215 #ifndef CONFIG_NOR_BOOT
217 #ifdef CONFIG_MTD_RAW_NAND
218 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
219 #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
220 CONFIG_SYS_NAND_PAGE_SIZE)
221 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
222 #define CONFIG_SYS_NAND_OOBSIZE 64
223 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
224 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
225 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
226 10, 11, 12, 13, 14, 15, 16, 17, \
227 18, 19, 20, 21, 22, 23, 24, 25, \
228 26, 27, 28, 29, 30, 31, 32, 33, \
229 34, 35, 36, 37, 38, 39, 40, 41, \
230 42, 43, 44, 45, 46, 47, 48, 49, \
231 50, 51, 52, 53, 54, 55, 56, 57, }
233 #define CONFIG_SYS_NAND_ECCSIZE 512
234 #define CONFIG_SYS_NAND_ECCBYTES 14
235 #define CONFIG_SYS_NAND_ONFI_DETECTION
236 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
237 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
242 * USB configuration. We enable MUSB support, both for host and for
243 * gadget. We set USB0 as peripheral and USB1 as host, based on the
244 * board schematic and physical port wired to each. Then for host we
245 * add mass storage support and for gadget we add both RNDIS ethernet
248 #define CONFIG_AM335X_USB0
249 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
250 #define CONFIG_AM335X_USB1
251 #define CONFIG_AM335X_USB1_MODE MUSB_OTG
254 #ifdef CONFIG_MTD_RAW_NAND
255 #define GPMC_NAND_ECC_LP_x8_LAYOUT 1
258 #endif /* ! __CONFIG_BALTOS_H */