]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/vf610twr.h
karo: tx6: increase SYS_BOOTM_LEN to 32MiB
[karo-tx-uboot.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
15 #define CONFIG_SYS_GENERIC_BOARD
16 #define CONFIG_DISPLAY_CPUINFO
17 #define CONFIG_DISPLAY_BOARDINFO
18
19 #define CONFIG_MACH_TYPE                4146
20
21 #define CONFIG_SKIP_LOWLEVEL_INIT
22
23 /* Enable passing of ATAGs */
24 #define CONFIG_CMDLINE_TAG
25
26 #define CONFIG_CMD_FUSE
27 #ifdef CONFIG_CMD_FUSE
28 #define CONFIG_MXC_OCOTP
29 #endif
30
31 /* Size of malloc() pool */
32 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
33
34 #define CONFIG_BOARD_EARLY_INIT_F
35
36 #define CONFIG_FSL_LPUART
37 #define LPUART_BASE                     UART1_BASE
38
39 /* Allow to overwrite serial and ethaddr */
40 #define CONFIG_ENV_OVERWRITE
41 #define CONFIG_SYS_UART_PORT            (1)
42 #define CONFIG_BAUDRATE                 115200
43
44 /* NAND support */
45 #define CONFIG_CMD_NAND
46 #define CONFIG_CMD_NAND_TRIMFFS
47 #define CONFIG_SYS_NAND_ONFI_DETECTION
48
49 #ifdef CONFIG_CMD_NAND
50 #define CONFIG_USE_ARCH_MEMCPY
51 #define CONFIG_SYS_MAX_NAND_DEVICE      1
52 #define CONFIG_SYS_NAND_BASE            NFC_BASE_ADDR
53
54 /* UBI */
55 #define CONFIG_CMD_UBI
56 #define CONFIG_CMD_UBIFS
57 #define CONFIG_RBTREE
58 #define CONFIG_LZO
59
60 /* Dynamic MTD partition support */
61 #define CONFIG_CMD_MTDPARTS
62 #define CONFIG_MTD_PARTITIONS
63 #define CONFIG_MTD_DEVICE
64 #define MTDIDS_DEFAULT                  "nand0=fsl_nfc"
65 #define MTDPARTS_DEFAULT                "mtdparts=fsl_nfc:"             \
66                                         "128k(vf-bcb)ro,"               \
67                                         "1408k(u-boot)ro,"              \
68                                         "512k(u-boot-env),"             \
69                                         "4m(kernel),"                   \
70                                         "512k(fdt),"            \
71                                         "-(rootfs)"
72 #endif
73
74 #define CONFIG_MMC
75 #define CONFIG_FSL_ESDHC
76 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
77 #define CONFIG_SYS_FSL_ESDHC_NUM        1
78
79 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
80
81 #define CONFIG_CMD_MMC
82 #define CONFIG_GENERIC_MMC
83 #define CONFIG_CMD_FAT
84 #define CONFIG_DOS_PARTITION
85
86 #define CONFIG_CMD_PING
87 #define CONFIG_CMD_DHCP
88 #define CONFIG_CMD_MII
89 #define CONFIG_FEC_MXC
90 #define CONFIG_MII
91 #define IMX_FEC_BASE                    ENET_BASE_ADDR
92 #define CONFIG_FEC_XCV_TYPE             RMII
93 #define CONFIG_FEC_MXC_PHYADDR          0
94 #define CONFIG_PHYLIB
95 #define CONFIG_PHY_MICREL
96
97 /* QSPI Configs*/
98 #define CONFIG_FSL_QSPI
99
100 #ifdef CONFIG_FSL_QSPI
101 #define CONFIG_CMD_SF
102 #define CONFIG_SPI_FLASH_SPANSION
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
108 /* I2C Configs */
109 #define CONFIG_CMD_I2C
110 #define CONFIG_SYS_I2C
111 #define CONFIG_SYS_I2C_MXC
112 #define CONFIG_SYS_SPD_BUS_NUM          0
113
114 #define CONFIG_BOOTDELAY                3
115
116 #define CONFIG_LOADADDR                 0x82000000
117
118 /* We boot from the gfxRAM area of the OCRAM. */
119 #define CONFIG_SYS_TEXT_BASE            0x3f408000
120 #define CONFIG_BOARD_SIZE_LIMIT         524288
121
122 #define CONFIG_EXTRA_ENV_SETTINGS \
123         "script=boot.scr\0" \
124         "image=zImage\0" \
125         "console=ttyLP1\0" \
126         "fdt_high=0xffffffff\0" \
127         "initrd_high=0xffffffff\0" \
128         "fdt_file=vf610-twr.dtb\0" \
129         "fdt_addr=0x81000000\0" \
130         "boot_fdt=try\0" \
131         "ip_dyn=yes\0" \
132         "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
133         "mmcpart=1\0" \
134         "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
135         "update_sd_firmware_filename=u-boot.imx\0" \
136         "update_sd_firmware=" \
137                 "if test ${ip_dyn} = yes; then " \
138                         "setenv get_cmd dhcp; " \
139                 "else " \
140                         "setenv get_cmd tftp; " \
141                 "fi; " \
142                 "if mmc dev ${mmcdev}; then "   \
143                         "if ${get_cmd} ${update_sd_firmware_filename}; then " \
144                                 "setexpr fw_sz ${filesize} / 0x200; " \
145                                 "setexpr fw_sz ${fw_sz} + 1; "  \
146                                 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
147                         "fi; "  \
148                 "fi\0" \
149         "mmcargs=setenv bootargs console=${console},${baudrate} " \
150                 "root=${mmcroot}\0" \
151         "loadbootscript=" \
152                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
153         "bootscript=echo Running bootscript from mmc ...; " \
154                 "source\0" \
155         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
156         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
157         "mmcboot=echo Booting from mmc ...; " \
158                 "run mmcargs; " \
159                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
160                         "if run loadfdt; then " \
161                                 "bootz ${loadaddr} - ${fdt_addr}; " \
162                         "else " \
163                                 "if test ${boot_fdt} = try; then " \
164                                         "bootz; " \
165                                 "else " \
166                                         "echo WARN: Cannot load the DT; " \
167                                 "fi; " \
168                         "fi; " \
169                 "else " \
170                         "bootz; " \
171                 "fi;\0" \
172         "netargs=setenv bootargs console=${console},${baudrate} " \
173                 "root=/dev/nfs " \
174         "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
175                 "netboot=echo Booting from net ...; " \
176                 "run netargs; " \
177                 "if test ${ip_dyn} = yes; then " \
178                         "setenv get_cmd dhcp; " \
179                 "else " \
180                         "setenv get_cmd tftp; " \
181                 "fi; " \
182                 "${get_cmd} ${image}; " \
183                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
184                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
185                                 "bootz ${loadaddr} - ${fdt_addr}; " \
186                         "else " \
187                                 "if test ${boot_fdt} = try; then " \
188                                         "bootz; " \
189                                 "else " \
190                                         "echo WARN: Cannot load the DT; " \
191                                 "fi; " \
192                         "fi; " \
193                 "else " \
194                         "bootz; " \
195                 "fi;\0"
196
197 #define CONFIG_BOOTCOMMAND \
198            "mmc dev ${mmcdev}; if mmc rescan; then " \
199                    "if run loadbootscript; then " \
200                            "run bootscript; " \
201                    "else " \
202                            "if run loadimage; then " \
203                                    "run mmcboot; " \
204                            "else run netboot; " \
205                            "fi; " \
206                    "fi; " \
207            "else run netboot; fi"
208
209 /* Miscellaneous configurable options */
210 #define CONFIG_SYS_LONGHELP             /* undef to save memory */
211 #define CONFIG_SYS_HUSH_PARSER          /* use "hush" command parser */
212 #define CONFIG_SYS_PROMPT_HUSH_PS2      "> "
213 #undef CONFIG_AUTO_COMPLETE
214 #define CONFIG_SYS_CBSIZE               256     /* Console I/O Buffer Size */
215 #define CONFIG_SYS_PBSIZE               \
216                         (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
217 #define CONFIG_SYS_MAXARGS              16      /* max number of command args */
218 #define CONFIG_SYS_BARGSIZE             CONFIG_SYS_CBSIZE
219
220 #define CONFIG_CMD_MEMTEST
221 #define CONFIG_SYS_MEMTEST_START        0x80010000
222 #define CONFIG_SYS_MEMTEST_END          0x87C00000
223
224 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
225
226 /*
227  * Stack sizes
228  * The stack sizes are set up in start.S using the settings below
229  */
230 #define CONFIG_STACKSIZE                (128 * 1024)    /* regular stack */
231
232 /* Physical memory map */
233 #define CONFIG_NR_DRAM_BANKS            1
234 #define PHYS_SDRAM                      (0x80000000)
235 #define PHYS_SDRAM_SIZE                 (128 * 1024 * 1024)
236
237 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
238 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
239 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
240
241 #define CONFIG_SYS_INIT_SP_OFFSET \
242         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
243 #define CONFIG_SYS_INIT_SP_ADDR \
244         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
245
246 /* FLASH and environment organization */
247 #define CONFIG_SYS_NO_FLASH
248
249 #ifdef CONFIG_ENV_IS_IN_MMC
250 #define CONFIG_ENV_SIZE                 (8 * 1024)
251
252 #define CONFIG_ENV_OFFSET               (12 * 64 * 1024)
253 #define CONFIG_SYS_MMC_ENV_DEV          0
254 #endif
255
256 #ifdef CONFIG_ENV_IS_IN_NAND
257 #define CONFIG_ENV_SIZE                 (64 * 2048)
258 #define CONFIG_ENV_SECT_SIZE            (64 * 2048)
259 #define CONFIG_ENV_RANGE                (512 * 1024)
260 #define CONFIG_ENV_OFFSET               0x180000
261 #endif
262
263 #define CONFIG_OF_LIBFDT
264 #define CONFIG_CMD_BOOTZ
265
266 #endif