blob: b137d06e205d464371631d521ddb74305164484c [file] [log] [blame]
Fabio Estevam11027402013-03-15 10:43:48 +00001/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Wandboard.
5 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
Fabio Estevam11027402013-03-15 10:43:48 +00007 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
Eric Nelson062772c2013-11-26 17:40:30 -070012#include "mx6_common.h"
Fabio Estevam11027402013-03-15 10:43:48 +000013#include <asm/arch/imx-regs.h>
14#include <asm/imx-common/gpio.h>
Alexey Brodkin267d8e22014-02-26 17:47:58 +040015#include <linux/sizes.h>
Fabio Estevam11027402013-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 Estevamb9438a02014-04-22 15:34:53 -030029#define CONFIG_SYS_GENERIC_BOARD
30
Fabio Estevam11027402013-03-15 10:43:48 +000031/* Size of malloc() pool */
Fabio Estevam0296f282013-05-23 07:50:23 +000032#define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
Fabio Estevam11027402013-03-15 10:43:48 +000033
34#define CONFIG_BOARD_EARLY_INIT_F
Otavio Salvador54b8ce22013-04-19 03:42:03 +000035#define CONFIG_BOARD_LATE_INIT
Fabio Estevam11027402013-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 Salvador54b8ce22013-04-19 03:42:03 +000051#define CONFIG_CMD_BMODE
Otavio Salvador328e1d82013-04-19 03:42:00 +000052#define CONFIG_CMD_SETEXPR
53
Fabio Estevam11027402013-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
61/* MMC Configuration */
62#define CONFIG_FSL_ESDHC
63#define CONFIG_FSL_USDHC
Otavio Salvadorfe651042013-04-19 03:42:02 +000064#define CONFIG_SYS_FSL_USDHC_NUM 2
Fabio Estevam11027402013-03-15 10:43:48 +000065#define CONFIG_SYS_FSL_ESDHC_ADDR 0
Fabio Estevam11027402013-03-15 10:43:48 +000066
67#define CONFIG_MMC
68#define CONFIG_CMD_MMC
69#define CONFIG_GENERIC_MMC
70#define CONFIG_BOUNCE_BUFFER
71#define CONFIG_CMD_EXT2
72#define CONFIG_CMD_FAT
73#define CONFIG_DOS_PARTITION
74
75/* Ethernet Configuration */
76#define CONFIG_CMD_PING
77#define CONFIG_CMD_DHCP
78#define CONFIG_CMD_MII
79#define CONFIG_CMD_NET
80#define CONFIG_FEC_MXC
81#define CONFIG_MII
82#define IMX_FEC_BASE ENET_BASE_ADDR
83#define CONFIG_FEC_XCV_TYPE RGMII
84#define CONFIG_ETHPRIME "FEC"
85#define CONFIG_FEC_MXC_PHYADDR 1
86#define CONFIG_PHYLIB
87#define CONFIG_PHY_ATHEROS
88
Fabio Estevam0296f282013-05-23 07:50:23 +000089/* Framebuffer */
90#define CONFIG_VIDEO
91#define CONFIG_VIDEO_IPUV3
92#define CONFIG_CFB_CONSOLE
93#define CONFIG_VGA_AS_SINGLE_DEVICE
94#define CONFIG_SYS_CONSOLE_IS_IN_ENV
95#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
96#define CONFIG_VIDEO_BMP_RLE8
97#define CONFIG_SPLASH_SCREEN
Otavio Salvador37abb372013-05-27 12:18:44 +000098#define CONFIG_SPLASH_SCREEN_ALIGN
Fabio Estevam0296f282013-05-23 07:50:23 +000099#define CONFIG_BMP_16BPP
100#define CONFIG_VIDEO_LOGO
Otavio Salvador37abb372013-05-27 12:18:44 +0000101#define CONFIG_VIDEO_BMP_LOGO
Fabio Estevam0296f282013-05-23 07:50:23 +0000102#define CONFIG_IPUV3_CLK 260000000
Pardeep Kumar Singlac1fa1302013-07-25 12:12:13 -0500103#define CONFIG_IMX_HDMI
Fabio Estevam0296f282013-05-23 07:50:23 +0000104
Fabio Estevamb1861d32013-09-09 18:28:07 -0300105#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
Fabio Estevam11027402013-03-15 10:43:48 +0000106#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
Tapani Utriainen048a64d2013-06-26 17:51:49 +0800107#elif defined(CONFIG_MX6Q)
108#define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb"
Fabio Estevam11027402013-03-15 10:43:48 +0000109#endif
110
111#define CONFIG_EXTRA_ENV_SETTINGS \
112 "script=boot.scr\0" \
John Weber0ed48e22014-01-06 13:27:22 -0200113 "image=zImage\0" \
Fabio Estevam11027402013-03-15 10:43:48 +0000114 "console=ttymxc0\0" \
Otavio Salvador4d7a3402013-07-20 17:21:19 -0300115 "splashpos=m,m\0" \
Fabio Estevam11027402013-03-15 10:43:48 +0000116 "fdt_high=0xffffffff\0" \
117 "initrd_high=0xffffffff\0" \
118 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
Otavio Salvador2abc2ae2013-12-16 20:44:04 -0200119 "fdt_addr=0x18000000\0" \
Fabio Estevam11027402013-03-15 10:43:48 +0000120 "boot_fdt=try\0" \
121 "ip_dyn=yes\0" \
Otavio Salvador4f5caa62013-04-19 03:41:59 +0000122 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
Otavio Salvador3beb8342013-06-28 18:52:42 -0300123 "mmcpart=1\0" \
124 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Otavio Salvador328e1d82013-04-19 03:42:00 +0000125 "update_sd_firmware_filename=u-boot.imx\0" \
126 "update_sd_firmware=" \
127 "if test ${ip_dyn} = yes; then " \
128 "setenv get_cmd dhcp; " \
129 "else " \
130 "setenv get_cmd tftp; " \
131 "fi; " \
132 "if mmc dev ${mmcdev}; then " \
133 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
134 "setexpr fw_sz ${filesize} / 0x200; " \
135 "setexpr fw_sz ${fw_sz} + 1; " \
136 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
137 "fi; " \
138 "fi\0" \
Fabio Estevam11027402013-03-15 10:43:48 +0000139 "mmcargs=setenv bootargs console=${console},${baudrate} " \
140 "root=${mmcroot}\0" \
141 "loadbootscript=" \
142 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
143 "bootscript=echo Running bootscript from mmc ...; " \
144 "source\0" \
John Weber0ed48e22014-01-06 13:27:22 -0200145 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
Fabio Estevam11027402013-03-15 10:43:48 +0000146 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
147 "mmcboot=echo Booting from mmc ...; " \
148 "run mmcargs; " \
149 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
150 "if run loadfdt; then " \
John Weber0ed48e22014-01-06 13:27:22 -0200151 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000152 "else " \
153 "if test ${boot_fdt} = try; then " \
John Weber0ed48e22014-01-06 13:27:22 -0200154 "bootz; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000155 "else " \
156 "echo WARN: Cannot load the DT; " \
157 "fi; " \
158 "fi; " \
159 "else " \
John Weber0ed48e22014-01-06 13:27:22 -0200160 "bootz; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000161 "fi;\0" \
162 "netargs=setenv bootargs console=${console},${baudrate} " \
163 "root=/dev/nfs " \
164 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
165 "netboot=echo Booting from net ...; " \
166 "run netargs; " \
167 "if test ${ip_dyn} = yes; then " \
168 "setenv get_cmd dhcp; " \
169 "else " \
170 "setenv get_cmd tftp; " \
171 "fi; " \
John Weber0ed48e22014-01-06 13:27:22 -0200172 "${get_cmd} ${image}; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000173 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
174 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
John Weber0ed48e22014-01-06 13:27:22 -0200175 "bootz ${loadaddr} - ${fdt_addr}; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000176 "else " \
177 "if test ${boot_fdt} = try; then " \
John Weber0ed48e22014-01-06 13:27:22 -0200178 "bootz; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000179 "else " \
180 "echo WARN: Cannot load the DT; " \
181 "fi; " \
182 "fi; " \
183 "else " \
John Weber0ed48e22014-01-06 13:27:22 -0200184 "bootz; " \
Fabio Estevam11027402013-03-15 10:43:48 +0000185 "fi;\0"
186
187#define CONFIG_BOOTCOMMAND \
Fabio Estevam11027402013-03-15 10:43:48 +0000188 "mmc dev ${mmcdev}; if mmc rescan; then " \
189 "if run loadbootscript; then " \
190 "run bootscript; " \
191 "else " \
John Weber0ed48e22014-01-06 13:27:22 -0200192 "if run loadimage; then " \
Fabio Estevam11027402013-03-15 10:43:48 +0000193 "run mmcboot; " \
194 "else run netboot; " \
195 "fi; " \
196 "fi; " \
197 "else run netboot; fi"
198
199/* Miscellaneous configurable options */
200#define CONFIG_SYS_LONGHELP
201#define CONFIG_SYS_HUSH_PARSER
Fabio Estevam11027402013-03-15 10:43:48 +0000202#define CONFIG_AUTO_COMPLETE
203#define CONFIG_SYS_CBSIZE 256
204
205/* Print Buffer Size */
206#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
207#define CONFIG_SYS_MAXARGS 16
208#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
209
210#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Fabio Estevam11027402013-03-15 10:43:48 +0000211
212#define CONFIG_CMDLINE_EDITING
213
214/* Physical Memory Map */
215#define CONFIG_NR_DRAM_BANKS 1
216#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
217
218#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
219#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
220#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
221
222#define CONFIG_SYS_INIT_SP_OFFSET \
223 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
224#define CONFIG_SYS_INIT_SP_ADDR \
225 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
226
227/* FLASH and environment organization */
228#define CONFIG_SYS_NO_FLASH
229
230#define CONFIG_ENV_SIZE (8 * 1024)
231
232#define CONFIG_ENV_IS_IN_MMC
233#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
234#define CONFIG_SYS_MMC_ENV_DEV 0
Fabio Estevam11027402013-03-15 10:43:48 +0000235
236#define CONFIG_OF_LIBFDT
237#define CONFIG_CMD_BOOTZ
238
239#ifndef CONFIG_SYS_DCACHE_OFF
240#define CONFIG_CMD_CACHE
241#endif
242
243#endif /* __CONFIG_H * */