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