xref: /openbmc/u-boot/include/configs/mx6qarm2.h (revision 6afb3574)
1 /*
2  * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3  *
4  * Configuration settings for the Freescale i.MX6Q Armadillo2 board.
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #ifndef __CONFIG_H
10 #define __CONFIG_H
11 
12 #define CONFIG_MX6
13 
14 #include "mx6_common.h"
15 
16 #define CONFIG_DISPLAY_CPUINFO
17 #define CONFIG_DISPLAY_BOARDINFO
18 
19 #include <asm/arch/imx-regs.h>
20 
21 #define CONFIG_CMDLINE_TAG
22 #define CONFIG_SETUP_MEMORY_TAGS
23 #define CONFIG_INITRD_TAG
24 
25 #define CONFIG_SYS_GENERIC_BOARD
26 
27 /* Size of malloc() pool */
28 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
29 
30 #define CONFIG_BOARD_EARLY_INIT_F
31 #define CONFIG_MXC_GPIO
32 
33 #define CONFIG_MXC_UART
34 #define CONFIG_MXC_UART_BASE		UART4_BASE
35 
36 /* MMC Configs */
37 #define CONFIG_FSL_ESDHC
38 #define CONFIG_FSL_USDHC
39 #define CONFIG_SYS_FSL_ESDHC_ADDR	USDHC4_BASE_ADDR
40 #define CONFIG_SYS_FSL_USDHC_NUM	2
41 
42 #define CONFIG_MMC
43 #define CONFIG_CMD_MMC
44 #define CONFIG_GENERIC_MMC
45 #define CONFIG_BOUNCE_BUFFER
46 #define CONFIG_CMD_FAT
47 #define CONFIG_DOS_PARTITION
48 
49 #define CONFIG_CMD_PING
50 #define CONFIG_CMD_DHCP
51 #define CONFIG_CMD_MII
52 #define CONFIG_CMD_NET
53 #define	CONFIG_FEC_MXC
54 #define	CONFIG_MII
55 #define IMX_FEC_BASE			ENET_BASE_ADDR
56 #define	CONFIG_FEC_XCV_TYPE		RGMII
57 #define CONFIG_FEC_MXC_PHYADDR		0
58 
59 /* allow to overwrite serial and ethaddr */
60 #define CONFIG_ENV_OVERWRITE
61 #define CONFIG_CONS_INDEX		1
62 #define CONFIG_BAUDRATE			115200
63 
64 /* Command definition */
65 #include <config_cmd_default.h>
66 
67 #undef CONFIG_CMD_IMLS
68 
69 #define CONFIG_BOOTDELAY		3
70 
71 #define CONFIG_LOADADDR			0x12000000
72 #define CONFIG_SYS_TEXT_BASE		0x17800000
73 
74 #define CONFIG_EXTRA_ENV_SETTINGS \
75 	"script=boot.scr\0" \
76 	"image=zImage\0" \
77 	"console=ttymxc3\0" \
78 	"fdt_file=imx6q-arm2.dtb\0" \
79 	"fdt_addr=0x18000000\0" \
80 	"fdt_high=0xffffffff\0" \
81 	"initrd_high=0xffffffff\0" \
82 	"boot_fdt=try\0" \
83 	"ip_dyn=yes\0" \
84 	"mmcdev=1\0" \
85 	"mmcpart=1\0" \
86 	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
87 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
88 		"root=${mmcroot}\0" \
89 	"loadbootscript=" \
90 		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
91 	"bootscript=echo Running bootscript from mmc ...; " \
92 		"source\0" \
93 	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
94 	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
95 	"mmcboot=echo Booting from mmc ...; " \
96 		"run mmcargs; " \
97 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
98 			"if run loadfdt; then " \
99 				"bootz ${loadaddr} - ${fdt_addr}; " \
100 			"else " \
101 				"if test ${boot_fdt} = try; then " \
102 					"bootz; " \
103 				"else " \
104 					"echo WARN: Cannot load the DT; " \
105 				"fi; " \
106 			"fi; " \
107 		"else " \
108 			"bootz; " \
109 		"fi;\0" \
110 	"netargs=setenv bootargs console=${console},${baudrate} " \
111 		"root=/dev/nfs " \
112 		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
113 	"netboot=echo Booting from net ...; " \
114 		"run netargs; " \
115 		"if test ${ip_dyn} = yes; then " \
116 			"setenv get_cmd dhcp; " \
117 		"else " \
118 			"setenv get_cmd tftp; " \
119 		"fi; " \
120 		"${get_cmd} ${image}; " \
121 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
122 			"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
123 				"bootz ${loadaddr} - ${fdt_addr}; " \
124 			"else " \
125 				"if test ${boot_fdt} = try; then " \
126 					"bootz; " \
127 				"else " \
128 					"echo WARN: Cannot load the DT; " \
129 				"fi; " \
130 			"fi; " \
131 		"else " \
132 			"bootz; " \
133 		"fi;\0"
134 
135 #define CONFIG_BOOTCOMMAND \
136 	"mmc dev ${mmcdev};" \
137 	"mmc dev ${mmcdev}; if mmc rescan; then " \
138 		"if run loadbootscript; then " \
139 			"run bootscript; " \
140 		"else " \
141 			"if run loadimage; then " \
142 				"run mmcboot; " \
143 			"else run netboot; " \
144 			"fi; " \
145 		"fi; " \
146 	"else run netboot; fi"
147 
148 #define CONFIG_ARP_TIMEOUT	200UL
149 
150 /* Miscellaneous configurable options */
151 #define CONFIG_SYS_LONGHELP
152 #define CONFIG_SYS_HUSH_PARSER
153 #define CONFIG_AUTO_COMPLETE
154 #define CONFIG_SYS_CBSIZE		256
155 
156 /* Print Buffer Size */
157 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
158 #define CONFIG_SYS_MAXARGS		16
159 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
160 
161 #define CONFIG_SYS_MEMTEST_START	0x10000000
162 #define CONFIG_SYS_MEMTEST_END		0x10010000
163 
164 #define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR
165 
166 #define CONFIG_CMDLINE_EDITING
167 
168 /* Physical Memory Map */
169 #define CONFIG_NR_DRAM_BANKS		1
170 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
171 
172 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
173 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
174 #define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
175 
176 #define CONFIG_SYS_INIT_SP_OFFSET \
177 	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
178 #define CONFIG_SYS_INIT_SP_ADDR \
179 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
180 
181 /* FLASH and environment organization */
182 #define CONFIG_SYS_NO_FLASH
183 
184 #define CONFIG_ENV_OFFSET		(6 * 64 * 1024)
185 #define CONFIG_ENV_SIZE			(8 * 1024)
186 #define CONFIG_ENV_IS_IN_MMC
187 #define CONFIG_SYS_MMC_ENV_DEV		1
188 
189 #define CONFIG_OF_LIBFDT
190 #define CONFIG_CMD_BOOTZ
191 
192 #endif				/* __CONFIG_H */
193