2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
4 * Configuration settings for the Wandboard.
6 * SPDX-License-Identifier: GPL-2.0+
12 #include "mx6_common.h"
14 #define CONFIG_SPL_LIBCOMMON_SUPPORT
15 #define CONFIG_SPL_MMC_SUPPORT
18 #define MACH_TYPE_WANDBOARD 4412
19 #define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD
21 /* Size of malloc() pool */
22 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
24 #define CONFIG_BOARD_EARLY_INIT_F
25 #define CONFIG_BOARD_LATE_INIT
27 #define CONFIG_MXC_UART
28 #define CONFIG_MXC_UART_BASE UART1_BASE
30 /* Command definition */
31 #define CONFIG_CMD_BMODE
32 #define CONFIG_CMD_SETEXPR
34 #define CONFIG_SYS_MEMTEST_START 0x10000000
35 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
38 #define CONFIG_CMD_I2C
39 #define CONFIG_SYS_I2C
40 #define CONFIG_SYS_I2C_MXC
41 #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
42 #define CONFIG_SYS_I2C_SPEED 100000
44 /* MMC Configuration */
45 #define CONFIG_FSL_ESDHC
46 #define CONFIG_FSL_USDHC
47 #define CONFIG_SYS_FSL_USDHC_NUM 2
48 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
51 #define CONFIG_CMD_MMC
52 #define CONFIG_GENERIC_MMC
53 #define CONFIG_BOUNCE_BUFFER
56 #define CONFIG_CMD_USB
57 #define CONFIG_USB_EHCI
58 #define CONFIG_USB_EHCI_MX6
59 #define CONFIG_USB_STORAGE
60 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
61 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
62 #define CONFIG_MXC_USB_FLAGS 0
64 /* Ethernet Configuration */
65 #define CONFIG_CMD_PING
66 #define CONFIG_CMD_DHCP
67 #define CONFIG_CMD_MII
68 #define CONFIG_CMD_NET
69 #define CONFIG_FEC_MXC
71 #define IMX_FEC_BASE ENET_BASE_ADDR
72 #define CONFIG_FEC_XCV_TYPE RGMII
73 #define CONFIG_ETHPRIME "FEC"
74 #define CONFIG_FEC_MXC_PHYADDR 1
76 #define CONFIG_PHY_ATHEROS
80 #define CONFIG_VIDEO_IPUV3
81 #define CONFIG_CFB_CONSOLE
82 #define CONFIG_VGA_AS_SINGLE_DEVICE
83 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
84 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
85 #define CONFIG_VIDEO_BMP_RLE8
86 #define CONFIG_SPLASH_SCREEN
87 #define CONFIG_SPLASH_SCREEN_ALIGN
88 #define CONFIG_BMP_16BPP
89 #define CONFIG_VIDEO_LOGO
90 #define CONFIG_VIDEO_BMP_LOGO
91 #define CONFIG_IPUV3_CLK 260000000
92 #define CONFIG_CMD_HDMIDETECT
93 #define CONFIG_IMX_HDMI
94 #define CONFIG_IMX_VIDEO_SKIP
96 #define CONFIG_CMD_FUSE
97 #ifdef CONFIG_CMD_FUSE
98 #define CONFIG_MXC_OCOTP
101 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
102 #define CONFIG_EXTRA_ENV_SETTINGS \
103 "script=boot.scr\0" \
105 "console=ttymxc0\0" \
107 "fdtfile=undefined\0" \
108 "fdt_high=0xffffffff\0" \
109 "initrd_high=0xffffffff\0" \
110 "fdt_addr=0x18000000\0" \
113 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
115 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
116 "update_sd_firmware_filename=u-boot.imx\0" \
117 "update_sd_firmware=" \
118 "if test ${ip_dyn} = yes; then " \
119 "setenv get_cmd dhcp; " \
121 "setenv get_cmd tftp; " \
123 "if mmc dev ${mmcdev}; then " \
124 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
125 "setexpr fw_sz ${filesize} / 0x200; " \
126 "setexpr fw_sz ${fw_sz} + 1; " \
127 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
130 "mmcargs=setenv bootargs console=${console},${baudrate} " \
131 "root=${mmcroot}; run videoargs\0" \
133 "setenv nextcon 0; " \
134 "if hdmidet; then " \
135 "setenv bootargs ${bootargs} " \
136 "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
138 "setenv fbmen fbmem=28M; " \
139 "setexpr nextcon ${nextcon} + 1; " \
141 "echo - no HDMI monitor;" \
144 "if i2c probe 0x10; then " \
145 "setenv bootargs ${bootargs} " \
146 "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
147 "if=RGB666,bpp=32; " \
148 "if test 0 -eq ${nextcon}; then " \
149 "setenv fbmem fbmem=10M; " \
151 "setenv fbmem ${fbmem},10M; " \
153 "setexpr nextcon ${nextcon} + 1; " \
155 "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
157 "setenv bootargs ${bootargs} ${fbmem}\0" \
159 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
160 "bootscript=echo Running bootscript from mmc ...; " \
162 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
163 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
164 "mmcboot=echo Booting from mmc ...; " \
166 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
167 "if run loadfdt; then " \
168 "bootz ${loadaddr} - ${fdt_addr}; " \
170 "if test ${boot_fdt} = try; then " \
173 "echo WARN: Cannot load the DT; " \
179 "netargs=setenv bootargs console=${console},${baudrate} " \
181 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
182 "netboot=echo Booting from net ...; " \
184 "if test ${ip_dyn} = yes; then " \
185 "setenv get_cmd dhcp; " \
187 "setenv get_cmd tftp; " \
189 "${get_cmd} ${image}; " \
190 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
191 "if ${get_cmd} ${fdt_addr} ${fdtfile}; then " \
192 "bootz ${loadaddr} - ${fdt_addr}; " \
194 "if test ${boot_fdt} = try; then " \
197 "echo WARN: Cannot load the DT; " \
204 "if test $board_rev = MX6Q ; then " \
205 "setenv fdtfile imx6q-wandboard.dtb; fi; " \
206 "if test $board_rev = MX6DL ; then " \
207 "setenv fdtfile imx6dl-wandboard.dtb; fi; " \
208 "if test $fdtfile = undefined; then " \
209 "echo WARNING: Could not determine dtb to use; fi; \0" \
211 #define CONFIG_BOOTCOMMAND \
213 "mmc dev ${mmcdev}; if mmc rescan; then " \
214 "if run loadbootscript; then " \
217 "if run loadimage; then " \
219 "else run netboot; " \
222 "else run netboot; fi"
224 /* Physical Memory Map */
225 #define CONFIG_NR_DRAM_BANKS 1
226 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
228 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
229 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
230 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
232 #define CONFIG_SYS_INIT_SP_OFFSET \
233 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
234 #define CONFIG_SYS_INIT_SP_ADDR \
235 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
237 /* Environment organization */
238 #define CONFIG_ENV_SIZE (8 * 1024)
240 #define CONFIG_ENV_IS_IN_MMC
241 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
242 #define CONFIG_SYS_MMC_ENV_DEV 0
244 #ifndef CONFIG_SYS_DCACHE_OFF
245 #define CONFIG_CMD_CACHE
248 #endif /* __CONFIG_H * */