am3517_evm: Remove unused comments/code
[platform/kernel/u-boot.git] / include / configs / omap3_logic.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
4  *      Peter Barada <peter.barada@logicpd.com>
5  *
6  * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
7  * reference boards.
8  */
9
10 #ifndef __CONFIG_H
11 #define __CONFIG_H
12
13 /* High Level Configuration Options */
14
15 #include <configs/ti_omap3_common.h>
16
17 /*
18  * We are only ever GP parts and will utilize all of the "downloaded image"
19  * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
20  * order to allow for BCH8 to fit in.
21  */
22
23 /* Hardware drivers */
24
25 /* I2C */
26
27 #ifdef CONFIG_SPL_BUILD
28 #undef CONFIG_USB_EHCI_OMAP
29 #endif
30
31 /* Board NAND Info. */
32 #ifdef CONFIG_MTD_RAW_NAND
33 #define CONFIG_SYS_MAX_NAND_DEVICE      1         /* Max number of */
34                                                   /* NAND devices */
35 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
36 #define CONFIG_SYS_NAND_PAGE_COUNT      64
37 #define CONFIG_SYS_NAND_PAGE_SIZE       2048
38 #define CONFIG_SYS_NAND_OOBSIZE         64
39 #define CONFIG_SYS_NAND_BLOCK_SIZE      (128 * 1024)
40 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   NAND_LARGE_BADBLOCK_POS
41 #define CONFIG_SYS_NAND_ECCPOS          {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
42                                          13, 14, 16, 17, 18, 19, 20, 21, 22, \
43                                          23, 24, 25, 26, 27, 28, 30, 31, 32, \
44                                          33, 34, 35, 36, 37, 38, 39, 40, 41, \
45                                          42, 44, 45, 46, 47, 48, 49, 50, 51, \
46                                          52, 53, 54, 55, 56}
47
48 #define CONFIG_SYS_NAND_ECCSIZE         512
49 #define CONFIG_SYS_NAND_ECCBYTES        13
50 #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
51 #define CONFIG_SYS_NAND_MAX_OOBFREE     2
52 #define CONFIG_SYS_NAND_MAX_ECCPOS      56
53 #endif
54
55 /* Environment information */
56
57 #define CONFIG_EXTRA_ENV_SETTINGS \
58         DEFAULT_LINUX_BOOT_ENV \
59         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0"    \
60         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
61         "mmcdev=0\0" \
62         "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
63         "mmcrootfstype=ext4 rootwait\0" \
64         "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
65         "nandrootfstype=ubifs rootwait\0" \
66         "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
67                         "if run loadbootscript; then " \
68                                 "run bootscript; " \
69                         "else " \
70                                 "run defaultboot;" \
71                         "fi; " \
72                 "else run defaultboot; fi\0" \
73         "defaultboot=run mmcramboot\0" \
74         "consoledevice=ttyS0\0" \
75         "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
76         "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
77         "rotation=0\0" \
78         "vrfb_arg=if itest ${rotation} -ne 0; then " \
79                 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
80                 "omapfb.rotate=${rotation}; " \
81                 "fi\0" \
82         "optargs=ignore_loglevel early_printk no_console_suspend\0" \
83         "common_bootargs=run setconsole; setenv bootargs " \
84                 "${bootargs} "\
85                 "console=${console} " \
86                 "${mtdparts} "\
87                 "${optargs}; " \
88                 "run vrfb_arg\0" \
89         "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
90         "bootscript=echo 'Running bootscript from mmc ...'; " \
91                 "source ${loadaddr}\0" \
92         "loadimage=mmc rescan; " \
93                 "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
94         "ramdisksize=64000\0" \
95         "ramdiskimage=rootfs.ext2.gz.uboot\0" \
96         "loadramdisk=mmc rescan; " \
97                 "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \
98         "ramargs=setenv bootargs "\
99                 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
100         "mmcargs=setenv bootargs "\
101                 "root=PARTUUID=${uuid} " \
102                 "rootfstype=${mmcrootfstype} rw\0" \
103         "nandargs=setenv bootargs "\
104                 "root=${nandroot} " \
105                 "rootfstype=${nandrootfstype}\0" \
106         "nfsargs=setenv serverip ${tftpserver}; " \
107                 "setenv bootargs root=/dev/nfs " \
108                 "nfsroot=${nfsrootpath} " \
109                 "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
110         "nfsrootpath=/opt/nfs-exports/omap\0" \
111         "autoload=no\0" \
112         "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
113         "loadfdt=mmc rescan; " \
114                 "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
115         "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
116                 "run finduuid; "\
117                 "run mmcargs; " \
118                 "run common_bootargs; " \
119                 "run dump_bootargs; " \
120                 "run loadimage; " \
121                 "run loadfdt;\0 " \
122         "mmcbootz=setenv bootfile zImage; " \
123                 "run mmcbootcommon; "\
124                 "bootz ${loadaddr} - ${fdtaddr}\0" \
125         "mmcboot=setenv bootfile uImage; "\
126                 "run mmcbootcommon; "\
127                 "bootm ${loadaddr} - ${fdtaddr}\0" \
128         "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \
129                 "run ramargs; " \
130                 "run common_bootargs; " \
131                 "run dump_bootargs; " \
132                 "run loadimage; " \
133                 "run loadfdt; " \
134                 "run loadramdisk\0" \
135         "mmcramboot=setenv bootfile uImage; " \
136                 "run mmcrambootcommon; " \
137                 "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
138         "mmcrambootz=setenv bootfile zImage; " \
139                 "run mmcrambootcommon; " \
140                 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
141         "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
142                 "run ramargs; " \
143                 "run common_bootargs; " \
144                 "run dump_bootargs; " \
145                 "tftpboot ${loadaddr} ${zimage}; " \
146                 "tftpboot ${rdaddr} ${ramdiskimage}; " \
147                 "bootm ${loadaddr} ${rdaddr}\0" \
148         "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \
149                 "dhcp;" \
150                 "run nfsargs;" \
151                 "run common_bootargs;" \
152                 "run dump_bootargs;" \
153                 "tftpboot $loadaddr zImage;" \
154                 "bootz $loadaddr\0" \
155         "nandbootcommon=echo 'Booting kernel from NAND...';" \
156                 "run nandargs;" \
157                 "run common_bootargs;" \
158                 "run dump_bootargs;" \
159                 "nand read ${loadaddr} kernel;" \
160                 "nand read ${fdtaddr} spl-os;\0" \
161         "nandbootz=run nandbootcommon; "\
162                 "bootz ${loadaddr} - ${fdtaddr}\0"\
163         "nandboot=run nandbootcommon; "\
164                 "bootm ${loadaddr} - ${fdtaddr}\0"\
165
166 #define CONFIG_BOOTCOMMAND \
167         "run autoboot"
168
169 /* Miscellaneous configurable options */
170
171 /* memtest works on */
172
173 /* FLASH and environment organization */
174
175 /* **** PISMO SUPPORT *** */
176 #if defined(CONFIG_CMD_NAND)
177 #define CONFIG_SYS_FLASH_BASE           0x10000000
178 #endif
179
180 #define CONFIG_SYS_MAX_FLASH_SECT       256
181 #define CONFIG_SYS_MAX_FLASH_BANKS      1
182 #define CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
183 #define CONFIG_SYS_FLASH_SIZE           0x4000000
184
185 /* Monitor at start of flash */
186 #define CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_FLASH_BASE
187
188 #define CONFIG_SYS_ENV_SECT_SIZE        (128 << 10)     /* 128 KiB */
189
190 /* Defines for SPL */
191
192 /* NAND: SPL falcon mode configs */
193 #ifdef CONFIG_SPL_OS_BOOT
194 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
195 #endif
196
197 #endif /* __CONFIG_H */