1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2011 Logic Product Development <www.logicpd.com>
4 * Peter Barada <peter.barada@logicpd.com>
6 * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo
13 /* High Level Configuration Options */
15 #include <configs/ti_omap3_common.h>
17 /* Board NAND Info. */
18 #ifdef CONFIG_MTD_RAW_NAND
19 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
21 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
22 #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
23 13, 14, 16, 17, 18, 19, 20, 21, 22, \
24 23, 24, 25, 26, 27, 28, 30, 31, 32, \
25 33, 34, 35, 36, 37, 38, 39, 40, 41, \
26 42, 44, 45, 46, 47, 48, 49, 50, 51, \
29 #define CONFIG_SYS_NAND_ECCSIZE 512
30 #define CONFIG_SYS_NAND_ECCBYTES 13
31 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
32 #define CONFIG_SYS_NAND_MAX_OOBFREE 2
33 #define CONFIG_SYS_NAND_MAX_ECCPOS 56
36 /* Environment information */
38 #define CONFIG_EXTRA_ENV_SETTINGS \
39 DEFAULT_LINUX_BOOT_ENV \
40 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
41 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
43 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
44 "mmcrootfstype=ext4 rootwait\0" \
45 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
46 "nandrootfstype=ubifs rootwait\0" \
47 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
48 "if run loadbootscript; then " \
53 "else run defaultboot; fi\0" \
54 "defaultboot=run mmcramboot\0" \
55 "consoledevice=ttyS0\0" \
56 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
57 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
59 "vrfb_arg=if itest ${rotation} -ne 0; then " \
60 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
61 "omapfb.rotate=${rotation}; " \
63 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
64 "common_bootargs=run setconsole; setenv bootargs " \
66 "console=${console} " \
70 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
71 "bootscript=echo 'Running bootscript from mmc ...'; " \
72 "source ${loadaddr}\0" \
73 "loadimage=mmc rescan; " \
74 "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
75 "ramdisksize=64000\0" \
76 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
77 "loadramdisk=mmc rescan; " \
78 "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \
79 "ramargs=setenv bootargs "\
80 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
81 "mmcargs=setenv bootargs "\
82 "root=PARTUUID=${uuid} " \
83 "rootfstype=${mmcrootfstype} rw\0" \
84 "nandargs=setenv bootargs "\
86 "rootfstype=${nandrootfstype}\0" \
87 "nfsargs=setenv serverip ${tftpserver}; " \
88 "setenv bootargs root=/dev/nfs " \
89 "nfsroot=${nfsrootpath} " \
90 "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
91 "nfsrootpath=/opt/nfs-exports/omap\0" \
93 "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
94 "loadfdt=mmc rescan; " \
95 "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
96 "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
99 "run common_bootargs; " \
100 "run dump_bootargs; " \
103 "mmcbootz=setenv bootfile zImage; " \
104 "run mmcbootcommon; "\
105 "bootz ${loadaddr} - ${fdtaddr}\0" \
106 "mmcboot=setenv bootfile uImage; "\
107 "run mmcbootcommon; "\
108 "bootm ${loadaddr} - ${fdtaddr}\0" \
109 "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \
111 "run common_bootargs; " \
112 "run dump_bootargs; " \
115 "run loadramdisk\0" \
116 "mmcramboot=setenv bootfile uImage; " \
117 "run mmcrambootcommon; " \
118 "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
119 "mmcrambootz=setenv bootfile zImage; " \
120 "run mmcrambootcommon; " \
121 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
122 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
124 "run common_bootargs; " \
125 "run dump_bootargs; " \
126 "tftpboot ${loadaddr} ${zimage}; " \
127 "tftpboot ${rdaddr} ${ramdiskimage}; " \
128 "bootm ${loadaddr} ${rdaddr}\0" \
129 "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \
132 "run common_bootargs;" \
133 "run dump_bootargs;" \
134 "tftpboot $loadaddr zImage;" \
135 "bootz $loadaddr\0" \
136 "nandbootcommon=echo 'Booting kernel from NAND...';" \
138 "run common_bootargs;" \
139 "run dump_bootargs;" \
140 "nand read ${loadaddr} kernel;" \
141 "nand read ${fdtaddr} spl-os;\0" \
142 "nandbootz=run nandbootcommon; "\
143 "bootz ${loadaddr} - ${fdtaddr}\0"\
144 "nandboot=run nandbootcommon; "\
145 "bootm ${loadaddr} - ${fdtaddr}\0"\
147 #define CONFIG_BOOTCOMMAND \
150 /* Miscellaneous configurable options */
152 /* memtest works on */
154 /* FLASH and environment organization */
156 /* **** PISMO SUPPORT *** */
157 #if defined(CONFIG_CMD_NAND)
158 #define CONFIG_SYS_FLASH_BASE 0x10000000
161 #define CONFIG_SYS_MAX_FLASH_SECT 256
162 #define CONFIG_SYS_MAX_FLASH_BANKS 1
163 #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
164 #define CONFIG_SYS_FLASH_SIZE 0x4000000
166 /* Monitor at start of flash */
167 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
169 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
171 /* Defines for SPL */
173 /* NAND: SPL falcon mode configs */
174 #ifdef CONFIG_SPL_OS_BOOT
175 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
178 #endif /* __CONFIG_H */