blob: 957dabecd5ba763ab52342c562677e7ebb5b96ce [file] [log] [blame]
Eric Nelsond67b0d92013-03-11 08:44:53 +00001/*
2 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Boundary Devices Nitrogen6X
5 * and Freescale i.MX6Q Sabre Lite boards.
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Eric Nelsond67b0d92013-03-11 08:44:53 +00008 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
13#define CONFIG_MX6
14#define CONFIG_DISPLAY_CPUINFO
15#define CONFIG_DISPLAY_BOARDINFO
16
17#define CONFIG_MACH_TYPE 3769
18
19#include <asm/arch/imx-regs.h>
20#include <asm/imx-common/gpio.h>
21
22#define CONFIG_CMDLINE_TAG
23#define CONFIG_SETUP_MEMORY_TAGS
24#define CONFIG_INITRD_TAG
25#define CONFIG_REVISION_TAG
26
27/* Size of malloc() pool */
28#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
29
30#define CONFIG_BOARD_EARLY_INIT_F
31#define CONFIG_MISC_INIT_R
32#define CONFIG_MXC_GPIO
Troy Kiskyf3d7cff2013-09-25 18:41:18 -070033#define CONFIG_MV_UDC
34#define CONFIG_USBD_HS
35#define CONFIG_USB_GADGET_DUALSPEED
36#define CONFIG_USB_ETHER
37#define CONFIG_USB_ETH_CDC
38#define CONFIG_NETCONSOLE
Eric Nelsond67b0d92013-03-11 08:44:53 +000039
Benoît Thébaudeau70a5ef22013-04-23 10:17:46 +000040#define CONFIG_CMD_FUSE
41#ifdef CONFIG_CMD_FUSE
42#define CONFIG_MXC_OCOTP
43#endif
44
Eric Nelsond67b0d92013-03-11 08:44:53 +000045#define CONFIG_MXC_UART
46#define CONFIG_MXC_UART_BASE UART2_BASE
47
48#define CONFIG_CMD_SF
49#ifdef CONFIG_CMD_SF
50#define CONFIG_SPI_FLASH
51#define CONFIG_SPI_FLASH_SST
52#define CONFIG_MXC_SPI
53#define CONFIG_SF_DEFAULT_BUS 0
54#define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(3, 19)<<8))
55#define CONFIG_SF_DEFAULT_SPEED 25000000
56#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
57#endif
58
59/* I2C Configs */
60#define CONFIG_CMD_I2C
tremb089d032013-09-21 18:13:36 +020061#define CONFIG_SYS_I2C
62#define CONFIG_SYS_I2C_MXC
Eric Nelsond67b0d92013-03-11 08:44:53 +000063#define CONFIG_SYS_I2C_SPEED 100000
64
Eric Nelsond67b0d92013-03-11 08:44:53 +000065/* MMC Configs */
66#define CONFIG_FSL_ESDHC
67#define CONFIG_FSL_USDHC
68#define CONFIG_SYS_FSL_ESDHC_ADDR 0
69#define CONFIG_SYS_FSL_USDHC_NUM 2
70
71#define CONFIG_MMC
72#define CONFIG_CMD_MMC
73#define CONFIG_GENERIC_MMC
74#define CONFIG_BOUNCE_BUFFER
75#define CONFIG_CMD_EXT2
76#define CONFIG_CMD_FAT
77#define CONFIG_DOS_PARTITION
78
79#ifdef CONFIG_MX6Q
80#define CONFIG_CMD_SATA
81#endif
82
83/*
84 * SATA Configs
85 */
86#ifdef CONFIG_CMD_SATA
87#define CONFIG_DWC_AHSATA
88#define CONFIG_SYS_SATA_MAX_DEVICE 1
89#define CONFIG_DWC_AHSATA_PORT_ID 0
90#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
91#define CONFIG_LBA48
92#define CONFIG_LIBATA
93#endif
94
95#define CONFIG_CMD_PING
96#define CONFIG_CMD_DHCP
97#define CONFIG_CMD_MII
98#define CONFIG_CMD_NET
99#define CONFIG_FEC_MXC
100#define CONFIG_MII
101#define IMX_FEC_BASE ENET_BASE_ADDR
102#define CONFIG_FEC_XCV_TYPE RGMII
103#define CONFIG_ETHPRIME "FEC"
104#define CONFIG_FEC_MXC_PHYADDR 6
105#define CONFIG_PHYLIB
106#define CONFIG_PHY_MICREL
107#define CONFIG_PHY_MICREL_KSZ9021
108
109/* USB Configs */
110#define CONFIG_CMD_USB
111#define CONFIG_CMD_FAT
112#define CONFIG_USB_EHCI
113#define CONFIG_USB_EHCI_MX6
114#define CONFIG_USB_STORAGE
115#define CONFIG_USB_HOST_ETHER
116#define CONFIG_USB_ETHER_ASIX
117#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyd1a52862013-10-10 15:27:59 -0700118#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
119#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsond67b0d92013-03-11 08:44:53 +0000120#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
121#define CONFIG_MXC_USB_FLAGS 0
122
123/* Miscellaneous commands */
124#define CONFIG_CMD_BMODE
125#define CONFIG_CMD_SETEXPR
126
127/* Framebuffer and LCD */
128#define CONFIG_VIDEO
129#define CONFIG_VIDEO_IPUV3
130#define CONFIG_CFB_CONSOLE
131#define CONFIG_VGA_AS_SINGLE_DEVICE
132#define CONFIG_SYS_CONSOLE_IS_IN_ENV
133#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
134#define CONFIG_VIDEO_BMP_RLE8
135#define CONFIG_SPLASH_SCREEN
136#define CONFIG_BMP_16BPP
137#define CONFIG_VIDEO_LOGO
138#define CONFIG_IPUV3_CLK 260000000
139#define CONFIG_CMD_HDMIDETECT
140#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singla5ea7f0e2013-07-25 12:12:13 -0500141#define CONFIG_IMX_HDMI
Eric Nelsond67b0d92013-03-11 08:44:53 +0000142
143/* allow to overwrite serial and ethaddr */
144#define CONFIG_ENV_OVERWRITE
145#define CONFIG_CONS_INDEX 1
146#define CONFIG_BAUDRATE 115200
147
148/* Command definition */
149#include <config_cmd_default.h>
150
151#undef CONFIG_CMD_IMLS
152
153#define CONFIG_BOOTDELAY 1
154
155#define CONFIG_PREBOOT ""
156
157#define CONFIG_LOADADDR 0x12000000
158#define CONFIG_SYS_TEXT_BASE 0x17800000
159
160#ifdef CONFIG_CMD_SATA
161#define CONFIG_DRIVE_SATA "sata "
162#else
163#define CONFIG_DRIVE_SATA
164#endif
165
166#ifdef CONFIG_CMD_MMC
167#define CONFIG_DRIVE_MMC "mmc "
168#else
169#define CONFIG_DRIVE_MMC
170#endif
171
172#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
173
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300174#if defined(CONFIG_SABRELITE)
175#define CONFIG_EXTRA_ENV_SETTINGS \
176 "script=boot.scr\0" \
177 "uimage=uImage\0" \
178 "console=ttymxc1\0" \
179 "fdt_high=0xffffffff\0" \
180 "initrd_high=0xffffffff\0" \
181 "fdt_file=imx6q-sabrelite.dtb\0" \
182 "fdt_addr=0x11000000\0" \
183 "boot_fdt=try\0" \
184 "ip_dyn=yes\0" \
185 "mmcdev=0\0" \
186 "mmcpart=1\0" \
187 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
188 "mmcargs=setenv bootargs console=${console},${baudrate} " \
189 "root=${mmcroot}\0" \
190 "loadbootscript=" \
191 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
192 "bootscript=echo Running bootscript from mmc ...; " \
193 "source\0" \
194 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
195 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
196 "mmcboot=echo Booting from mmc ...; " \
197 "run mmcargs; " \
198 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
199 "if run loadfdt; then " \
200 "bootm ${loadaddr} - ${fdt_addr}; " \
201 "else " \
202 "if test ${boot_fdt} = try; then " \
203 "bootm; " \
204 "else " \
205 "echo WARN: Cannot load the DT; " \
206 "fi; " \
207 "fi; " \
208 "else " \
209 "bootm; " \
210 "fi;\0" \
211 "netargs=setenv bootargs console=${console},${baudrate} " \
212 "root=/dev/nfs " \
213 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
214 "netboot=echo Booting from net ...; " \
215 "run netargs; " \
216 "if test ${ip_dyn} = yes; then " \
217 "setenv get_cmd dhcp; " \
218 "else " \
219 "setenv get_cmd tftp; " \
220 "fi; " \
221 "${get_cmd} ${uimage}; " \
222 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
223 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
224 "bootm ${loadaddr} - ${fdt_addr}; " \
225 "else " \
226 "if test ${boot_fdt} = try; then " \
227 "bootm; " \
228 "else " \
229 "echo WARN: Cannot load the DT; " \
230 "fi; " \
231 "fi; " \
232 "else " \
233 "bootm; " \
234 "fi;\0"
235
236#define CONFIG_BOOTCOMMAND \
237 "mmc dev ${mmcdev}; if mmc rescan; then " \
238 "if run loadbootscript; then " \
239 "run bootscript; " \
240 "else " \
241 "if run loaduimage; then " \
242 "run mmcboot; " \
243 "else run netboot; " \
244 "fi; " \
245 "fi; " \
246 "else run netboot; fi"
247#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000248#define CONFIG_EXTRA_ENV_SETTINGS \
249 "console=ttymxc1\0" \
250 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
251 "sf erase 0xc0000 0x2000 && " \
252 "echo restored environment to factory default ; fi\0" \
253 "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \
254 "; do " \
255 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
256 "for fs in fat ext2 ; do " \
257 "${fs}load " \
258 "${dtype} ${disk}:1 " \
259 "10008000 " \
260 "/6x_bootscript" \
261 "&& source 10008000 ; " \
262 "done ; " \
263 "done ; " \
264 "done; " \
265 "setenv stdout serial,vga ; " \
266 "echo ; echo 6x_bootscript not found ; " \
267 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
268 "echo details at http://boundarydevices.com/6q_bootscript ; " \
269 "setenv stdout serial\0" \
270 "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
271 "; do " \
272 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
273 "for fs in fat ext2 ; do " \
274 "${fs}load ${dtype} ${disk}:1 10008000 " \
275 "/6x_upgrade " \
276 "&& source 10008000 ; " \
277 "done ; " \
278 "done ; " \
279 "done\0" \
280
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300281#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000282/* Miscellaneous configurable options */
283#define CONFIG_SYS_LONGHELP
284#define CONFIG_SYS_HUSH_PARSER
285#define CONFIG_SYS_PROMPT "U-Boot > "
286#define CONFIG_AUTO_COMPLETE
287#define CONFIG_SYS_CBSIZE 1024
288
289/* Print Buffer Size */
290#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
291#define CONFIG_SYS_MAXARGS 16
292#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
293
294#define CONFIG_SYS_MEMTEST_START 0x10000000
295#define CONFIG_SYS_MEMTEST_END 0x10010000
296#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
297
298#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsond67b0d92013-03-11 08:44:53 +0000299
300#define CONFIG_CMDLINE_EDITING
301
302/* Physical Memory Map */
303#define CONFIG_NR_DRAM_BANKS 1
304#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
305
306#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
307#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
308#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
309
310#define CONFIG_SYS_INIT_SP_OFFSET \
311 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
312#define CONFIG_SYS_INIT_SP_ADDR \
313 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
314
315/* FLASH and environment organization */
316#define CONFIG_SYS_NO_FLASH
317
318#define CONFIG_ENV_SIZE (8 * 1024)
319
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300320#if defined(CONFIG_SABRELITE)
321#define CONFIG_ENV_IS_IN_MMC
322#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000323#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300324#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000325
326#if defined(CONFIG_ENV_IS_IN_MMC)
327#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
328#define CONFIG_SYS_MMC_ENV_DEV 0
329#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
330#define CONFIG_ENV_OFFSET (768 * 1024)
331#define CONFIG_ENV_SECT_SIZE (8 * 1024)
332#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
333#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
334#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
335#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
336#endif
337
338#define CONFIG_OF_LIBFDT
339#define CONFIG_CMD_BOOTZ
340
Eric Nelsond67b0d92013-03-11 08:44:53 +0000341#ifndef CONFIG_SYS_DCACHE_OFF
342#define CONFIG_CMD_CACHE
343#endif
344
345#define CONFIG_CMD_BMP
346
347#define CONFIG_CMD_TIME
348#define CONFIG_SYS_ALT_MEMTEST
349
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700350#define CONFIG_CMD_BOOTZ
Robert Winkler36558292013-06-06 10:39:27 -0700351#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler262326b2013-06-06 10:39:28 -0700352#define CONFIG_CMD_FS_GENERIC
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700353
Eric Nelsond67b0d92013-03-11 08:44:53 +0000354#endif /* __CONFIG_H */