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