blob: 120e3f6ffd00a1531dba7c9a115be46fac884f80 [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 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 */
11
12#ifndef __CONFIG_H
13#define __CONFIG_H
14
15#include <asm/arch/imx-regs.h>
16#include <asm/imx-common/gpio.h>
17#include <asm/sizes.h>
18
19#define CONFIG_MX6
20#define CONFIG_DISPLAY_CPUINFO
21#define CONFIG_DISPLAY_BOARDINFO
22
23#define MACH_TYPE_WANDBOARD 4412
24#define CONFIG_MACH_TYPE MACH_TYPE_WANDBOARD
25
26#define CONFIG_CMDLINE_TAG
27#define CONFIG_SETUP_MEMORY_TAGS
28#define CONFIG_INITRD_TAG
29#define CONFIG_REVISION_TAG
30
31/* Size of malloc() pool */
32#define CONFIG_SYS_MALLOC_LEN (3 * SZ_1M)
33
34#define CONFIG_BOARD_EARLY_INIT_F
35#define CONFIG_MXC_GPIO
36
37#define CONFIG_MXC_UART
38#define CONFIG_MXC_UART_BASE UART1_BASE
39
40/* allow to overwrite serial and ethaddr */
41#define CONFIG_ENV_OVERWRITE
42#define CONFIG_CONS_INDEX 1
43#define CONFIG_BAUDRATE 115200
44
45/* Command definition */
46#include <config_cmd_default.h>
47
48#undef CONFIG_CMD_IMLS
49
50#define CONFIG_BOOTDELAY 5
51
52#define CONFIG_SYS_MEMTEST_START 0x10000000
53#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
54#define CONFIG_LOADADDR 0x12000000
55#define CONFIG_SYS_TEXT_BASE 0x17800000
56
57/* MMC Configuration */
58#define CONFIG_FSL_ESDHC
59#define CONFIG_FSL_USDHC
60#define CONFIG_SYS_FSL_ESDHC_ADDR 0
Fabio Estevame2d282a2013-03-15 10:43:48 +000061
62#define CONFIG_MMC
63#define CONFIG_CMD_MMC
64#define CONFIG_GENERIC_MMC
65#define CONFIG_BOUNCE_BUFFER
66#define CONFIG_CMD_EXT2
67#define CONFIG_CMD_FAT
68#define CONFIG_DOS_PARTITION
69
70/* Ethernet Configuration */
71#define CONFIG_CMD_PING
72#define CONFIG_CMD_DHCP
73#define CONFIG_CMD_MII
74#define CONFIG_CMD_NET
75#define CONFIG_FEC_MXC
76#define CONFIG_MII
77#define IMX_FEC_BASE ENET_BASE_ADDR
78#define CONFIG_FEC_XCV_TYPE RGMII
79#define CONFIG_ETHPRIME "FEC"
80#define CONFIG_FEC_MXC_PHYADDR 1
81#define CONFIG_PHYLIB
82#define CONFIG_PHY_ATHEROS
83
84#if defined(CONFIG_MX6DL)
85#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
86#elif defined(CONFIG_MX6S)
87#define CONFIG_DEFAULT_FDT_FILE "imx6s-wandboard.dtb"
88#endif
89
90#define CONFIG_EXTRA_ENV_SETTINGS \
91 "script=boot.scr\0" \
92 "uimage=uImage\0" \
93 "console=ttymxc0\0" \
94 "fdt_high=0xffffffff\0" \
95 "initrd_high=0xffffffff\0" \
96 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
97 "fdt_addr=0x11000000\0" \
98 "boot_fdt=try\0" \
99 "ip_dyn=yes\0" \
100 "mmcdev=0\0" \
101 "mmcpart=2\0" \
102 "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
103 "mmcargs=setenv bootargs console=${console},${baudrate} " \
104 "root=${mmcroot}\0" \
105 "loadbootscript=" \
106 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
107 "bootscript=echo Running bootscript from mmc ...; " \
108 "source\0" \
109 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
110 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
111 "mmcboot=echo Booting from mmc ...; " \
112 "run mmcargs; " \
113 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
114 "if run loadfdt; then " \
115 "bootm ${loadaddr} - ${fdt_addr}; " \
116 "else " \
117 "if test ${boot_fdt} = try; then " \
118 "bootm; " \
119 "else " \
120 "echo WARN: Cannot load the DT; " \
121 "fi; " \
122 "fi; " \
123 "else " \
124 "bootm; " \
125 "fi;\0" \
126 "netargs=setenv bootargs console=${console},${baudrate} " \
127 "root=/dev/nfs " \
128 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
129 "netboot=echo Booting from net ...; " \
130 "run netargs; " \
131 "if test ${ip_dyn} = yes; then " \
132 "setenv get_cmd dhcp; " \
133 "else " \
134 "setenv get_cmd tftp; " \
135 "fi; " \
136 "${get_cmd} ${uimage}; " \
137 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
138 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
139 "bootm ${loadaddr} - ${fdt_addr}; " \
140 "else " \
141 "if test ${boot_fdt} = try; then " \
142 "bootm; " \
143 "else " \
144 "echo WARN: Cannot load the DT; " \
145 "fi; " \
146 "fi; " \
147 "else " \
148 "bootm; " \
149 "fi;\0"
150
151#define CONFIG_BOOTCOMMAND \
Fabio Estevame2d282a2013-03-15 10:43:48 +0000152 "mmc dev ${mmcdev}; if mmc rescan; then " \
153 "if run loadbootscript; then " \
154 "run bootscript; " \
155 "else " \
156 "if run loaduimage; then " \
157 "run mmcboot; " \
158 "else run netboot; " \
159 "fi; " \
160 "fi; " \
161 "else run netboot; fi"
162
163/* Miscellaneous configurable options */
164#define CONFIG_SYS_LONGHELP
165#define CONFIG_SYS_HUSH_PARSER
166#define CONFIG_SYS_PROMPT "=> "
167#define CONFIG_AUTO_COMPLETE
168#define CONFIG_SYS_CBSIZE 256
169
170/* Print Buffer Size */
171#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
172#define CONFIG_SYS_MAXARGS 16
173#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
174
175#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
176#define CONFIG_SYS_HZ 1000
177
178#define CONFIG_CMDLINE_EDITING
179
180/* Physical Memory Map */
181#define CONFIG_NR_DRAM_BANKS 1
182#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
183
184#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
185#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
186#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
187
188#define CONFIG_SYS_INIT_SP_OFFSET \
189 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
190#define CONFIG_SYS_INIT_SP_ADDR \
191 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
192
193/* FLASH and environment organization */
194#define CONFIG_SYS_NO_FLASH
195
196#define CONFIG_ENV_SIZE (8 * 1024)
197
198#define CONFIG_ENV_IS_IN_MMC
199#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
200#define CONFIG_SYS_MMC_ENV_DEV 0
201
202#define CONFIG_OF_LIBFDT
203#define CONFIG_CMD_BOOTZ
204
205#ifndef CONFIG_SYS_DCACHE_OFF
206#define CONFIG_CMD_CACHE
207#endif
208
209#endif /* __CONFIG_H * */