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>
23 #define V_OSCK 24000000 /* Clock output from T2 */
24 #define V_SCLK (V_OSCK)
28 #ifdef CONFIG_MTD_RAW_NAND
31 "nandargs=setenv bootargs console=${console} " \
35 "rootfstype=${nandrootfstype}\0" \
36 "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
37 "nandrootfstype=ubifs rootwait\0" \
38 "nandboot=echo Booting from nand ...; " \
40 "setenv loadaddr 0x84000000; " \
42 "ubifsmount ubi0:kernel; " \
43 "ubifsload $loadaddr kernel-fit.itb;" \
45 "bootm ${loadaddr}#conf${board_name}; " \
46 "if test $? -ne 0; then echo Using default FIT config; " \
47 "bootm ${loadaddr}; fi;\0"
52 #define CONFIG_EXTRA_ENV_SETTINGS \
53 DEFAULT_LINUX_BOOT_ENV \
58 "fdtfile=undefined\0" \
59 "console=ttyO0,115200n8\0" \
61 "uuid_disk=${uuid_gpt_disk};" \
62 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
65 "mmcroot=/dev/mmcblk0p2 ro\0" \
66 "usbroot=/dev/sda2 ro\0" \
67 "mmcrootfstype=ext4 rootwait\0" \
68 "usbrootfstype=ext4 rootwait\0" \
69 "rootpath=/export/rootfs\0" \
71 "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
73 "ramroot=/dev/ram0 rw\0" \
74 "ramrootfstype=ext2\0" \
75 "mmcargs=setenv bootargs console=${console} " \
79 "rootfstype=${mmcrootfstype}\0" \
80 "usbargs=setenv bootargs console=${console} " \
84 "rootfstype=${usbrootfstype}\0" \
85 "spiroot=/dev/mtdblock4 rw\0" \
86 "spirootfstype=jffs2\0" \
87 "spisrcaddr=0xe0000\0" \
88 "spiimgsize=0x362000\0" \
90 "spiargs=setenv bootargs console=${console} " \
93 "rootfstype=${spirootfstype}\0" \
94 "netargs=setenv bootargs console=${console} " \
97 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
99 "bootenv=uEnv.txt\0" \
100 "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
101 "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
102 "importbootenv=echo Importing environment from mmc ...; " \
103 "env import -t $loadaddr $filesize\0" \
104 "usbimportbootenv=echo Importing environment from USB ...; " \
105 "env import -t $loadaddr $filesize\0" \
106 "ramargs=setenv bootargs console=${console} " \
109 "rootfstype=${ramrootfstype}\0" \
110 "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
111 "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
112 "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
113 "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
114 "usbloados=run usbargs; " \
115 "bootm ${loadaddr}#conf${board_name}; " \
116 "if test $? -ne 0; then " \
117 "echo Using default FIT configuration; " \
118 "bootm ${loadaddr}; " \
120 "mmcloados=run mmcargs; " \
121 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
122 "if run loadfdt; then " \
123 "bootz ${loadaddr} - ${fdtaddr}; " \
125 "if test ${boot_fdt} = try; then " \
128 "echo WARN: Cannot load the DT; " \
134 "usbboot=usb reset; " \
135 "if usb storage; then " \
136 "echo USB drive found;" \
137 "if run usbloadbootenv; then " \
138 "echo Loaded environment from ${bootenv};" \
139 "run usbimportbootenv;" \
141 "if test -n $uenvcmd; then " \
142 "echo Running uenvcmd ...;" \
145 "if run usbloadimage; then " \
149 "mmcboot=mmc dev ${mmcdev}; " \
150 "if mmc rescan; then " \
151 "echo SD/MMC found on device ${mmcdev};" \
152 "if run loadbootenv; then " \
153 "echo Loaded environment from ${bootenv};" \
154 "run importbootenv;" \
156 "if test -n $uenvcmd; then " \
157 "echo Running uenvcmd ...;" \
160 "if run loadimage; then " \
164 "spiboot=echo Booting from spi ...; " \
166 "sf probe ${spibusno}:0; " \
167 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
168 "bootz ${loadaddr}\0" \
169 "netboot=echo Booting from network ...; " \
170 "setenv autoload no; " \
172 "tftp ${loadaddr} ${bootfile}; " \
173 "tftp ${fdtaddr} ${fdtfile}; " \
175 "bootz ${loadaddr} - ${fdtaddr}\0" \
176 "ramboot=echo Booting from ramdisk ...; " \
178 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
179 "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
183 /* NS16550 Configuration */
184 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
185 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
186 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
187 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
188 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
189 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
192 #define CONFIG_POWER_TPS65910
195 #ifndef CONFIG_NOR_BOOT
197 #ifdef CONFIG_MTD_RAW_NAND
198 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
199 10, 11, 12, 13, 14, 15, 16, 17, \
200 18, 19, 20, 21, 22, 23, 24, 25, \
201 26, 27, 28, 29, 30, 31, 32, 33, \
202 34, 35, 36, 37, 38, 39, 40, 41, \
203 42, 43, 44, 45, 46, 47, 48, 49, \
204 50, 51, 52, 53, 54, 55, 56, 57, }
206 #define CONFIG_SYS_NAND_ECCSIZE 512
207 #define CONFIG_SYS_NAND_ECCBYTES 14
208 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
213 #ifdef CONFIG_MTD_RAW_NAND
214 #define GPMC_NAND_ECC_LP_x8_LAYOUT 1
217 #endif /* ! __CONFIG_BALTOS_H */