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