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