blob: 6d379ed7ad30eb1ea68c8b03c9099301e764974d [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
Eric Nelsonf7155fa2014-04-25 16:15:46 -070027#define CONFIG_SYS_GENERIC_BOARD
Eric Nelsond67b0d92013-03-11 08:44:53 +000028
29/* Size of malloc() pool */
30#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
31
32#define CONFIG_BOARD_EARLY_INIT_F
33#define CONFIG_MISC_INIT_R
34#define CONFIG_MXC_GPIO
Eric Nelsonc0e7bd62014-10-02 12:16:51 -070035#define CONFIG_CMD_GPIO
Marek Vasutf016f8c2014-02-06 02:43:45 +010036#define CONFIG_CI_UDC
Troy Kiskyf3d7cff2013-09-25 18:41:18 -070037#define CONFIG_USBD_HS
38#define CONFIG_USB_GADGET_DUALSPEED
39#define CONFIG_USB_ETHER
40#define CONFIG_USB_ETH_CDC
41#define CONFIG_NETCONSOLE
Eric Nelsond67b0d92013-03-11 08:44:53 +000042
Benoît Thébaudeau70a5ef22013-04-23 10:17:46 +000043#define CONFIG_CMD_FUSE
44#ifdef CONFIG_CMD_FUSE
45#define CONFIG_MXC_OCOTP
46#endif
47
Eric Nelsond67b0d92013-03-11 08:44:53 +000048#define CONFIG_MXC_UART
49#define CONFIG_MXC_UART_BASE UART2_BASE
50
51#define CONFIG_CMD_SF
52#ifdef CONFIG_CMD_SF
53#define CONFIG_SPI_FLASH
54#define CONFIG_SPI_FLASH_SST
55#define CONFIG_MXC_SPI
56#define CONFIG_SF_DEFAULT_BUS 0
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +030057#define CONFIG_SF_DEFAULT_CS 0
Eric Nelsond67b0d92013-03-11 08:44:53 +000058#define CONFIG_SF_DEFAULT_SPEED 25000000
59#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
60#endif
61
62/* I2C Configs */
63#define CONFIG_CMD_I2C
tremb089d032013-09-21 18:13:36 +020064#define CONFIG_SYS_I2C
65#define CONFIG_SYS_I2C_MXC
Eric Nelsond67b0d92013-03-11 08:44:53 +000066#define CONFIG_SYS_I2C_SPEED 100000
Eric Nelson5dbdc3c2014-10-02 12:16:47 -070067#define CONFIG_I2C_EDID
Eric Nelsond67b0d92013-03-11 08:44:53 +000068
Eric Nelsond67b0d92013-03-11 08:44:53 +000069/* MMC Configs */
70#define CONFIG_FSL_ESDHC
71#define CONFIG_FSL_USDHC
72#define CONFIG_SYS_FSL_ESDHC_ADDR 0
73#define CONFIG_SYS_FSL_USDHC_NUM 2
74
75#define CONFIG_MMC
76#define CONFIG_CMD_MMC
77#define CONFIG_GENERIC_MMC
78#define CONFIG_BOUNCE_BUFFER
79#define CONFIG_CMD_EXT2
Kevin Mihelich5e3a3882014-10-02 12:16:53 -070080#define CONFIG_CMD_EXT4
81#define CONFIG_CMD_EXT4_WRITE
Eric Nelsond67b0d92013-03-11 08:44:53 +000082#define CONFIG_CMD_FAT
83#define CONFIG_DOS_PARTITION
84
85#ifdef CONFIG_MX6Q
86#define CONFIG_CMD_SATA
87#endif
88
89/*
90 * SATA Configs
91 */
92#ifdef CONFIG_CMD_SATA
93#define CONFIG_DWC_AHSATA
94#define CONFIG_SYS_SATA_MAX_DEVICE 1
95#define CONFIG_DWC_AHSATA_PORT_ID 0
96#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
97#define CONFIG_LBA48
98#define CONFIG_LIBATA
99#endif
100
101#define CONFIG_CMD_PING
102#define CONFIG_CMD_DHCP
103#define CONFIG_CMD_MII
104#define CONFIG_CMD_NET
105#define CONFIG_FEC_MXC
106#define CONFIG_MII
107#define IMX_FEC_BASE ENET_BASE_ADDR
108#define CONFIG_FEC_XCV_TYPE RGMII
109#define CONFIG_ETHPRIME "FEC"
110#define CONFIG_FEC_MXC_PHYADDR 6
111#define CONFIG_PHYLIB
112#define CONFIG_PHY_MICREL
113#define CONFIG_PHY_MICREL_KSZ9021
114
115/* USB Configs */
116#define CONFIG_CMD_USB
117#define CONFIG_CMD_FAT
118#define CONFIG_USB_EHCI
119#define CONFIG_USB_EHCI_MX6
120#define CONFIG_USB_STORAGE
121#define CONFIG_USB_HOST_ETHER
122#define CONFIG_USB_ETHER_ASIX
Gerhard Sittiga7434152014-03-08 19:46:16 +0100123#define CONFIG_USB_ETHER_MCS7830
Eric Nelsond67b0d92013-03-11 08:44:53 +0000124#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyd1a52862013-10-10 15:27:59 -0700125#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
126#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsond67b0d92013-03-11 08:44:53 +0000127#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
128#define CONFIG_MXC_USB_FLAGS 0
Eric Nelsonc36c0002014-10-02 12:16:45 -0700129#define CONFIG_USB_KEYBOARD
130#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000131
132/* Miscellaneous commands */
133#define CONFIG_CMD_BMODE
134#define CONFIG_CMD_SETEXPR
135
136/* Framebuffer and LCD */
137#define CONFIG_VIDEO
138#define CONFIG_VIDEO_IPUV3
139#define CONFIG_CFB_CONSOLE
140#define CONFIG_VGA_AS_SINGLE_DEVICE
141#define CONFIG_SYS_CONSOLE_IS_IN_ENV
142#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
143#define CONFIG_VIDEO_BMP_RLE8
144#define CONFIG_SPLASH_SCREEN
145#define CONFIG_BMP_16BPP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000146#define CONFIG_IPUV3_CLK 260000000
147#define CONFIG_CMD_HDMIDETECT
148#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singla5ea7f0e2013-07-25 12:12:13 -0500149#define CONFIG_IMX_HDMI
Eric Benarda47e4492014-04-04 19:05:53 +0200150#define CONFIG_IMX_VIDEO_SKIP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000151
152/* allow to overwrite serial and ethaddr */
153#define CONFIG_ENV_OVERWRITE
154#define CONFIG_CONS_INDEX 1
155#define CONFIG_BAUDRATE 115200
156
157/* Command definition */
158#include <config_cmd_default.h>
159
160#undef CONFIG_CMD_IMLS
161
162#define CONFIG_BOOTDELAY 1
163
164#define CONFIG_PREBOOT ""
165
166#define CONFIG_LOADADDR 0x12000000
167#define CONFIG_SYS_TEXT_BASE 0x17800000
168
169#ifdef CONFIG_CMD_SATA
170#define CONFIG_DRIVE_SATA "sata "
171#else
172#define CONFIG_DRIVE_SATA
173#endif
174
175#ifdef CONFIG_CMD_MMC
176#define CONFIG_DRIVE_MMC "mmc "
177#else
178#define CONFIG_DRIVE_MMC
179#endif
180
Diego Rondini5b7103e2014-10-02 12:16:41 -0700181#ifdef CONFIG_USB_STORAGE
182#define CONFIG_DRIVE_USB "usb "
183#else
184#define CONFIG_DRIVE_USB
185#endif
186
187#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700188#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Eric Nelsond67b0d92013-03-11 08:44:53 +0000189
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300190#if defined(CONFIG_SABRELITE)
191#define CONFIG_EXTRA_ENV_SETTINGS \
192 "script=boot.scr\0" \
193 "uimage=uImage\0" \
194 "console=ttymxc1\0" \
195 "fdt_high=0xffffffff\0" \
196 "initrd_high=0xffffffff\0" \
197 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -0200198 "fdt_addr=0x18000000\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300199 "boot_fdt=try\0" \
200 "ip_dyn=yes\0" \
Guillaume GARDET05d1c242014-09-11 11:59:52 +0200201 "mmcdevs=0 1\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300202 "mmcpart=1\0" \
203 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
204 "mmcargs=setenv bootargs console=${console},${baudrate} " \
205 "root=${mmcroot}\0" \
206 "loadbootscript=" \
Guillaume GARDET3ee96c72014-08-26 12:05:31 +0200207 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300208 "bootscript=echo Running bootscript from mmc ...; " \
209 "source\0" \
Guillaume GARDET3ee96c72014-08-26 12:05:31 +0200210 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
211 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300212 "mmcboot=echo Booting from mmc ...; " \
213 "run mmcargs; " \
214 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
215 "if run loadfdt; then " \
216 "bootm ${loadaddr} - ${fdt_addr}; " \
217 "else " \
218 "if test ${boot_fdt} = try; then " \
219 "bootm; " \
220 "else " \
221 "echo WARN: Cannot load the DT; " \
222 "fi; " \
223 "fi; " \
224 "else " \
225 "bootm; " \
226 "fi;\0" \
227 "netargs=setenv bootargs console=${console},${baudrate} " \
228 "root=/dev/nfs " \
229 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
230 "netboot=echo Booting from net ...; " \
231 "run netargs; " \
232 "if test ${ip_dyn} = yes; then " \
233 "setenv get_cmd dhcp; " \
234 "else " \
235 "setenv get_cmd tftp; " \
236 "fi; " \
237 "${get_cmd} ${uimage}; " \
238 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
239 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
240 "bootm ${loadaddr} - ${fdt_addr}; " \
241 "else " \
242 "if test ${boot_fdt} = try; then " \
243 "bootm; " \
244 "else " \
245 "echo WARN: Cannot load the DT; " \
246 "fi; " \
247 "fi; " \
248 "else " \
249 "bootm; " \
250 "fi;\0"
251
252#define CONFIG_BOOTCOMMAND \
Guillaume GARDET05d1c242014-09-11 11:59:52 +0200253 "for mmcdev in ${mmcdevs}; do " \
254 "mmc dev ${mmcdev}; " \
255 "if mmc rescan; then " \
256 "if run loadbootscript; then " \
257 "run bootscript; " \
258 "else " \
259 "if run loaduimage; then " \
260 "run mmcboot; " \
261 "fi; " \
262 "fi; " \
263 "fi; " \
264 "done; " \
265 "run netboot; "
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300266#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000267#define CONFIG_EXTRA_ENV_SETTINGS \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700268 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700269 "umsdevs=" CONFIG_UMSDEVS "\0" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000270 "console=ttymxc1\0" \
271 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
272 "sf erase 0xc0000 0x2000 && " \
273 "echo restored environment to factory default ; fi\0" \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700274 "bootcmd=for dtype in ${bootdevs}" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000275 "; do " \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700276 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
277 "usb start ;" \
278 "fi; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000279 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich43a34312014-10-02 12:16:42 -0700280 "load " \
281 "${dtype} ${disk}:1 " \
282 "10008000 " \
283 "/6x_bootscript" \
284 "&& source 10008000 ; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000285 "done ; " \
286 "done; " \
287 "setenv stdout serial,vga ; " \
288 "echo ; echo 6x_bootscript not found ; " \
289 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
290 "echo details at http://boundarydevices.com/6q_bootscript ; " \
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700291 "setenv stdout serial;" \
292 "setenv stdin serial,usbkbd;" \
293 "for dtype in ${umsdevs} ; do " \
294 "if itest.s sata == ${dtype}; then " \
295 "initcmd='sata init' ;" \
296 "else " \
297 "initcmd='mmc rescan' ;" \
298 "fi; " \
299 "for disk in 0 1 ; do " \
300 "if $initcmd && $dtype dev $disk ; then " \
301 "setenv stdout serial,vga; " \
302 "echo expose ${dtype} ${disk} " \
303 "over USB; " \
304 "ums 0 $dtype $disk ;" \
305 "fi; " \
306 " done; " \
307 "done ;" \
308 "setenv stdout serial,vga; " \
309 "echo no block devices found;" \
310 "\0" \
Eric Nelson8145ccc2014-10-02 12:16:43 -0700311 "initrd_high=0xffffffff\0" \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700312 "upgradeu=for dtype in ${bootdevs}" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000313 "; do " \
314 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich43a34312014-10-02 12:16:42 -0700315 "load ${dtype} ${disk}:1 10008000 " \
316 "/6x_upgrade " \
317 "&& source 10008000 ; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000318 "done ; " \
319 "done\0" \
320
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300321#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000322/* Miscellaneous configurable options */
323#define CONFIG_SYS_LONGHELP
324#define CONFIG_SYS_HUSH_PARSER
325#define CONFIG_SYS_PROMPT "U-Boot > "
326#define CONFIG_AUTO_COMPLETE
327#define CONFIG_SYS_CBSIZE 1024
328
329/* Print Buffer Size */
330#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
Troy Kisky3f5d9642014-10-02 12:16:48 -0700331#define CONFIG_SYS_MAXARGS 48
Eric Nelsond67b0d92013-03-11 08:44:53 +0000332#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
333
334#define CONFIG_SYS_MEMTEST_START 0x10000000
335#define CONFIG_SYS_MEMTEST_END 0x10010000
336#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
337
338#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsond67b0d92013-03-11 08:44:53 +0000339
340#define CONFIG_CMDLINE_EDITING
341
342/* Physical Memory Map */
343#define CONFIG_NR_DRAM_BANKS 1
344#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
345
346#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
347#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
348#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
349
350#define CONFIG_SYS_INIT_SP_OFFSET \
351 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
352#define CONFIG_SYS_INIT_SP_ADDR \
353 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
354
355/* FLASH and environment organization */
356#define CONFIG_SYS_NO_FLASH
357
358#define CONFIG_ENV_SIZE (8 * 1024)
359
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300360#if defined(CONFIG_SABRELITE)
361#define CONFIG_ENV_IS_IN_MMC
362#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000363#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300364#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000365
366#if defined(CONFIG_ENV_IS_IN_MMC)
367#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
368#define CONFIG_SYS_MMC_ENV_DEV 0
369#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
370#define CONFIG_ENV_OFFSET (768 * 1024)
371#define CONFIG_ENV_SECT_SIZE (8 * 1024)
372#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
373#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
374#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
375#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
376#endif
377
378#define CONFIG_OF_LIBFDT
379#define CONFIG_CMD_BOOTZ
380
Eric Nelsond67b0d92013-03-11 08:44:53 +0000381#ifndef CONFIG_SYS_DCACHE_OFF
382#define CONFIG_CMD_CACHE
383#endif
384
385#define CONFIG_CMD_BMP
386
387#define CONFIG_CMD_TIME
Eric Nelsond3d70e62014-10-02 12:16:46 -0700388#define CONFIG_CMD_MEMTEST
Eric Nelsond67b0d92013-03-11 08:44:53 +0000389#define CONFIG_SYS_ALT_MEMTEST
390
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700391#define CONFIG_CMD_BOOTZ
Robert Winkler36558292013-06-06 10:39:27 -0700392#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler262326b2013-06-06 10:39:28 -0700393#define CONFIG_CMD_FS_GENERIC
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700394
Marek Vasut147f8fa2013-12-14 05:55:29 +0100395/*
396 * PCI express
397 */
Marek Vasut147f8fa2013-12-14 05:55:29 +0100398#ifdef CONFIG_CMD_PCI
399#define CONFIG_PCI
400#define CONFIG_PCI_PNP
401#define CONFIG_PCI_SCAN_SHOW
402#define CONFIG_PCIE_IMX
403#endif
404
Eric Nelson84e2dc02014-10-02 12:16:40 -0700405#define CONFIG_CMD_ELF
406
407#define CONFIG_USB_GADGET
408#define CONFIG_CMD_USB_MASS_STORAGE
409#define CONFIG_USB_GADGET_MASS_STORAGE
410#define CONFIG_USBDOWNLOAD_GADGET
411#define CONFIG_USB_GADGET_VBUS_DRAW 2
412
413/* Netchip IDs */
414#define CONFIG_G_DNL_VENDOR_NUM 0x0525
415#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
416#define CONFIG_G_DNL_MANUFACTURER "Boundary"
417
Eric Nelsone9feee62014-10-02 12:16:52 -0700418#define CONFIG_CMD_FASTBOOT
419#define CONFIG_ANDROID_BOOT_IMAGE
420#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
421#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000
422
Eric Nelsond67b0d92013-03-11 08:44:53 +0000423#endif /* __CONFIG_H */