]>
Commit | Line | Data |
---|---|---|
e2d282a1 FE |
1 | /* |
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | |
3 | * | |
4 | * Configuration settings for the Wandboard. | |
5 | * | |
1a459660 | 6 | * SPDX-License-Identifier: GPL-2.0+ |
e2d282a1 FE |
7 | */ |
8 | ||
9 | #ifndef __CONFIG_H | |
10 | #define __CONFIG_H | |
11 | ||
02824dc7 | 12 | #include "mx6_common.h" |
e2d282a1 FE |
13 | #include <asm/arch/imx-regs.h> |
14 | #include <asm/imx-common/gpio.h> | |
1ace4022 | 15 | #include <linux/sizes.h> |
e2d282a1 FE |
16 | |
17 | #define CONFIG_MX6 | |
18 | #define CONFIG_DISPLAY_CPUINFO | |
19 | #define CONFIG_DISPLAY_BOARDINFO | |
20 | ||
21 | #define MACH_TYPE_WANDBOARD 4412 | |
22 | #define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD | |
23 | ||
24 | #define CONFIG_CMDLINE_TAG | |
25 | #define CONFIG_SETUP_MEMORY_TAGS | |
26 | #define CONFIG_INITRD_TAG | |
27 | #define CONFIG_REVISION_TAG | |
28 | ||
7f5d0af8 FE |
29 | #define CONFIG_SYS_GENERIC_BOARD |
30 | ||
e2d282a1 | 31 | /* Size of malloc() pool */ |
7bcb983f | 32 | #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M) |
e2d282a1 FE |
33 | |
34 | #define CONFIG_BOARD_EARLY_INIT_F | |
eaffaa2d | 35 | #define CONFIG_BOARD_LATE_INIT |
e2d282a1 FE |
36 | #define CONFIG_MXC_GPIO |
37 | ||
38 | #define CONFIG_MXC_UART | |
39 | #define CONFIG_MXC_UART_BASE UART1_BASE | |
40 | ||
41 | /* allow to overwrite serial and ethaddr */ | |
42 | #define CONFIG_ENV_OVERWRITE | |
43 | #define CONFIG_CONS_INDEX 1 | |
44 | #define CONFIG_BAUDRATE 115200 | |
45 | ||
46 | /* Command definition */ | |
47 | #include <config_cmd_default.h> | |
48 | ||
49 | #undef CONFIG_CMD_IMLS | |
50 | ||
eaffaa2d | 51 | #define CONFIG_CMD_BMODE |
0798d578 OS |
52 | #define CONFIG_CMD_SETEXPR |
53 | ||
e2d282a1 FE |
54 | #define CONFIG_BOOTDELAY 5 |
55 | ||
56 | #define CONFIG_SYS_MEMTEST_START 0x10000000 | |
57 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) | |
58 | #define CONFIG_LOADADDR 0x12000000 | |
59 | #define CONFIG_SYS_TEXT_BASE 0x17800000 | |
60 | ||
8bc7c487 OS |
61 | /* I2C Configs */ |
62 | #define CONFIG_CMD_I2C | |
63 | #define CONFIG_SYS_I2C | |
64 | #define CONFIG_SYS_I2C_MXC | |
f8cb101e | 65 | #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ |
8bc7c487 OS |
66 | #define CONFIG_SYS_I2C_SPEED 100000 |
67 | ||
e2d282a1 FE |
68 | /* MMC Configuration */ |
69 | #define CONFIG_FSL_ESDHC | |
70 | #define CONFIG_FSL_USDHC | |
5ed15738 | 71 | #define CONFIG_SYS_FSL_USDHC_NUM 2 |
e2d282a1 | 72 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 |
e2d282a1 FE |
73 | |
74 | #define CONFIG_MMC | |
75 | #define CONFIG_CMD_MMC | |
76 | #define CONFIG_GENERIC_MMC | |
77 | #define CONFIG_BOUNCE_BUFFER | |
78 | #define CONFIG_CMD_EXT2 | |
79 | #define CONFIG_CMD_FAT | |
80 | #define CONFIG_DOS_PARTITION | |
81 | ||
9df47577 JH |
82 | /* USB Configs */ |
83 | #define CONFIG_CMD_USB | |
84 | #define CONFIG_USB_EHCI | |
85 | #define CONFIG_USB_EHCI_MX6 | |
86 | #define CONFIG_USB_STORAGE | |
87 | #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 | |
88 | #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) | |
89 | #define CONFIG_MXC_USB_FLAGS 0 | |
90 | ||
e2d282a1 FE |
91 | /* Ethernet Configuration */ |
92 | #define CONFIG_CMD_PING | |
93 | #define CONFIG_CMD_DHCP | |
94 | #define CONFIG_CMD_MII | |
95 | #define CONFIG_CMD_NET | |
96 | #define CONFIG_FEC_MXC | |
97 | #define CONFIG_MII | |
98 | #define IMX_FEC_BASE ENET_BASE_ADDR | |
99 | #define CONFIG_FEC_XCV_TYPE RGMII | |
100 | #define CONFIG_ETHPRIME "FEC" | |
101 | #define CONFIG_FEC_MXC_PHYADDR 1 | |
102 | #define CONFIG_PHYLIB | |
103 | #define CONFIG_PHY_ATHEROS | |
104 | ||
7bcb983f FE |
105 | /* Framebuffer */ |
106 | #define CONFIG_VIDEO | |
107 | #define CONFIG_VIDEO_IPUV3 | |
108 | #define CONFIG_CFB_CONSOLE | |
109 | #define CONFIG_VGA_AS_SINGLE_DEVICE | |
110 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV | |
111 | #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE | |
112 | #define CONFIG_VIDEO_BMP_RLE8 | |
113 | #define CONFIG_SPLASH_SCREEN | |
a7efb026 | 114 | #define CONFIG_SPLASH_SCREEN_ALIGN |
7bcb983f FE |
115 | #define CONFIG_BMP_16BPP |
116 | #define CONFIG_VIDEO_LOGO | |
a7efb026 | 117 | #define CONFIG_VIDEO_BMP_LOGO |
7bcb983f | 118 | #define CONFIG_IPUV3_CLK 260000000 |
0ef797a5 | 119 | #define CONFIG_CMD_HDMIDETECT |
5ea7f0e3 | 120 | #define CONFIG_IMX_HDMI |
8bc7c487 | 121 | #define CONFIG_IMX_VIDEO_SKIP |
7bcb983f | 122 | |
9f87640c FE |
123 | #define CONFIG_CMD_FUSE |
124 | #ifdef CONFIG_CMD_FUSE | |
125 | #define CONFIG_MXC_OCOTP | |
126 | #endif | |
127 | ||
f62cd00d | 128 | #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S) |
e2d282a1 | 129 | #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb" |
491f2947 TU |
130 | #elif defined(CONFIG_MX6Q) |
131 | #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" | |
e2d282a1 FE |
132 | #endif |
133 | ||
134 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
135 | "script=boot.scr\0" \ | |
f3533970 | 136 | "image=zImage\0" \ |
e2d282a1 | 137 | "console=ttymxc0\0" \ |
d727ab3c | 138 | "splashpos=m,m\0" \ |
e2d282a1 FE |
139 | "fdt_high=0xffffffff\0" \ |
140 | "initrd_high=0xffffffff\0" \ | |
141 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ | |
6584a1b5 | 142 | "fdt_addr=0x18000000\0" \ |
e2d282a1 FE |
143 | "boot_fdt=try\0" \ |
144 | "ip_dyn=yes\0" \ | |
1e1cbde0 | 145 | "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ |
86812c4d OS |
146 | "mmcpart=1\0" \ |
147 | "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ | |
0798d578 OS |
148 | "update_sd_firmware_filename=u-boot.imx\0" \ |
149 | "update_sd_firmware=" \ | |
150 | "if test ${ip_dyn} = yes; then " \ | |
151 | "setenv get_cmd dhcp; " \ | |
152 | "else " \ | |
153 | "setenv get_cmd tftp; " \ | |
154 | "fi; " \ | |
155 | "if mmc dev ${mmcdev}; then " \ | |
156 | "if ${get_cmd} ${update_sd_firmware_filename}; then " \ | |
157 | "setexpr fw_sz ${filesize} / 0x200; " \ | |
158 | "setexpr fw_sz ${fw_sz} + 1; " \ | |
159 | "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ | |
160 | "fi; " \ | |
161 | "fi\0" \ | |
e2d282a1 | 162 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ |
0ef797a5 OS |
163 | "root=${mmcroot}; run videoargs\0" \ |
164 | "videoargs=" \ | |
165 | "setenv nextcon 0; " \ | |
166 | "if hdmidet; then " \ | |
167 | "setenv bootargs ${bootargs} " \ | |
168 | "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \ | |
169 | "if=RGB24; " \ | |
170 | "setenv fbmen fbmem=28M; " \ | |
171 | "setexpr nextcon ${nextcon} + 1; " \ | |
172 | "else " \ | |
173 | "echo - no HDMI monitor;" \ | |
174 | "fi; " \ | |
175 | "i2c dev 1; " \ | |
176 | "if i2c probe 0x10; then " \ | |
177 | "setenv bootargs ${bootargs} " \ | |
178 | "video=mxcfb${nextcon}:dev=lcd,800x480@60," \ | |
99c618ff | 179 | "if=RGB666,bpp=32; " \ |
0ef797a5 OS |
180 | "if test 0 -eq ${nextcon}; then " \ |
181 | "setenv fbmem fbmem=10M; " \ | |
182 | "else " \ | |
183 | "setenv fbmem ${fbmem},10M; " \ | |
184 | "fi; " \ | |
185 | "setexpr nextcon ${nextcon} + 1; " \ | |
186 | "else " \ | |
187 | "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ | |
188 | "fi; " \ | |
189 | "setenv bootargs ${bootargs} ${fbmem}\0" \ | |
e2d282a1 FE |
190 | "loadbootscript=" \ |
191 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | |
192 | "bootscript=echo Running bootscript from mmc ...; " \ | |
193 | "source\0" \ | |
f3533970 | 194 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
e2d282a1 FE |
195 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
196 | "mmcboot=echo Booting from mmc ...; " \ | |
197 | "run mmcargs; " \ | |
198 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
199 | "if run loadfdt; then " \ | |
f3533970 | 200 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
e2d282a1 FE |
201 | "else " \ |
202 | "if test ${boot_fdt} = try; then " \ | |
f3533970 | 203 | "bootz; " \ |
e2d282a1 FE |
204 | "else " \ |
205 | "echo WARN: Cannot load the DT; " \ | |
206 | "fi; " \ | |
207 | "fi; " \ | |
208 | "else " \ | |
f3533970 | 209 | "bootz; " \ |
e2d282a1 FE |
210 | "fi;\0" \ |
211 | "netargs=setenv bootargs console=${console},${baudrate} " \ | |
212 | "root=/dev/nfs " \ | |
213 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ | |
214 | "netboot=echo Booting from net ...; " \ | |
215 | "run netargs; " \ | |
216 | "if test ${ip_dyn} = yes; then " \ | |
217 | "setenv get_cmd dhcp; " \ | |
218 | "else " \ | |
219 | "setenv get_cmd tftp; " \ | |
220 | "fi; " \ | |
f3533970 | 221 | "${get_cmd} ${image}; " \ |
e2d282a1 FE |
222 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
223 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | |
f3533970 | 224 | "bootz ${loadaddr} - ${fdt_addr}; " \ |
e2d282a1 FE |
225 | "else " \ |
226 | "if test ${boot_fdt} = try; then " \ | |
f3533970 | 227 | "bootz; " \ |
e2d282a1 FE |
228 | "else " \ |
229 | "echo WARN: Cannot load the DT; " \ | |
230 | "fi; " \ | |
231 | "fi; " \ | |
232 | "else " \ | |
f3533970 | 233 | "bootz; " \ |
e2d282a1 FE |
234 | "fi;\0" |
235 | ||
236 | #define CONFIG_BOOTCOMMAND \ | |
e2d282a1 FE |
237 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
238 | "if run loadbootscript; then " \ | |
239 | "run bootscript; " \ | |
240 | "else " \ | |
f3533970 | 241 | "if run loadimage; then " \ |
e2d282a1 FE |
242 | "run mmcboot; " \ |
243 | "else run netboot; " \ | |
244 | "fi; " \ | |
245 | "fi; " \ | |
246 | "else run netboot; fi" | |
247 | ||
248 | /* Miscellaneous configurable options */ | |
249 | #define CONFIG_SYS_LONGHELP | |
250 | #define CONFIG_SYS_HUSH_PARSER | |
e2d282a1 FE |
251 | #define CONFIG_AUTO_COMPLETE |
252 | #define CONFIG_SYS_CBSIZE 256 | |
e2d282a1 FE |
253 | #define CONFIG_SYS_MAXARGS 16 |
254 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | |
255 | ||
256 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR | |
e2d282a1 FE |
257 | |
258 | #define CONFIG_CMDLINE_EDITING | |
259 | ||
260 | /* Physical Memory Map */ | |
261 | #define CONFIG_NR_DRAM_BANKS 1 | |
262 | #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR | |
263 | ||
264 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM | |
265 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
266 | #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE | |
267 | ||
268 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
269 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
270 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
271 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
272 | ||
273 | /* FLASH and environment organization */ | |
274 | #define CONFIG_SYS_NO_FLASH | |
275 | ||
276 | #define CONFIG_ENV_SIZE (8 * 1024) | |
277 | ||
278 | #define CONFIG_ENV_IS_IN_MMC | |
279 | #define CONFIG_ENV_OFFSET (6 * 64 * 1024) | |
280 | #define CONFIG_SYS_MMC_ENV_DEV 0 | |
281 | ||
282 | #define CONFIG_OF_LIBFDT | |
283 | #define CONFIG_CMD_BOOTZ | |
284 | ||
285 | #ifndef CONFIG_SYS_DCACHE_OFF | |
286 | #define CONFIG_CMD_CACHE | |
287 | #endif | |
288 | ||
289 | #endif /* __CONFIG_H * */ |