1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2006-2008
5 * Richard Woodruff <r-woodruff2@ti.com>
6 * Syed Mohammed Khasim <x0khasim@ti.com>
8 * Configuration settings for the TI OMAP3530 Beagle board.
14 #include <configs/ti_omap3_common.h>
17 * We are only ever GP parts and will utilize all of the "downloaded image"
18 * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB).
20 #undef CONFIG_SPL_TEXT_BASE
21 #define CONFIG_SPL_TEXT_BASE 0x40200000
23 #define CONFIG_MISC_INIT_R
24 #define CONFIG_CMDLINE_TAG
25 #define CONFIG_SETUP_MEMORY_TAGS
26 #define CONFIG_INITRD_TAG
27 #define CONFIG_REVISION_TAG
30 #if defined(CONFIG_NAND)
31 #define CONFIG_SYS_FLASH_BASE NAND_BASE
32 #define CONFIG_SYS_MAX_NAND_DEVICE 1
33 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
34 #define CONFIG_SYS_NAND_PAGE_COUNT 64
35 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
36 #define CONFIG_SYS_NAND_OOBSIZE 64
37 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
38 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
39 #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
41 #define CONFIG_SYS_NAND_ECCSIZE 512
42 #define CONFIG_SYS_NAND_ECCBYTES 3
43 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
44 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
45 #define CONFIG_SYS_ENV_SECT_SIZE SZ_128K
46 #define CONFIG_ENV_OFFSET 0x260000
47 #define CONFIG_ENV_ADDR 0x260000
48 #define CONFIG_ENV_OVERWRITE
49 /* NAND: SPL falcon mode configs */
50 #if defined(CONFIG_SPL_OS_BOOT)
51 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x2a0000
52 #endif /* CONFIG_SPL_OS_BOOT */
53 #endif /* CONFIG_NAND */
56 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 147
58 /* Enable Multi Bus support for I2C */
59 #define CONFIG_I2C_MULTI_BUS
62 #define CONFIG_VIDEO_OMAP3
64 /* TWL4030 LED Support */
65 #define CONFIG_TWL4030_LED
68 #define CONFIG_ENV_SIZE SZ_128K
70 #define CONFIG_PREBOOT "usb start"
72 #define MEM_LAYOUT_ENV_SETTINGS \
73 DEFAULT_LINUX_BOOT_ENV
75 #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
76 "bootcmd_" #devtypel #instance "=" \
77 "setenv mmcdev " #instance "; " \
79 #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
80 #devtypel #instance " "
82 #if defined(CONFIG_NAND)
84 #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
85 "bootcmd_" #devtypel #instance "=" \
86 "if test ${mtdids} = '' || test ${mtdparts} = '' ; then " \
87 "echo NAND boot disabled: No mtdids and/or mtdparts; " \
91 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
92 #devtypel #instance " "
94 #define BOOT_TARGET_DEVICES(func) \
96 func(LEGACY_MMC, legacy_mmc, 0) \
97 func(UBIFS, ubifs, 0) \
100 #else /* !CONFIG_NAND */
102 #define BOOT_TARGET_DEVICES(func) \
104 func(LEGACY_MMC, legacy_mmc, 0)
106 #endif /* CONFIG_NAND */
108 #include <config_distro_bootcmd.h>
110 #define CONFIG_EXTRA_ENV_SETTINGS \
111 MEM_LAYOUT_ENV_SETTINGS \
112 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
113 "fdt_high=0xffffffff\0" \
114 "console=ttyO2,115200n8\0" \
116 "bootenv=uEnv.txt\0" \
117 "bootfile=zImage\0" \
119 "bootubivol=rootfs\0" \
120 "bootubipart=rootfs\0" \
126 "dvimode=640x480MR-16@60\0" \
127 "defaultdisplay=dvi\0" \
128 "defaultargs=setenv defargs " \
129 "mpurate=${mpurate} " \
133 "omapfb.mode=dvi:${dvimode} " \
134 "omapdss.def_disp=${defaultdisplay}\0" \
137 "if test $beaglerev = AxBx; then " \
138 "setenv fdtfile omap3-beagle.dtb; fi; " \
139 "if test $beaglerev = Cx; then " \
140 "setenv fdtfile omap3-beagle.dtb; fi; " \
141 "if test $beaglerev = C4; then " \
142 "setenv fdtfile omap3-beagle.dtb; fi; " \
143 "if test $beaglerev = xMAB; then " \
144 "setenv fdtfile omap3-beagle-xm-ab.dtb; fi; " \
145 "if test $beaglerev = xMC; then " \
146 "setenv fdtfile omap3-beagle-xm.dtb; fi; " \
147 "if test $fdtfile = undefined; then " \
148 "echo WARNING: Could not determine device tree to use; fi\0" \
151 "mmcroot=/dev/mmcblk0p2 rw\0" \
152 "mmcrootfstype=ext4 rootwait\0" \
153 "mmcargs=run defaultargs; setenv bootargs console=${console} " \
158 "rootfstype=${mmcrootfstype}\0" \
159 "userbutton_xm=gpio input 4;\0" \
160 "userbutton_nonxm=gpio input 7;\0" \
161 "userbutton=if gpio input 173; then " \
162 "run userbutton_xm; " \
164 "run userbutton_nonxm; " \
166 "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
167 "ext4bootenv=ext4load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootenv}\0" \
168 "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
169 "env import -t ${loadaddr} ${filesize}\0" \
170 "mmcbootenv=setenv bootpart ${mmcdev}:${mmcpart}; " \
171 "mmc dev ${mmcdev}; " \
172 "if mmc rescan; then " \
173 "if run userbutton; then " \
174 "setenv bootenv uEnv.txt;" \
176 "setenv bootenv user.txt;" \
178 "run loadbootenv && run importbootenv; " \
179 "run ext4bootenv && run importbootenv; " \
180 "if test -n $uenvcmd; then " \
181 "echo Running uenvcmd ...; " \
186 "if test $beaglerev = xMAB; then " \
187 "if test ! -e mmc ${bootpart} ${bootdir}/${fdtfile}; then " \
188 "setenv fdtfile omap3-beagle-xm.dtb; " \
191 "loadimage=ext4load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
192 "loaddtb=run validatefdt; ext4load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
193 "mmcboot=run mmcbootenv; " \
194 "if run loadimage && run loaddtb; then " \
195 "echo Booting ${bootdir}/${bootfile} from mmc ${bootpart} ...; " \
197 "if test ${bootfile} = uImage; then " \
198 "bootm ${loadaddr} - ${fdtaddr}; " \
200 "if test ${bootfile} = zImage; then " \
201 "bootz ${loadaddr} - ${fdtaddr}; " \
204 "nandroot=ubi0:rootfs ubi.mtd=rootfs rw\0" \
205 "nandrootfstype=ubifs rootwait\0" \
206 "nandargs=run defaultargs; setenv bootargs console=${console} " \
210 "root=${nandroot} " \
211 "rootfstype=${nandrootfstype}\0" \
212 "nandboot=if nand read ${loadaddr} kernel && nand read ${fdtaddr} dtb; then " \
213 "echo Booting uImage from NAND MTD 'kernel' partition ...; " \
215 "bootm ${loadaddr} - ${fdtaddr}; " \
217 "loadramdisk=ext4load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \
218 "ramdisk=rootfs.ext2.gz.uboot\0" \
219 "ramdisk_size=16384\0" \
220 "ramroot=/dev/ram rw\0" \
221 "ramrootfstype=ext2\0" \
222 "ramargs=run defaultargs; setenv bootargs console=${console} " \
226 "root=${ramroot} ramdisk_size=${ramdisk_size} " \
227 "rootfstype=${ramrootfstype}\0" \
228 "ramboot=run mmcbootenv; " \
229 "if run loadimage && run loaddtb && run loadramdisk; then " \
230 "echo Booting ${bootdir}/${bootfile} from mmc ${bootpart} w/ramdisk ...; " \
232 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}; " \
236 #endif /* __CONFIG_H */