blob: a1a1750cfddf5538ee72942486eee3089060adac [file] [log] [blame]
Fabio Estevam5c824dd2013-09-26 22:59:25 -03001/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for Udoo board.
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __CONFIG_H
10#define __CONFIG_H
11
12#include <asm/arch/imx-regs.h>
13#include <asm/imx-common/gpio.h>
14#include <asm/sizes.h>
15
16#define CONFIG_MX6
17#define CONFIG_DISPLAY_CPUINFO
18#define CONFIG_DISPLAY_BOARDINFO
19
20#define MACH_TYPE_UDOO 4800
21#define CONFIG_MACH_TYPE MACH_TYPE_UDOO
22
23#define CONFIG_CMDLINE_TAG
24#define CONFIG_SETUP_MEMORY_TAGS
25#define CONFIG_INITRD_TAG
26#define CONFIG_REVISION_TAG
27
28/* Size of malloc() pool */
29#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
30
31#define CONFIG_BOARD_EARLY_INIT_F
32#define CONFIG_MXC_GPIO
33
34#define CONFIG_MXC_UART
35#define CONFIG_MXC_UART_BASE UART2_BASE
36
Giuseppe Pagano3fe87cd2013-11-28 12:32:49 +010037/* SATA Configs */
38
39#define CONFIG_CMD_SATA
40#ifdef CONFIG_CMD_SATA
41#define CONFIG_DWC_AHSATA
42#define CONFIG_SYS_SATA_MAX_DEVICE 1
43#define CONFIG_DWC_AHSATA_PORT_ID 0
44#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
45#define CONFIG_LBA48
46#define CONFIG_LIBATA
47#endif
48
Giuseppe Paganocbadb0b2013-11-15 17:42:51 +010049/* Network support */
50
51#define CONFIG_CMD_PING
52#define CONFIG_CMD_DHCP
53#define CONFIG_CMD_MII
54#define CONFIG_CMD_NET
55#define CONFIG_FEC_MXC
56#define CONFIG_MII
57#define IMX_FEC_BASE ENET_BASE_ADDR
58#define CONFIG_FEC_XCV_TYPE RGMII
59#define CONFIG_ETHPRIME "FEC"
60#define CONFIG_FEC_MXC_PHYADDR 6
61#define CONFIG_PHYLIB
62#define CONFIG_PHY_MICREL
63#define CONFIG_PHY_MICREL_KSZ9031
64
Fabio Estevam5c824dd2013-09-26 22:59:25 -030065/* allow to overwrite serial and ethaddr */
66#define CONFIG_ENV_OVERWRITE
67#define CONFIG_CONS_INDEX 1
68#define CONFIG_BAUDRATE 115200
69
70/* Command definition */
71#include <config_cmd_default.h>
72
73#undef CONFIG_CMD_IMLS
74
75#define CONFIG_CMD_BMODE
76#define CONFIG_CMD_SETEXPR
77
78#define CONFIG_BOOTDELAY 3
79
80#define CONFIG_SYS_MEMTEST_START 0x10000000
81#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
82#define CONFIG_LOADADDR 0x12000000
83#define CONFIG_SYS_TEXT_BASE 0x17800000
84
85/* MMC Configuration */
86#define CONFIG_FSL_ESDHC
87#define CONFIG_FSL_USDHC
88#define CONFIG_SYS_FSL_ESDHC_ADDR 0
89
90#define CONFIG_MMC
91#define CONFIG_CMD_MMC
92#define CONFIG_GENERIC_MMC
93#define CONFIG_BOUNCE_BUFFER
94#define CONFIG_CMD_EXT2
95#define CONFIG_CMD_FAT
96#define CONFIG_DOS_PARTITION
97
98#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
99
100#define CONFIG_EXTRA_ENV_SETTINGS \
101 "script=boot.scr\0" \
102 "uimage=uImage\0" \
103 "console=ttymxc1\0" \
104 "splashpos=m,m\0" \
105 "fdt_high=0xffffffff\0" \
106 "initrd_high=0xffffffff\0" \
107 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
108 "fdt_addr=0x11000000\0" \
109 "boot_fdt=try\0" \
110 "ip_dyn=yes\0" \
111 "mmcdev=0\0" \
112 "mmcpart=1\0" \
113 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
114 "update_sd_firmware_filename=u-boot.imx\0" \
115 "update_sd_firmware=" \
116 "if test ${ip_dyn} = yes; then " \
117 "setenv get_cmd dhcp; " \
118 "else " \
119 "setenv get_cmd tftp; " \
120 "fi; " \
121 "if mmc dev ${mmcdev}; then " \
122 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
123 "setexpr fw_sz ${filesize} / 0x200; " \
124 "setexpr fw_sz ${fw_sz} + 1; " \
125 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
126 "fi; " \
127 "fi\0" \
128 "mmcargs=setenv bootargs console=${console},${baudrate} " \
129 "root=${mmcroot}\0" \
130 "loadbootscript=" \
131 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
132 "bootscript=echo Running bootscript from mmc ...; " \
133 "source\0" \
134 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
135 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
136 "mmcboot=echo Booting from mmc ...; " \
137 "run mmcargs; " \
138 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
139 "if run loadfdt; then " \
140 "bootm ${loadaddr} - ${fdt_addr}; " \
141 "else " \
142 "if test ${boot_fdt} = try; then " \
143 "bootm; " \
144 "else " \
145 "echo WARN: Cannot load the DT; " \
146 "fi; " \
147 "fi; " \
148 "else " \
149 "bootm; " \
150 "fi;\0" \
151 "netargs=setenv bootargs console=${console},${baudrate} " \
152 "root=/dev/nfs " \
153 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
154 "netboot=echo Booting from net ...; " \
155 "run netargs; " \
156 "if test ${ip_dyn} = yes; then " \
157 "setenv get_cmd dhcp; " \
158 "else " \
159 "setenv get_cmd tftp; " \
160 "fi; " \
161 "${get_cmd} ${uimage}; " \
162 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
163 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
164 "bootm ${loadaddr} - ${fdt_addr}; " \
165 "else " \
166 "if test ${boot_fdt} = try; then " \
167 "bootm; " \
168 "else " \
169 "echo WARN: Cannot load the DT; " \
170 "fi; " \
171 "fi; " \
172 "else " \
173 "bootm; " \
174 "fi;\0"
175
176#define CONFIG_BOOTCOMMAND \
177 "mmc dev ${mmcdev}; if mmc rescan; then " \
178 "if run loadbootscript; then " \
179 "run bootscript; " \
180 "else " \
181 "if run loaduimage; then " \
182 "run mmcboot; " \
183 "else run netboot; " \
184 "fi; " \
185 "fi; " \
186 "else run netboot; fi"
187
188/* Miscellaneous configurable options */
189#define CONFIG_SYS_LONGHELP
190#define CONFIG_SYS_HUSH_PARSER
191#define CONFIG_SYS_PROMPT "=> "
192#define CONFIG_AUTO_COMPLETE
193#define CONFIG_SYS_CBSIZE 256
194
195/* Print Buffer Size */
196#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
197#define CONFIG_SYS_MAXARGS 16
198#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
199
200#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
201#define CONFIG_SYS_HZ 1000
202
203#define CONFIG_CMDLINE_EDITING
204
205/* Physical Memory Map */
206#define CONFIG_NR_DRAM_BANKS 1
207#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
208
209#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
210#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
211#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
212
213#define CONFIG_SYS_INIT_SP_OFFSET \
214 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
215#define CONFIG_SYS_INIT_SP_ADDR \
216 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
217
218/* FLASH and environment organization */
219#define CONFIG_SYS_NO_FLASH
220
221#define CONFIG_ENV_SIZE (8 * 1024)
222
223#define CONFIG_ENV_IS_IN_MMC
224#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
225#define CONFIG_SYS_MMC_ENV_DEV 0
226
227#define CONFIG_OF_LIBFDT
228#define CONFIG_CMD_BOOTZ
229
230#ifndef CONFIG_SYS_DCACHE_OFF
231#define CONFIG_CMD_CACHE
232#endif
233
234#endif /* __CONFIG_H * */