Globally remove most CONFIG_SPL_BUILD tests from config headers
[platform/kernel/u-boot.git] / include / configs / baltos.h
1 /*
2  * am335x_evm.h
3  *
4  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
5  *
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.
9  *
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.
14  */
15
16 #ifndef __CONFIG_BALTOS_H
17 #define __CONFIG_BALTOS_H
18
19 #include <linux/sizes.h>
20 #include <configs/ti_am335x_common.h>
21
22 /* Clock Defines */
23 #define V_OSCK                          24000000  /* Clock output from T2 */
24 #define V_SCLK                          (V_OSCK)
25
26 /* FIT support */
27 #define CONFIG_SYS_BOOTM_LEN         SZ_64M
28
29 #ifdef CONFIG_MTD_RAW_NAND
30
31 #define NANDARGS \
32         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
33         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
34         "nandargs=setenv bootargs console=${console} " \
35                 "${optargs} " \
36                 "${mtdparts} " \
37                 "root=${nandroot} " \
38                 "rootfstype=${nandrootfstype}\0" \
39         "nandroot=ubi0:rootfs rw ubi.mtd=5\0" \
40         "nandrootfstype=ubifs rootwait\0" \
41         "nandboot=echo Booting from nand ...; " \
42                 "run nandargs; " \
43                 "setenv loadaddr 0x84000000; " \
44                 "ubi part UBI; " \
45                 "ubifsmount ubi0:kernel; " \
46                 "ubifsload $loadaddr kernel-fit.itb;" \
47                 "ubifsumount; " \
48                 "bootm ${loadaddr}#conf${board_name}; " \
49                 "if test $? -ne 0; then echo Using default FIT config; " \
50                 "bootm ${loadaddr}; fi;\0"
51 #else
52 #define NANDARGS ""
53 #endif
54
55 #define CONFIG_EXTRA_ENV_SETTINGS \
56         DEFAULT_LINUX_BOOT_ENV \
57         "boot_fdt=try\0" \
58         "bootpart=0:2\0" \
59         "bootdir=/boot\0" \
60         "bootfile=zImage\0" \
61         "fdtfile=undefined\0" \
62         "console=ttyO0,115200n8\0" \
63         "partitions=" \
64                 "uuid_disk=${uuid_gpt_disk};" \
65                 "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
66         "optargs=\0" \
67         "mmcdev=0\0" \
68         "mmcroot=/dev/mmcblk0p2 ro\0" \
69         "usbroot=/dev/sda2 ro\0" \
70         "mmcrootfstype=ext4 rootwait\0" \
71         "usbrootfstype=ext4 rootwait\0" \
72         "rootpath=/export/rootfs\0" \
73         "nfsopts=nolock\0" \
74         "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
75                 "::off\0" \
76         "ramroot=/dev/ram0 rw\0" \
77         "ramrootfstype=ext2\0" \
78         "mmcargs=setenv bootargs console=${console} " \
79                 "${optargs} " \
80                 "${mtdparts} " \
81                 "root=${mmcroot} " \
82                 "rootfstype=${mmcrootfstype}\0" \
83         "usbargs=setenv bootargs console=${console} " \
84                 "${optargs} " \
85                 "${mtdparts} " \
86                 "root=${usbroot} " \
87                 "rootfstype=${usbrootfstype}\0" \
88         "spiroot=/dev/mtdblock4 rw\0" \
89         "spirootfstype=jffs2\0" \
90         "spisrcaddr=0xe0000\0" \
91         "spiimgsize=0x362000\0" \
92         "spibusno=0\0" \
93         "spiargs=setenv bootargs console=${console} " \
94                 "${optargs} " \
95                 "root=${spiroot} " \
96                 "rootfstype=${spirootfstype}\0" \
97         "netargs=setenv bootargs console=${console} " \
98                 "${optargs} " \
99                 "root=/dev/nfs " \
100                 "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
101                 "ip=dhcp\0" \
102         "bootenv=uEnv.txt\0" \
103         "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
104         "usbloadbootenv=load usb 0:1 ${loadaddr} ${bootenv}\0" \
105         "importbootenv=echo Importing environment from mmc ...; " \
106                 "env import -t $loadaddr $filesize\0" \
107         "usbimportbootenv=echo Importing environment from USB ...; " \
108                 "env import -t $loadaddr $filesize\0" \
109         "ramargs=setenv bootargs console=${console} " \
110                 "${optargs} " \
111                 "root=${ramroot} " \
112                 "rootfstype=${ramrootfstype}\0" \
113         "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
114         "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
115         "usbloadimage=load usb 0:1 ${loadaddr} kernel-fit.itb\0" \
116         "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
117         "usbloados=run usbargs; " \
118                 "bootm ${loadaddr}#conf${board_name}; " \
119                 "if test $? -ne 0; then " \
120                         "echo Using default FIT configuration; " \
121                         "bootm ${loadaddr}; " \
122                 "fi;\0" \
123         "mmcloados=run mmcargs; " \
124                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
125                         "if run loadfdt; then " \
126                                 "bootz ${loadaddr} - ${fdtaddr}; " \
127                         "else " \
128                                 "if test ${boot_fdt} = try; then " \
129                                         "bootz; " \
130                                 "else " \
131                                         "echo WARN: Cannot load the DT; " \
132                                 "fi; " \
133                         "fi; " \
134                 "else " \
135                         "bootz; " \
136                 "fi;\0" \
137         "usbboot=usb reset; " \
138                 "if usb storage; then " \
139                         "echo USB drive found;" \
140                         "if run usbloadbootenv; then " \
141                                 "echo Loaded environment from ${bootenv};" \
142                                 "run usbimportbootenv;" \
143                         "fi;" \
144                         "if test -n $uenvcmd; then " \
145                                 "echo Running uenvcmd ...;" \
146                                 "run uenvcmd;" \
147                         "fi;" \
148                         "if run usbloadimage; then " \
149                                 "run usbloados;" \
150                         "fi;" \
151                 "fi;\0" \
152         "mmcboot=mmc dev ${mmcdev}; " \
153                 "if mmc rescan; then " \
154                         "echo SD/MMC found on device ${mmcdev};" \
155                         "if run loadbootenv; then " \
156                                 "echo Loaded environment from ${bootenv};" \
157                                 "run importbootenv;" \
158                         "fi;" \
159                         "if test -n $uenvcmd; then " \
160                                 "echo Running uenvcmd ...;" \
161                                 "run uenvcmd;" \
162                         "fi;" \
163                         "if run loadimage; then " \
164                                 "run mmcloados;" \
165                         "fi;" \
166                 "fi;\0" \
167         "spiboot=echo Booting from spi ...; " \
168                 "run spiargs; " \
169                 "sf probe ${spibusno}:0; " \
170                 "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
171                 "bootz ${loadaddr}\0" \
172         "netboot=echo Booting from network ...; " \
173                 "setenv autoload no; " \
174                 "dhcp; " \
175                 "tftp ${loadaddr} ${bootfile}; " \
176                 "tftp ${fdtaddr} ${fdtfile}; " \
177                 "run netargs; " \
178                 "bootz ${loadaddr} - ${fdtaddr}\0" \
179         "ramboot=echo Booting from ramdisk ...; " \
180                 "run ramargs; " \
181                 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
182         "findfdt=setenv fdtfile am335x-baltos.dtb\0" \
183         NANDARGS
184         /*DFUARGS*/
185
186 /* NS16550 Configuration */
187 #define CONFIG_SYS_NS16550_COM1         0x44e09000      /* Base EVM has UART0 */
188 #define CONFIG_SYS_NS16550_COM2         0x48022000      /* UART1 */
189 #define CONFIG_SYS_NS16550_COM3         0x48024000      /* UART2 */
190 #define CONFIG_SYS_NS16550_COM4         0x481a6000      /* UART3 */
191 #define CONFIG_SYS_NS16550_COM5         0x481a8000      /* UART4 */
192 #define CONFIG_SYS_NS16550_COM6         0x481aa000      /* UART5 */
193
194 /* PMIC support */
195 #define CONFIG_POWER_TPS65910
196
197 /* SPL */
198 #ifndef CONFIG_NOR_BOOT
199
200 #ifdef CONFIG_MTD_RAW_NAND
201 #define CONFIG_SYS_NAND_ECCPOS          { 2, 3, 4, 5, 6, 7, 8, 9, \
202                                          10, 11, 12, 13, 14, 15, 16, 17, \
203                                          18, 19, 20, 21, 22, 23, 24, 25, \
204                                          26, 27, 28, 29, 30, 31, 32, 33, \
205                                          34, 35, 36, 37, 38, 39, 40, 41, \
206                                          42, 43, 44, 45, 46, 47, 48, 49, \
207                                          50, 51, 52, 53, 54, 55, 56, 57, }
208
209 #define CONFIG_SYS_NAND_ECCSIZE         512
210 #define CONFIG_SYS_NAND_ECCBYTES        14
211 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_TEXT_BASE
212 #endif
213 #endif
214
215 /* NAND support */
216 #ifdef CONFIG_MTD_RAW_NAND
217 #define GPMC_NAND_ECC_LP_x8_LAYOUT      1
218 #endif
219
220 #endif  /* ! __CONFIG_BALTOS_H */