blob: f7e7315a9b695ed8a378f5efcf3b329f5e450cfb [file] [log] [blame]
Eric Nelsone5b3a502013-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 Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Eric Nelsone5b3a502013-03-11 08:44:53 +00008 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
Eric Nelson062772c2013-11-26 17:40:30 -070013#include "mx6_common.h"
Eric Nelsone5b3a502013-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
Marek Vasut9ba89972014-02-06 02:43:45 +010034#define CONFIG_CI_UDC
Troy Kisky760327c2013-09-25 18:41:18 -070035#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 Nelsone5b3a502013-03-11 08:44:53 +000040
Benoît Thébaudeaudfbc3b22013-04-23 10:17:46 +000041#define CONFIG_CMD_FUSE
42#ifdef CONFIG_CMD_FUSE
43#define CONFIG_MXC_OCOTP
44#endif
45
Eric Nelsone5b3a502013-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
trem03997412013-09-21 18:13:36 +020062#define CONFIG_SYS_I2C
63#define CONFIG_SYS_I2C_MXC
Eric Nelsone5b3a502013-03-11 08:44:53 +000064#define CONFIG_SYS_I2C_SPEED 100000
65
Eric Nelsone5b3a502013-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
Gerhard Sittig42436a92014-03-08 19:46:16 +0100118#define CONFIG_USB_ETHER_MCS7830
Eric Nelsone5b3a502013-03-11 08:44:53 +0000119#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyed72a9e2013-10-10 15:27:59 -0700120#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
121#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000122#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
123#define CONFIG_MXC_USB_FLAGS 0
124
125/* Miscellaneous commands */
126#define CONFIG_CMD_BMODE
127#define CONFIG_CMD_SETEXPR
128
129/* Framebuffer and LCD */
130#define CONFIG_VIDEO
131#define CONFIG_VIDEO_IPUV3
132#define CONFIG_CFB_CONSOLE
133#define CONFIG_VGA_AS_SINGLE_DEVICE
134#define CONFIG_SYS_CONSOLE_IS_IN_ENV
135#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
136#define CONFIG_VIDEO_BMP_RLE8
137#define CONFIG_SPLASH_SCREEN
138#define CONFIG_BMP_16BPP
139#define CONFIG_VIDEO_LOGO
140#define CONFIG_IPUV3_CLK 260000000
141#define CONFIG_CMD_HDMIDETECT
142#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singlac1fa1302013-07-25 12:12:13 -0500143#define CONFIG_IMX_HDMI
Eric Nelsone5b3a502013-03-11 08:44:53 +0000144
145/* allow to overwrite serial and ethaddr */
146#define CONFIG_ENV_OVERWRITE
147#define CONFIG_CONS_INDEX 1
148#define CONFIG_BAUDRATE 115200
149
150/* Command definition */
151#include <config_cmd_default.h>
152
153#undef CONFIG_CMD_IMLS
154
155#define CONFIG_BOOTDELAY 1
156
157#define CONFIG_PREBOOT ""
158
159#define CONFIG_LOADADDR 0x12000000
160#define CONFIG_SYS_TEXT_BASE 0x17800000
161
162#ifdef CONFIG_CMD_SATA
163#define CONFIG_DRIVE_SATA "sata "
164#else
165#define CONFIG_DRIVE_SATA
166#endif
167
168#ifdef CONFIG_CMD_MMC
169#define CONFIG_DRIVE_MMC "mmc "
170#else
171#define CONFIG_DRIVE_MMC
172#endif
173
174#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
175
Fabio Estevam1fd60922013-07-26 11:37:17 -0300176#if defined(CONFIG_SABRELITE)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000177#define CONFIG_EXTRA_ENV_SETTINGS \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300178 "script=boot.scr\0" \
179 "uimage=uImage\0" \
180 "console=ttymxc1\0" \
181 "fdt_high=0xffffffff\0" \
182 "initrd_high=0xffffffff\0" \
183 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador2abc2ae2013-12-16 20:44:04 -0200184 "fdt_addr=0x18000000\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300185 "boot_fdt=try\0" \
186 "ip_dyn=yes\0" \
187 "mmcdev=0\0" \
188 "mmcpart=1\0" \
189 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
190 "mmcargs=setenv bootargs console=${console},${baudrate} " \
191 "root=${mmcroot}\0" \
192 "loadbootscript=" \
193 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
194 "bootscript=echo Running bootscript from mmc ...; " \
195 "source\0" \
196 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
197 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
198 "mmcboot=echo Booting from mmc ...; " \
199 "run mmcargs; " \
200 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
201 "if run loadfdt; then " \
202 "bootm ${loadaddr} - ${fdt_addr}; " \
203 "else " \
204 "if test ${boot_fdt} = try; then " \
205 "bootm; " \
206 "else " \
207 "echo WARN: Cannot load the DT; " \
208 "fi; " \
209 "fi; " \
210 "else " \
211 "bootm; " \
212 "fi;\0" \
213 "netargs=setenv bootargs console=${console},${baudrate} " \
214 "root=/dev/nfs " \
215 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
216 "netboot=echo Booting from net ...; " \
217 "run netargs; " \
218 "if test ${ip_dyn} = yes; then " \
219 "setenv get_cmd dhcp; " \
220 "else " \
221 "setenv get_cmd tftp; " \
222 "fi; " \
223 "${get_cmd} ${uimage}; " \
224 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
225 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
226 "bootm ${loadaddr} - ${fdt_addr}; " \
227 "else " \
228 "if test ${boot_fdt} = try; then " \
229 "bootm; " \
230 "else " \
231 "echo WARN: Cannot load the DT; " \
232 "fi; " \
233 "fi; " \
234 "else " \
235 "bootm; " \
236 "fi;\0"
237
238#define CONFIG_BOOTCOMMAND \
239 "mmc dev ${mmcdev}; if mmc rescan; then " \
240 "if run loadbootscript; then " \
241 "run bootscript; " \
242 "else " \
243 "if run loaduimage; then " \
244 "run mmcboot; " \
245 "else run netboot; " \
246 "fi; " \
247 "fi; " \
248 "else run netboot; fi"
249#else
250#define CONFIG_EXTRA_ENV_SETTINGS \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000251 "console=ttymxc1\0" \
252 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
253 "sf erase 0xc0000 0x2000 && " \
254 "echo restored environment to factory default ; fi\0" \
255 "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \
256 "; do " \
257 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
258 "for fs in fat ext2 ; do " \
259 "${fs}load " \
260 "${dtype} ${disk}:1 " \
261 "10008000 " \
262 "/6x_bootscript" \
263 "&& source 10008000 ; " \
264 "done ; " \
265 "done ; " \
266 "done; " \
267 "setenv stdout serial,vga ; " \
268 "echo ; echo 6x_bootscript not found ; " \
269 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
270 "echo details at http://boundarydevices.com/6q_bootscript ; " \
271 "setenv stdout serial\0" \
272 "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
273 "; do " \
274 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
275 "for fs in fat ext2 ; do " \
276 "${fs}load ${dtype} ${disk}:1 10008000 " \
277 "/6x_upgrade " \
278 "&& source 10008000 ; " \
279 "done ; " \
280 "done ; " \
281 "done\0" \
282
Fabio Estevam1fd60922013-07-26 11:37:17 -0300283#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000284/* Miscellaneous configurable options */
285#define CONFIG_SYS_LONGHELP
286#define CONFIG_SYS_HUSH_PARSER
287#define CONFIG_SYS_PROMPT "U-Boot > "
288#define CONFIG_AUTO_COMPLETE
289#define CONFIG_SYS_CBSIZE 1024
290
291/* Print Buffer Size */
292#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
293#define CONFIG_SYS_MAXARGS 16
294#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
295
296#define CONFIG_SYS_MEMTEST_START 0x10000000
297#define CONFIG_SYS_MEMTEST_END 0x10010000
298#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
299
300#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsone5b3a502013-03-11 08:44:53 +0000301
302#define CONFIG_CMDLINE_EDITING
303
304/* Physical Memory Map */
305#define CONFIG_NR_DRAM_BANKS 1
306#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
307
308#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
309#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
310#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
311
312#define CONFIG_SYS_INIT_SP_OFFSET \
313 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
314#define CONFIG_SYS_INIT_SP_ADDR \
315 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
316
317/* FLASH and environment organization */
318#define CONFIG_SYS_NO_FLASH
319
320#define CONFIG_ENV_SIZE (8 * 1024)
321
Fabio Estevam1fd60922013-07-26 11:37:17 -0300322#if defined(CONFIG_SABRELITE)
323#define CONFIG_ENV_IS_IN_MMC
324#else
Eric Nelsone5b3a502013-03-11 08:44:53 +0000325#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevam1fd60922013-07-26 11:37:17 -0300326#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000327
328#if defined(CONFIG_ENV_IS_IN_MMC)
329#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
330#define CONFIG_SYS_MMC_ENV_DEV 0
331#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
332#define CONFIG_ENV_OFFSET (768 * 1024)
333#define CONFIG_ENV_SECT_SIZE (8 * 1024)
334#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
335#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
336#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
337#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
338#endif
339
340#define CONFIG_OF_LIBFDT
341#define CONFIG_CMD_BOOTZ
342
Eric Nelsone5b3a502013-03-11 08:44:53 +0000343#ifndef CONFIG_SYS_DCACHE_OFF
344#define CONFIG_CMD_CACHE
345#endif
346
347#define CONFIG_CMD_BMP
348
349#define CONFIG_CMD_TIME
350#define CONFIG_SYS_ALT_MEMTEST
351
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700352#define CONFIG_CMD_BOOTZ
Robert Winklerbd76bdd2013-06-06 10:39:27 -0700353#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler6bced722013-06-06 10:39:28 -0700354#define CONFIG_CMD_FS_GENERIC
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700355
Marek Vasut52303852013-12-14 05:55:29 +0100356/*
357 * PCI express
358 */
Marek Vasut52303852013-12-14 05:55:29 +0100359#ifdef CONFIG_CMD_PCI
360#define CONFIG_PCI
361#define CONFIG_PCI_PNP
362#define CONFIG_PCI_SCAN_SHOW
363#define CONFIG_PCIE_IMX
364#endif
365
Eric Nelsone5b3a502013-03-11 08:44:53 +0000366#endif /* __CONFIG_H */