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