]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/configs/vf610twr.h
armv7: add cacheline sizes where missing
[people/ms/u-boot.git] / include / configs / vf610twr.h
CommitLineData
8c653124
AW
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale Vybrid vf610twr board.
5 *
1a459660 6 * SPDX-License-Identifier: GPL-2.0+
8c653124
AW
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
3709844f
AA
12#define CONFIG_SYS_CACHELINE_SIZE 32
13
8c653124 14#include <asm/arch/imx-regs.h>
8c653124
AW
15
16#define CONFIG_VF610
17
18#define CONFIG_DISPLAY_CPUINFO
19#define CONFIG_DISPLAY_BOARDINFO
18fb0e3c 20#define CONFIG_SYS_FSL_CLK
8c653124
AW
21
22#define CONFIG_MACH_TYPE 4146
23
24#define CONFIG_SKIP_LOWLEVEL_INIT
25
26/* Enable passing of ATAGs */
27#define CONFIG_CMDLINE_TAG
28
29#define CONFIG_CMD_FUSE
30#ifdef CONFIG_CMD_FUSE
31#define CONFIG_MXC_OCOTP
32#endif
33
34/* Size of malloc() pool */
35#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
36
37#define CONFIG_BOARD_EARLY_INIT_F
38
8c653124
AW
39#define LPUART_BASE UART1_BASE
40
41/* Allow to overwrite serial and ethaddr */
42#define CONFIG_ENV_OVERWRITE
43#define CONFIG_SYS_UART_PORT (1)
44#define CONFIG_BAUDRATE 115200
45
d6d07a9b
SA
46/* NAND support */
47#define CONFIG_CMD_NAND
48#define CONFIG_CMD_NAND_TRIMFFS
8fca2d8c 49#define CONFIG_SYS_NAND_ONFI_DETECTION
d6d07a9b
SA
50
51#ifdef CONFIG_CMD_NAND
d6d07a9b 52#define CONFIG_USE_ARCH_MEMCPY
d6d07a9b
SA
53#define CONFIG_SYS_MAX_NAND_DEVICE 1
54#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
55
56/* UBI */
57#define CONFIG_CMD_UBI
58#define CONFIG_CMD_UBIFS
d6d07a9b
SA
59#define CONFIG_RBTREE
60#define CONFIG_LZO
d6d07a9b
SA
61
62/* Dynamic MTD partition support */
63#define CONFIG_CMD_MTDPARTS
64#define CONFIG_MTD_PARTITIONS
65#define CONFIG_MTD_DEVICE
66#define MTDIDS_DEFAULT "nand0=fsl_nfc"
67#define MTDPARTS_DEFAULT "mtdparts=fsl_nfc:" \
68 "128k(vf-bcb)ro," \
69 "1408k(u-boot)ro," \
70 "512k(u-boot-env)," \
71 "4m(kernel)," \
72 "512k(fdt)," \
73 "-(rootfs)"
74#endif
75
8c653124
AW
76#define CONFIG_MMC
77#define CONFIG_FSL_ESDHC
78#define CONFIG_SYS_FSL_ESDHC_ADDR 0
79#define CONFIG_SYS_FSL_ESDHC_NUM 1
80
81#define CONFIG_SYS_FSL_ERRATUM_ESDHC111
82
83#define CONFIG_CMD_MMC
84#define CONFIG_GENERIC_MMC
85#define CONFIG_CMD_FAT
86#define CONFIG_DOS_PARTITION
87
88#define CONFIG_CMD_PING
89#define CONFIG_CMD_DHCP
90#define CONFIG_CMD_MII
8c653124
AW
91#define CONFIG_FEC_MXC
92#define CONFIG_MII
93#define IMX_FEC_BASE ENET_BASE_ADDR
94#define CONFIG_FEC_XCV_TYPE RMII
95#define CONFIG_FEC_MXC_PHYADDR 0
96#define CONFIG_PHYLIB
97#define CONFIG_PHY_MICREL
98
cb6d04d6 99/* QSPI Configs*/
cb6d04d6
CF
100
101#ifdef CONFIG_FSL_QSPI
102#define CONFIG_CMD_SF
cb6d04d6
CF
103#define FSL_QSPI_FLASH_SIZE (1 << 24)
104#define FSL_QSPI_FLASH_NUM 2
105#define CONFIG_SYS_FSL_QSPI_LE
106#endif
107
1221b3d7
AW
108/* I2C Configs */
109#define CONFIG_CMD_I2C
b089d039 110#define CONFIG_SYS_I2C
111#define CONFIG_SYS_I2C_MXC
03544c66
AA
112#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
113#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
b089d039 114#define CONFIG_SYS_SPD_BUS_NUM 0
1221b3d7 115
8c653124
AW
116#define CONFIG_BOOTDELAY 3
117
cf04ad32 118#define CONFIG_SYS_LOAD_ADDR 0x82000000
b188067f
SA
119
120/* We boot from the gfxRAM area of the OCRAM. */
121#define CONFIG_SYS_TEXT_BASE 0x3f408000
122#define CONFIG_BOARD_SIZE_LIMIT 524288
8c653124 123
cf04ad32
SA
124/*
125 * We do have 128MB of memory on the Vybrid Tower board. Leave the last
126 * 16MB alone to avoid conflicts with Cortex-M4 firmwares running from
127 * DDR3. Hence, limit the memory range for image processing to 112MB
128 * using bootm_size. All of the following must be within this range.
129 * We have the default load at 32MB into DDR (for the kernel), FDT at
130 * 64MB and the ramdisk 512KB above that (allowing for hopefully never
131 * seen large trees). This allows a reasonable split between ramdisk
132 * and kernel size, where the ram disk can be a bit larger.
133 */
134#define MEM_LAYOUT_ENV_SETTINGS \
135 "bootm_size=0x07000000\0" \
136 "loadaddr=0x82000000\0" \
137 "kernel_addr_r=0x82000000\0" \
138 "fdt_addr=0x84000000\0" \
139 "fdt_addr_r=0x84000000\0" \
140 "rdaddr=0x84080000\0" \
141 "ramdisk_addr_r=0x84080000\0"
142
ca21f61e 143#define CONFIG_EXTRA_ENV_SETTINGS \
cf04ad32 144 MEM_LAYOUT_ENV_SETTINGS \
ca21f61e 145 "script=boot.scr\0" \
c0a5b081 146 "image=zImage\0" \
ca21f61e 147 "console=ttyLP1\0" \
ca21f61e 148 "fdt_file=vf610-twr.dtb\0" \
ca21f61e
OS
149 "boot_fdt=try\0" \
150 "ip_dyn=yes\0" \
151 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
152 "mmcpart=1\0" \
153 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
154 "update_sd_firmware_filename=u-boot.imx\0" \
155 "update_sd_firmware=" \
156 "if test ${ip_dyn} = yes; then " \
157 "setenv get_cmd dhcp; " \
158 "else " \
159 "setenv get_cmd tftp; " \
160 "fi; " \
161 "if mmc dev ${mmcdev}; then " \
162 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
163 "setexpr fw_sz ${filesize} / 0x200; " \
164 "setexpr fw_sz ${fw_sz} + 1; " \
165 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
166 "fi; " \
167 "fi\0" \
168 "mmcargs=setenv bootargs console=${console},${baudrate} " \
169 "root=${mmcroot}\0" \
170 "loadbootscript=" \
171 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
172 "bootscript=echo Running bootscript from mmc ...; " \
173 "source\0" \
c0a5b081 174 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
ca21f61e
OS
175 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
176 "mmcboot=echo Booting from mmc ...; " \
177 "run mmcargs; " \
178 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
179 "if run loadfdt; then " \
c0a5b081 180 "bootz ${loadaddr} - ${fdt_addr}; " \
ca21f61e
OS
181 "else " \
182 "if test ${boot_fdt} = try; then " \
c0a5b081 183 "bootz; " \
ca21f61e
OS
184 "else " \
185 "echo WARN: Cannot load the DT; " \
186 "fi; " \
187 "fi; " \
188 "else " \
c0a5b081 189 "bootz; " \
ca21f61e
OS
190 "fi;\0" \
191 "netargs=setenv bootargs console=${console},${baudrate} " \
192 "root=/dev/nfs " \
193 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
194 "netboot=echo Booting from net ...; " \
195 "run netargs; " \
196 "if test ${ip_dyn} = yes; then " \
197 "setenv get_cmd dhcp; " \
198 "else " \
199 "setenv get_cmd tftp; " \
200 "fi; " \
c0a5b081 201 "${get_cmd} ${image}; " \
ca21f61e
OS
202 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
203 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
c0a5b081 204 "bootz ${loadaddr} - ${fdt_addr}; " \
ca21f61e
OS
205 "else " \
206 "if test ${boot_fdt} = try; then " \
c0a5b081 207 "bootz; " \
ca21f61e
OS
208 "else " \
209 "echo WARN: Cannot load the DT; " \
210 "fi; " \
211 "fi; " \
212 "else " \
c0a5b081 213 "bootz; " \
ca21f61e
OS
214 "fi;\0"
215
216#define CONFIG_BOOTCOMMAND \
217 "mmc dev ${mmcdev}; if mmc rescan; then " \
218 "if run loadbootscript; then " \
219 "run bootscript; " \
220 "else " \
c0a5b081 221 "if run loadimage; then " \
ca21f61e
OS
222 "run mmcboot; " \
223 "else run netboot; " \
224 "fi; " \
225 "fi; " \
226 "else run netboot; fi"
227
8c653124
AW
228/* Miscellaneous configurable options */
229#define CONFIG_SYS_LONGHELP /* undef to save memory */
230#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
231#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
8c653124
AW
232#undef CONFIG_AUTO_COMPLETE
233#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
234#define CONFIG_SYS_PBSIZE \
235 (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
236#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
237#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
238
239#define CONFIG_CMD_MEMTEST
240#define CONFIG_SYS_MEMTEST_START 0x80010000
241#define CONFIG_SYS_MEMTEST_END 0x87C00000
242
8c653124
AW
243/*
244 * Stack sizes
245 * The stack sizes are set up in start.S using the settings below
246 */
247#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
248
249/* Physical memory map */
250#define CONFIG_NR_DRAM_BANKS 1
251#define PHYS_SDRAM (0x80000000)
252#define PHYS_SDRAM_SIZE (128 * 1024 * 1024)
253
254#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
255#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
256#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
257
258#define CONFIG_SYS_INIT_SP_OFFSET \
259 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
260#define CONFIG_SYS_INIT_SP_ADDR \
261 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
262
263/* FLASH and environment organization */
264#define CONFIG_SYS_NO_FLASH
265
d6d07a9b 266#ifdef CONFIG_ENV_IS_IN_MMC
8c653124 267#define CONFIG_ENV_SIZE (8 * 1024)
8c653124
AW
268
269#define CONFIG_ENV_OFFSET (12 * 64 * 1024)
270#define CONFIG_SYS_MMC_ENV_DEV 0
d6d07a9b
SA
271#endif
272
273#ifdef CONFIG_ENV_IS_IN_NAND
274#define CONFIG_ENV_SIZE (64 * 2048)
275#define CONFIG_ENV_SECT_SIZE (64 * 2048)
276#define CONFIG_ENV_RANGE (512 * 1024)
277#define CONFIG_ENV_OFFSET 0x180000
278#endif
8c653124
AW
279
280#define CONFIG_OF_LIBFDT
281#define CONFIG_CMD_BOOTZ
282
283#endif