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