2 * Configuration settings for the Gumstix Overo board.
4 * SPDX-License-Identifier: GPL-2.0+
10 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
12 #include <configs/ti_omap3_common.h>
14 * We are only ever GP parts and will utilize all of the "downloaded image"
15 * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB).
17 #undef CONFIG_SPL_TEXT_BASE
18 #define CONFIG_SPL_TEXT_BASE 0x40200000
20 /* call misc_init_r */
21 #define CONFIG_MISC_INIT_R
23 /* pass the revision tag */
24 #define CONFIG_REVISION_TAG
26 /* override size of malloc() pool */
27 #undef CONFIG_SYS_MALLOC_LEN
28 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */
29 /* Shift 128 << 15 provides 4 MiB heap to support UBI commands.
30 * Shift 128 << 10 provides 128 KiB heap for limited-memory devices. */
31 #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 15))
36 #define CONFIG_TWL4030_LED
39 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 183
41 /* commands to include */
44 #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
46 /* NAND block size is 128 KiB. Synchronize these values with
47 * overo_nand_partitions in mach-omap2/board-overo.c in Linux:
48 * xloader 4 * NAND_BLOCK_SIZE = 512 KiB
49 * uboot 14 * NAND_BLOCK_SIZE = 1792 KiB
50 * uboot environtment 2 * NAND_BLOCK_SIZE = 256 KiB
51 * linux 64 * NAND_BLOCK_SIZE = 8 MiB
54 #define MTDIDS_DEFAULT "nand0=omap2-nand.0"
55 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:" \
61 #else /* CONFIG_NAND */
62 #define MTDPARTS_DEFAULT
63 #endif /* CONFIG_NAND */
65 /* Board NAND Info. */
66 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */
68 /* Environment information */
69 #define CONFIG_EXTRA_ENV_SETTINGS \
70 DEFAULT_LINUX_BOOT_ENV \
74 "console=ttyO2,115200n8\0" \
78 "dvimode=1024x768MR-16@60\0" \
79 "defaultdisplay=dvi\0" \
81 "mmcroot=/dev/mmcblk0p2 rw\0" \
82 "mmcrootfstype=ext4 rootwait\0" \
83 "nandroot=ubi0:rootfs ubi.mtd=4\0" \
84 "nandrootfstype=ubifs\0" \
85 "mtdparts=" MTDPARTS_DEFAULT "\0" \
86 "mmcargs=setenv bootargs console=${console} " \
88 "mpurate=${mpurate} " \
90 "omapfb.mode=dvi:${dvimode} " \
91 "omapdss.def_disp=${defaultdisplay} " \
93 "rootfstype=${mmcrootfstype}\0" \
94 "nandargs=setenv bootargs console=${console} " \
96 "mpurate=${mpurate} " \
98 "omapfb.mode=dvi:${dvimode} " \
99 "omapdss.def_disp=${defaultdisplay} " \
100 "root=${nandroot} " \
101 "rootfstype=${nandrootfstype}\0" \
102 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
103 "bootscript=echo Running boot script from mmc ...; " \
104 "source ${loadaddr}\0" \
105 "loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
106 "importbootenv=echo Importing environment from mmc ...; " \
107 "env import -t ${loadaddr} ${filesize}\0" \
108 "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \
109 "mmcboot=echo Booting from mmc...; " \
111 "bootm ${loadaddr}\0" \
112 "loadzimage=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}\0" \
113 "loadfdt=load mmc ${mmcdev}:2 ${fdtaddr} ${bootdir}/${fdtfile}\0" \
114 "loadubizimage=ubifsload ${loadaddr} ${bootdir}/${bootfile}\0" \
115 "loadubifdt=ubifsload ${fdtaddr} ${bootdir}/${fdtfile}\0" \
116 "mmcbootfdt=echo Booting with DT from mmc ...; " \
118 "bootz ${loadaddr} - ${fdtaddr}\0" \
119 "nandboot=echo Booting from nand ...; " \
121 "if nand read ${loadaddr} linux; then " \
122 "bootm ${loadaddr};" \
124 "nanddtsboot=echo Booting from nand with DTS...; " \
127 "ubifsmount ubi0:rootfs; "\
129 "run loadubizimage; "\
130 "bootz ${loadaddr} - ${fdtaddr}\0" \
132 #define CONFIG_BOOTCOMMAND \
133 "mmc dev ${mmcdev}; if mmc rescan; then " \
134 "if run loadbootscript; then " \
137 "if run loadbootenv; then " \
138 "echo Loaded environment from ${bootenv};" \
139 "run importbootenv;" \
141 "if test -n $uenvcmd; then " \
142 "echo Running uenvcmd ...;" \
145 "if run loaduimage; then " \
148 "if run loadzimage; then " \
149 "if test -z \"${fdtfile}\"; then " \
150 "setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \
152 "if run loadfdt; then " \
158 "if test -z \"${fdtfile}\"; then "\
159 "setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \
161 "run nanddtsboot; " \
163 /* memtest works on */
164 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
165 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
166 0x01F00000) /* 31MB */
168 /* FLASH and environment organization */
169 #if defined(CONFIG_NAND)
170 #define CONFIG_SYS_FLASH_BASE NAND_BASE
173 /* Monitor at start of flash */
174 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
175 #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
177 #define ONENAND_ENV_OFFSET 0x240000 /* environment starts here */
178 #define SMNAND_ENV_OFFSET 0x240000 /* environment starts here */
180 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
181 #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
182 #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET
184 /* Configure SMSC9211 ethernet */
185 #if defined(CONFIG_CMD_NET)
186 #define CONFIG_SMC911X
187 #define CONFIG_SMC911X_32_BIT
188 #define CONFIG_SMC911X_BASE 0x2C000000
189 #endif /* (CONFIG_CMD_NET) */
191 /* Initial RAM setup */
192 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
193 #define CONFIG_SYS_INIT_RAM_SIZE 0x800
195 /* NAND boot config */
196 #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
197 #define CONFIG_SYS_NAND_MAX_ECCPOS 56
198 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
199 #define CONFIG_SYS_NAND_PAGE_COUNT 64
200 #define CONFIG_SYS_NAND_PAGE_SIZE 2048
201 #define CONFIG_SYS_NAND_OOBSIZE 64
202 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
203 #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
204 #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
205 13, 14, 16, 17, 18, 19, 20, 21, 22, \
206 23, 24, 25, 26, 27, 28, 30, 31, 32, \
207 33, 34, 35, 36, 37, 38, 39, 40, 41, \
208 42, 44, 45, 46, 47, 48, 49, 50, 51, \
210 #define CONFIG_SYS_NAND_ECCSIZE 512
211 #define CONFIG_SYS_NAND_ECCBYTES 13
212 #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
213 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
214 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
215 /* NAND: SPL falcon mode configs */
216 #ifdef CONFIG_SPL_OS_BOOT
217 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
220 #endif /* __CONFIG_H */