]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/configs/mx6qarm2.h
iMX6: Change mmcroot to use fixed mmc block index for USDHC
[karo-tx-uboot.git] / include / configs / mx6qarm2.h
1 /*
2  * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6Q Armadillo2 board.
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #ifndef __CONFIG_H
10 #define __CONFIG_H
11
12
13 #include "mx6_common.h"
14
15 #define CONFIG_DISPLAY_CPUINFO
16 #define CONFIG_DISPLAY_BOARDINFO
17
18 #include <asm/arch/imx-regs.h>
19
20 #define CONFIG_CMDLINE_TAG
21 #define CONFIG_SETUP_MEMORY_TAGS
22 #define CONFIG_INITRD_TAG
23
24 #define CONFIG_SYS_GENERIC_BOARD
25
26 /* Size of malloc() pool */
27 #define CONFIG_SYS_MALLOC_LEN           (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
28
29 #define CONFIG_BOARD_EARLY_INIT_F
30 #define CONFIG_MXC_GPIO
31
32 #define CONFIG_MXC_UART
33 #define CONFIG_MXC_UART_BASE            UART4_BASE
34
35 /* MMC Configs */
36 #define CONFIG_FSL_ESDHC
37 #define CONFIG_FSL_USDHC
38 #define CONFIG_SYS_FSL_ESDHC_ADDR       USDHC4_BASE_ADDR
39 #define CONFIG_SYS_FSL_USDHC_NUM        2
40
41 #define CONFIG_MMC
42 #define CONFIG_CMD_MMC
43 #define CONFIG_GENERIC_MMC
44 #define CONFIG_BOUNCE_BUFFER
45 #define CONFIG_CMD_FAT
46 #define CONFIG_DOS_PARTITION
47
48 #define CONFIG_CMD_PING
49 #define CONFIG_CMD_DHCP
50 #define CONFIG_CMD_MII
51 #define CONFIG_CMD_NET
52 #define CONFIG_FEC_MXC
53 #define CONFIG_MII
54 #define IMX_FEC_BASE                    ENET_BASE_ADDR
55 #define CONFIG_FEC_XCV_TYPE             RGMII
56 #define CONFIG_FEC_MXC_PHYADDR          0
57
58 /* allow to overwrite serial and ethaddr */
59 #define CONFIG_ENV_OVERWRITE
60 #define CONFIG_CONS_INDEX               1
61 #define CONFIG_BAUDRATE                 115200
62
63 /* Command definition */
64 #include <config_cmd_default.h>
65
66 #undef CONFIG_CMD_IMLS
67
68 #define CONFIG_BOOTDELAY                3
69
70 #define CONFIG_LOADADDR                 0x12000000
71 #define CONFIG_SYS_TEXT_BASE            0x17800000
72
73 #define CONFIG_EXTRA_ENV_SETTINGS \
74         "script=boot.scr\0" \
75         "image=zImage\0" \
76         "console=ttymxc3\0" \
77         "fdt_file=imx6q-arm2.dtb\0" \
78         "fdt_addr=0x18000000\0" \
79         "fdt_high=0xffffffff\0" \
80         "initrd_high=0xffffffff\0" \
81         "boot_fdt=try\0" \
82         "ip_dyn=yes\0" \
83         "mmcdev=1\0" \
84         "mmcpart=1\0" \
85         "mmcroot=/dev/mmcblk3p2 rootwait rw\0" \
86         "mmcargs=setenv bootargs console=${console},${baudrate} " \
87                 "root=${mmcroot}\0" \
88         "loadbootscript=" \
89                 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
90         "bootscript=echo Running bootscript from mmc ...; " \
91                 "source\0" \
92         "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
93         "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
94         "mmcboot=echo Booting from mmc ...; " \
95                 "run mmcargs; " \
96                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
97                         "if run loadfdt; then " \
98                                 "bootz ${loadaddr} - ${fdt_addr}; " \
99                         "else " \
100                                 "if test ${boot_fdt} = try; then " \
101                                         "bootz; " \
102                                 "else " \
103                                         "echo WARN: Cannot load the DT; " \
104                                 "fi; " \
105                         "fi; " \
106                 "else " \
107                         "bootz; " \
108                 "fi;\0" \
109         "netargs=setenv bootargs console=${console},${baudrate} " \
110                 "root=/dev/nfs " \
111                 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
112         "netboot=echo Booting from net ...; " \
113                 "run netargs; " \
114                 "if test ${ip_dyn} = yes; then " \
115                         "setenv get_cmd dhcp; " \
116                 "else " \
117                         "setenv get_cmd tftp; " \
118                 "fi; " \
119                 "${get_cmd} ${image}; " \
120                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
121                         "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
122                                 "bootz ${loadaddr} - ${fdt_addr}; " \
123                         "else " \
124                                 "if test ${boot_fdt} = try; then " \
125                                         "bootz; " \
126                                 "else " \
127                                         "echo WARN: Cannot load the DT; " \
128                                 "fi; " \
129                         "fi; " \
130                 "else " \
131                         "bootz; " \
132                 "fi;\0"
133
134 #define CONFIG_BOOTCOMMAND \
135         "mmc dev ${mmcdev};" \
136         "mmc dev ${mmcdev}; if mmc rescan; then " \
137                 "if run loadbootscript; then " \
138                         "run bootscript; " \
139                 "else " \
140                         "if run loadimage; then " \
141                                 "run mmcboot; " \
142                         "else run netboot; " \
143                         "fi; " \
144                 "fi; " \
145         "else run netboot; fi"
146
147 #define CONFIG_ARP_TIMEOUT      200UL
148
149 /* Miscellaneous configurable options */
150 #define CONFIG_SYS_LONGHELP
151 #define CONFIG_SYS_HUSH_PARSER
152 #define CONFIG_AUTO_COMPLETE
153 #define CONFIG_SYS_CBSIZE               256
154
155 #define CONFIG_SYS_MAXARGS              16
156 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
157
158 #define CONFIG_SYS_MEMTEST_START        0x10000000
159 #define CONFIG_SYS_MEMTEST_END          0x10010000
160
161 #define CONFIG_SYS_LOAD_ADDR            CONFIG_LOADADDR
162
163 #define CONFIG_CMDLINE_EDITING
164
165 /* Physical Memory Map */
166 #define CONFIG_NR_DRAM_BANKS            1
167 #define PHYS_SDRAM                      MMDC0_ARB_BASE_ADDR
168
169 #define CONFIG_SYS_SDRAM_BASE           PHYS_SDRAM
170 #define CONFIG_SYS_INIT_RAM_ADDR        IRAM_BASE_ADDR
171 #define CONFIG_SYS_INIT_RAM_SIZE        IRAM_SIZE
172
173 #define CONFIG_SYS_INIT_SP_OFFSET \
174         (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
175 #define CONFIG_SYS_INIT_SP_ADDR \
176         (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
177
178 /* FLASH and environment organization */
179 #define CONFIG_SYS_NO_FLASH
180
181 #define CONFIG_ENV_OFFSET               (6 * 64 * 1024)
182 #define CONFIG_ENV_SIZE                 (8 * 1024)
183 #define CONFIG_ENV_IS_IN_MMC
184 #define CONFIG_SYS_MMC_ENV_DEV          1
185
186 #define CONFIG_OF_LIBFDT
187 #define CONFIG_CMD_BOOTZ
188
189 /* USB Configs */
190 #define CONFIG_CMD_USB
191 #ifdef CONFIG_CMD_USB
192 #define CONFIG_USB_EHCI
193 #define CONFIG_USB_EHCI_MX6
194 #define CONFIG_USB_STORAGE
195 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
196 #define CONFIG_USB_HOST_ETHER
197 #define CONFIG_USB_ETHER_ASIX
198 #define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
199 #define CONFIG_MXC_USB_FLAGS            0
200 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
201 #endif
202
203 #endif                          /* __CONFIG_H */