blob: 9fb501a3412abd71a1e880fd72e42e90f6f47810 [file] [log] [blame]
Fabio Estevame2d282a2013-03-15 10:43:48 +00001/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Wandboard.
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevame2d282a2013-03-15 10:43:48 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
Eric Nelson02824dc2013-11-26 17:40:30 -070012#include "mx6_common.h"
Fabio Estevame2d282a2013-03-15 10:43:48 +000013#include <asm/arch/imx-regs.h>
14#include <asm/imx-common/gpio.h>
Alexey Brodkin1ace4022014-02-26 17:47:58 +040015#include <linux/sizes.h>
Fabio Estevame2d282a2013-03-15 10:43:48 +000016
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
Fabio Estevam7f5d0af2014-04-22 15:34:53 -030029#define CONFIG_SYS_GENERIC_BOARD
30
Fabio Estevame2d282a2013-03-15 10:43:48 +000031/* Size of malloc() pool */
Fabio Estevam7bcb9832013-05-23 07:50:23 +000032#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
Fabio Estevame2d282a2013-03-15 10:43:48 +000033
34#define CONFIG_BOARD_EARLY_INIT_F
Otavio Salvadoreaffaa22013-04-19 03:42:03 +000035#define CONFIG_BOARD_LATE_INIT
Fabio Estevame2d282a2013-03-15 10:43:48 +000036#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
Otavio Salvadoreaffaa22013-04-19 03:42:03 +000051#define CONFIG_CMD_BMODE
Otavio Salvador0798d572013-04-19 03:42:00 +000052#define CONFIG_CMD_SETEXPR
53
Fabio Estevame2d282a2013-03-15 10:43:48 +000054#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
Otavio Salvador8bc7c482014-05-01 19:02:31 -030061/* I2C Configs */
62#define CONFIG_CMD_I2C
63#define CONFIG_SYS_I2C
64#define CONFIG_SYS_I2C_MXC
65#define CONFIG_SYS_I2C_SPEED 100000
66
Fabio Estevame2d282a2013-03-15 10:43:48 +000067/* MMC Configuration */
68#define CONFIG_FSL_ESDHC
69#define CONFIG_FSL_USDHC
Otavio Salvador5ed15732013-04-19 03:42:02 +000070#define CONFIG_SYS_FSL_USDHC_NUM 2
Fabio Estevame2d282a2013-03-15 10:43:48 +000071#define CONFIG_SYS_FSL_ESDHC_ADDR 0
Fabio Estevame2d282a2013-03-15 10:43:48 +000072
73#define CONFIG_MMC
74#define CONFIG_CMD_MMC
75#define CONFIG_GENERIC_MMC
76#define CONFIG_BOUNCE_BUFFER
77#define CONFIG_CMD_EXT2
78#define CONFIG_CMD_FAT
79#define CONFIG_DOS_PARTITION
80
81/* Ethernet Configuration */
82#define CONFIG_CMD_PING
83#define CONFIG_CMD_DHCP
84#define CONFIG_CMD_MII
85#define CONFIG_CMD_NET
86#define CONFIG_FEC_MXC
87#define CONFIG_MII
88#define IMX_FEC_BASE ENET_BASE_ADDR
89#define CONFIG_FEC_XCV_TYPE RGMII
90#define CONFIG_ETHPRIME "FEC"
91#define CONFIG_FEC_MXC_PHYADDR 1
92#define CONFIG_PHYLIB
93#define CONFIG_PHY_ATHEROS
94
Fabio Estevam7bcb9832013-05-23 07:50:23 +000095/* Framebuffer */
96#define CONFIG_VIDEO
97#define CONFIG_VIDEO_IPUV3
98#define CONFIG_CFB_CONSOLE
99#define CONFIG_VGA_AS_SINGLE_DEVICE
100#define CONFIG_SYS_CONSOLE_IS_IN_ENV
101#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
102#define CONFIG_VIDEO_BMP_RLE8
103#define CONFIG_SPLASH_SCREEN
Otavio Salvadora7efb022013-05-27 12:18:44 +0000104#define CONFIG_SPLASH_SCREEN_ALIGN
Fabio Estevam7bcb9832013-05-23 07:50:23 +0000105#define CONFIG_BMP_16BPP
106#define CONFIG_VIDEO_LOGO
Otavio Salvadora7efb022013-05-27 12:18:44 +0000107#define CONFIG_VIDEO_BMP_LOGO
Fabio Estevam7bcb9832013-05-23 07:50:23 +0000108#define CONFIG_IPUV3_CLK 260000000
Otavio Salvador0ef797a2014-05-01 19:02:32 -0300109#define CONFIG_CMD_HDMIDETECT
Pardeep Kumar Singla5ea7f0e2013-07-25 12:12:13 -0500110#define CONFIG_IMX_HDMI
Otavio Salvador8bc7c482014-05-01 19:02:31 -0300111#define CONFIG_IMX_VIDEO_SKIP
Fabio Estevam7bcb9832013-05-23 07:50:23 +0000112
Fabio Estevam9f87640c2014-09-24 15:21:58 -0300113#define CONFIG_CMD_FUSE
114#ifdef CONFIG_CMD_FUSE
115#define CONFIG_MXC_OCOTP
116#endif
117
Fabio Estevamf62cd002013-09-09 18:28:07 -0300118#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
Fabio Estevame2d282a2013-03-15 10:43:48 +0000119#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
Tapani Utriainen491f2942013-06-26 17:51:49 +0800120#elif defined(CONFIG_MX6Q)
121#define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb"
Fabio Estevame2d282a2013-03-15 10:43:48 +0000122#endif
123
124#define CONFIG_EXTRA_ENV_SETTINGS \
125 "script=boot.scr\0" \
John Weberf3533972014-01-06 13:27:22 -0200126 "image=zImage\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000127 "console=ttymxc0\0" \
Otavio Salvadord727ab32013-07-20 17:21:19 -0300128 "splashpos=m,m\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000129 "fdt_high=0xffffffff\0" \
130 "initrd_high=0xffffffff\0" \
131 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -0200132 "fdt_addr=0x18000000\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000133 "boot_fdt=try\0" \
134 "ip_dyn=yes\0" \
Otavio Salvador1e1cbde2013-04-19 03:41:59 +0000135 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Otavio Salvador86812c42013-06-28 18:52:42 -0300136 "mmcpart=1\0" \
137 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Otavio Salvador0798d572013-04-19 03:42:00 +0000138 "update_sd_firmware_filename=u-boot.imx\0" \
139 "update_sd_firmware=" \
140 "if test ${ip_dyn} = yes; then " \
141 "setenv get_cmd dhcp; " \
142 "else " \
143 "setenv get_cmd tftp; " \
144 "fi; " \
145 "if mmc dev ${mmcdev}; then " \
146 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
147 "setexpr fw_sz ${filesize} / 0x200; " \
148 "setexpr fw_sz ${fw_sz} + 1; " \
149 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
150 "fi; " \
151 "fi\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000152 "mmcargs=setenv bootargs console=${console},${baudrate} " \
Otavio Salvador0ef797a2014-05-01 19:02:32 -0300153 "root=${mmcroot}; run videoargs\0" \
154 "videoargs=" \
155 "setenv nextcon 0; " \
156 "if hdmidet; then " \
157 "setenv bootargs ${bootargs} " \
158 "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
159 "if=RGB24; " \
160 "setenv fbmen fbmem=28M; " \
161 "setexpr nextcon ${nextcon} + 1; " \
162 "else " \
163 "echo - no HDMI monitor;" \
164 "fi; " \
165 "i2c dev 1; " \
166 "if i2c probe 0x10; then " \
167 "setenv bootargs ${bootargs} " \
168 "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
169 "if=RGB666; " \
170 "if test 0 -eq ${nextcon}; then " \
171 "setenv fbmem fbmem=10M; " \
172 "else " \
173 "setenv fbmem ${fbmem},10M; " \
174 "fi; " \
175 "setexpr nextcon ${nextcon} + 1; " \
176 "else " \
177 "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
178 "fi; " \
179 "setenv bootargs ${bootargs} ${fbmem}\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000180 "loadbootscript=" \
181 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
182 "bootscript=echo Running bootscript from mmc ...; " \
183 "source\0" \
John Weberf3533972014-01-06 13:27:22 -0200184 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000185 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
186 "mmcboot=echo Booting from mmc ...; " \
187 "run mmcargs; " \
188 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
189 "if run loadfdt; then " \
John Weberf3533972014-01-06 13:27:22 -0200190 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000191 "else " \
192 "if test ${boot_fdt} = try; then " \
John Weberf3533972014-01-06 13:27:22 -0200193 "bootz; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000194 "else " \
195 "echo WARN: Cannot load the DT; " \
196 "fi; " \
197 "fi; " \
198 "else " \
John Weberf3533972014-01-06 13:27:22 -0200199 "bootz; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000200 "fi;\0" \
201 "netargs=setenv bootargs console=${console},${baudrate} " \
202 "root=/dev/nfs " \
203 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
204 "netboot=echo Booting from net ...; " \
205 "run netargs; " \
206 "if test ${ip_dyn} = yes; then " \
207 "setenv get_cmd dhcp; " \
208 "else " \
209 "setenv get_cmd tftp; " \
210 "fi; " \
John Weberf3533972014-01-06 13:27:22 -0200211 "${get_cmd} ${image}; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000212 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
213 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
John Weberf3533972014-01-06 13:27:22 -0200214 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000215 "else " \
216 "if test ${boot_fdt} = try; then " \
John Weberf3533972014-01-06 13:27:22 -0200217 "bootz; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000218 "else " \
219 "echo WARN: Cannot load the DT; " \
220 "fi; " \
221 "fi; " \
222 "else " \
John Weberf3533972014-01-06 13:27:22 -0200223 "bootz; " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000224 "fi;\0"
225
226#define CONFIG_BOOTCOMMAND \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000227 "mmc dev ${mmcdev}; if mmc rescan; then " \
228 "if run loadbootscript; then " \
229 "run bootscript; " \
230 "else " \
John Weberf3533972014-01-06 13:27:22 -0200231 "if run loadimage; then " \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000232 "run mmcboot; " \
233 "else run netboot; " \
234 "fi; " \
235 "fi; " \
236 "else run netboot; fi"
237
238/* Miscellaneous configurable options */
239#define CONFIG_SYS_LONGHELP
240#define CONFIG_SYS_HUSH_PARSER
Fabio Estevame2d282a2013-03-15 10:43:48 +0000241#define CONFIG_AUTO_COMPLETE
242#define CONFIG_SYS_CBSIZE 256
243
244/* Print Buffer Size */
245#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
246#define CONFIG_SYS_MAXARGS 16
247#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
248
249#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevame2d282a2013-03-15 10:43:48 +0000250
251#define CONFIG_CMDLINE_EDITING
252
253/* Physical Memory Map */
254#define CONFIG_NR_DRAM_BANKS 1
255#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
256
257#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
258#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
259#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
260
261#define CONFIG_SYS_INIT_SP_OFFSET \
262 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
263#define CONFIG_SYS_INIT_SP_ADDR \
264 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
265
266/* FLASH and environment organization */
267#define CONFIG_SYS_NO_FLASH
268
269#define CONFIG_ENV_SIZE (8 * 1024)
270
271#define CONFIG_ENV_IS_IN_MMC
272#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
273#define CONFIG_SYS_MMC_ENV_DEV 0
Fabio Estevame2d282a2013-03-15 10:43:48 +0000274
275#define CONFIG_OF_LIBFDT
276#define CONFIG_CMD_BOOTZ
277
278#ifndef CONFIG_SYS_DCACHE_OFF
279#define CONFIG_CMD_CACHE
280#endif
281
282#endif /* __CONFIG_H * */