blob: 7922bbd30b3daf7be3035d1031cb679f1de7a605 [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
15#define CONFIG_MACH_TYPE 3769
16
Eric Nelsond67b0d92013-03-11 08:44:53 +000017/* Size of malloc() pool */
18#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
19
20#define CONFIG_BOARD_EARLY_INIT_F
21#define CONFIG_MISC_INIT_R
Marek Vasutf016f8c2014-02-06 02:43:45 +010022#define CONFIG_CI_UDC
Troy Kiskyf3d7cff2013-09-25 18:41:18 -070023#define CONFIG_USBD_HS
24#define CONFIG_USB_GADGET_DUALSPEED
25#define CONFIG_USB_ETHER
26#define CONFIG_USB_ETH_CDC
27#define CONFIG_NETCONSOLE
Eric Nelsond67b0d92013-03-11 08:44:53 +000028
Benoît Thébaudeau70a5ef22013-04-23 10:17:46 +000029#define CONFIG_CMD_FUSE
30#ifdef CONFIG_CMD_FUSE
31#define CONFIG_MXC_OCOTP
32#endif
33
Eric Nelsond67b0d92013-03-11 08:44:53 +000034#define CONFIG_MXC_UART
35#define CONFIG_MXC_UART_BASE UART2_BASE
36
37#define CONFIG_CMD_SF
38#ifdef CONFIG_CMD_SF
39#define CONFIG_SPI_FLASH
40#define CONFIG_SPI_FLASH_SST
41#define CONFIG_MXC_SPI
42#define CONFIG_SF_DEFAULT_BUS 0
Nikita Kiryanov155fa9a2014-08-20 15:08:50 +030043#define CONFIG_SF_DEFAULT_CS 0
Eric Nelsond67b0d92013-03-11 08:44:53 +000044#define CONFIG_SF_DEFAULT_SPEED 25000000
45#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
46#endif
47
48/* I2C Configs */
49#define CONFIG_CMD_I2C
tremb089d032013-09-21 18:13:36 +020050#define CONFIG_SYS_I2C
51#define CONFIG_SYS_I2C_MXC
York Sunf8cb1012015-03-20 10:20:40 -070052#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Eric Nelsond67b0d92013-03-11 08:44:53 +000053#define CONFIG_SYS_I2C_SPEED 100000
Eric Nelson5dbdc3c2014-10-02 12:16:47 -070054#define CONFIG_I2C_EDID
Eric Nelsond67b0d92013-03-11 08:44:53 +000055
Eric Nelsond67b0d92013-03-11 08:44:53 +000056/* MMC Configs */
57#define CONFIG_FSL_ESDHC
58#define CONFIG_FSL_USDHC
59#define CONFIG_SYS_FSL_ESDHC_ADDR 0
60#define CONFIG_SYS_FSL_USDHC_NUM 2
61
62#define CONFIG_MMC
63#define CONFIG_CMD_MMC
64#define CONFIG_GENERIC_MMC
65#define CONFIG_BOUNCE_BUFFER
66#define CONFIG_CMD_EXT2
Kevin Mihelich5e3a3882014-10-02 12:16:53 -070067#define CONFIG_CMD_EXT4
68#define CONFIG_CMD_EXT4_WRITE
Eric Nelsond67b0d92013-03-11 08:44:53 +000069#define CONFIG_CMD_FAT
70#define CONFIG_DOS_PARTITION
71
72#ifdef CONFIG_MX6Q
73#define CONFIG_CMD_SATA
74#endif
75
76/*
77 * SATA Configs
78 */
79#ifdef CONFIG_CMD_SATA
80#define CONFIG_DWC_AHSATA
81#define CONFIG_SYS_SATA_MAX_DEVICE 1
82#define CONFIG_DWC_AHSATA_PORT_ID 0
83#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
84#define CONFIG_LBA48
85#define CONFIG_LIBATA
86#endif
87
88#define CONFIG_CMD_PING
89#define CONFIG_CMD_DHCP
90#define CONFIG_CMD_MII
91#define CONFIG_CMD_NET
92#define CONFIG_FEC_MXC
93#define CONFIG_MII
94#define IMX_FEC_BASE ENET_BASE_ADDR
95#define CONFIG_FEC_XCV_TYPE RGMII
96#define CONFIG_ETHPRIME "FEC"
97#define CONFIG_FEC_MXC_PHYADDR 6
98#define CONFIG_PHYLIB
99#define CONFIG_PHY_MICREL
100#define CONFIG_PHY_MICREL_KSZ9021
101
102/* USB Configs */
103#define CONFIG_CMD_USB
104#define CONFIG_CMD_FAT
105#define CONFIG_USB_EHCI
106#define CONFIG_USB_EHCI_MX6
107#define CONFIG_USB_STORAGE
108#define CONFIG_USB_HOST_ETHER
109#define CONFIG_USB_ETHER_ASIX
Gerhard Sittiga7434152014-03-08 19:46:16 +0100110#define CONFIG_USB_ETHER_MCS7830
Eric Nelsond67b0d92013-03-11 08:44:53 +0000111#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyd1a52862013-10-10 15:27:59 -0700112#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
113#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsond67b0d92013-03-11 08:44:53 +0000114#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
115#define CONFIG_MXC_USB_FLAGS 0
Eric Nelsonc36c0002014-10-02 12:16:45 -0700116#define CONFIG_USB_KEYBOARD
117#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000118
119/* Miscellaneous commands */
120#define CONFIG_CMD_BMODE
121#define CONFIG_CMD_SETEXPR
122
123/* Framebuffer and LCD */
124#define CONFIG_VIDEO
125#define CONFIG_VIDEO_IPUV3
126#define CONFIG_CFB_CONSOLE
127#define CONFIG_VGA_AS_SINGLE_DEVICE
128#define CONFIG_SYS_CONSOLE_IS_IN_ENV
129#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
130#define CONFIG_VIDEO_BMP_RLE8
131#define CONFIG_SPLASH_SCREEN
Eric Nelson761bc192015-04-16 11:31:33 -0700132#define CONFIG_SPLASH_SCREEN_ALIGN
133#define CONFIG_VIDEO_BMP_GZIP
134#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
Eric Nelsond67b0d92013-03-11 08:44:53 +0000135#define CONFIG_BMP_16BPP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000136#define CONFIG_IPUV3_CLK 260000000
137#define CONFIG_CMD_HDMIDETECT
138#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singla5ea7f0e2013-07-25 12:12:13 -0500139#define CONFIG_IMX_HDMI
Eric Benarda47e4492014-04-04 19:05:53 +0200140#define CONFIG_IMX_VIDEO_SKIP
Eric Nelsond67b0d92013-03-11 08:44:53 +0000141
142/* allow to overwrite serial and ethaddr */
143#define CONFIG_ENV_OVERWRITE
144#define CONFIG_CONS_INDEX 1
145#define CONFIG_BAUDRATE 115200
146
147/* Command definition */
Eric Nelsond67b0d92013-03-11 08:44:53 +0000148
149#define CONFIG_BOOTDELAY 1
150
151#define CONFIG_PREBOOT ""
152
153#define CONFIG_LOADADDR 0x12000000
154#define CONFIG_SYS_TEXT_BASE 0x17800000
155
156#ifdef CONFIG_CMD_SATA
157#define CONFIG_DRIVE_SATA "sata "
158#else
159#define CONFIG_DRIVE_SATA
160#endif
161
162#ifdef CONFIG_CMD_MMC
163#define CONFIG_DRIVE_MMC "mmc "
164#else
165#define CONFIG_DRIVE_MMC
166#endif
167
Diego Rondini5b7103e2014-10-02 12:16:41 -0700168#ifdef CONFIG_USB_STORAGE
169#define CONFIG_DRIVE_USB "usb "
170#else
171#define CONFIG_DRIVE_USB
172#endif
173
174#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700175#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Eric Nelsond67b0d92013-03-11 08:44:53 +0000176
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300177#if defined(CONFIG_SABRELITE)
178#define CONFIG_EXTRA_ENV_SETTINGS \
179 "script=boot.scr\0" \
180 "uimage=uImage\0" \
181 "console=ttymxc1\0" \
182 "fdt_high=0xffffffff\0" \
183 "initrd_high=0xffffffff\0" \
184 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador6584a1b2013-12-16 20:44:04 -0200185 "fdt_addr=0x18000000\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300186 "boot_fdt=try\0" \
187 "ip_dyn=yes\0" \
Guillaume GARDET05d1c242014-09-11 11:59:52 +0200188 "mmcdevs=0 1\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300189 "mmcpart=1\0" \
190 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
191 "mmcargs=setenv bootargs console=${console},${baudrate} " \
192 "root=${mmcroot}\0" \
193 "loadbootscript=" \
Guillaume GARDET3ee96c72014-08-26 12:05:31 +0200194 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300195 "bootscript=echo Running bootscript from mmc ...; " \
196 "source\0" \
Guillaume GARDET3ee96c72014-08-26 12:05:31 +0200197 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
198 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300199 "mmcboot=echo Booting from mmc ...; " \
200 "run mmcargs; " \
201 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
202 "if run loadfdt; then " \
203 "bootm ${loadaddr} - ${fdt_addr}; " \
204 "else " \
205 "if test ${boot_fdt} = try; then " \
206 "bootm; " \
207 "else " \
208 "echo WARN: Cannot load the DT; " \
209 "fi; " \
210 "fi; " \
211 "else " \
212 "bootm; " \
213 "fi;\0" \
214 "netargs=setenv bootargs console=${console},${baudrate} " \
215 "root=/dev/nfs " \
216 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
217 "netboot=echo Booting from net ...; " \
218 "run netargs; " \
219 "if test ${ip_dyn} = yes; then " \
220 "setenv get_cmd dhcp; " \
221 "else " \
222 "setenv get_cmd tftp; " \
223 "fi; " \
224 "${get_cmd} ${uimage}; " \
225 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
226 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
227 "bootm ${loadaddr} - ${fdt_addr}; " \
228 "else " \
229 "if test ${boot_fdt} = try; then " \
230 "bootm; " \
231 "else " \
232 "echo WARN: Cannot load the DT; " \
233 "fi; " \
234 "fi; " \
235 "else " \
236 "bootm; " \
237 "fi;\0"
238
239#define CONFIG_BOOTCOMMAND \
Guillaume GARDET05d1c242014-09-11 11:59:52 +0200240 "for mmcdev in ${mmcdevs}; do " \
241 "mmc dev ${mmcdev}; " \
242 "if mmc rescan; then " \
243 "if run loadbootscript; then " \
244 "run bootscript; " \
245 "else " \
246 "if run loaduimage; then " \
247 "run mmcboot; " \
248 "fi; " \
249 "fi; " \
250 "fi; " \
251 "done; " \
252 "run netboot; "
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300253#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000254#define CONFIG_EXTRA_ENV_SETTINGS \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700255 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700256 "umsdevs=" CONFIG_UMSDEVS "\0" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000257 "console=ttymxc1\0" \
258 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
259 "sf erase 0xc0000 0x2000 && " \
260 "echo restored environment to factory default ; fi\0" \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700261 "bootcmd=for dtype in ${bootdevs}" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000262 "; do " \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700263 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
264 "usb start ;" \
265 "fi; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000266 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich43a34312014-10-02 12:16:42 -0700267 "load " \
268 "${dtype} ${disk}:1 " \
269 "10008000 " \
270 "/6x_bootscript" \
271 "&& source 10008000 ; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000272 "done ; " \
273 "done; " \
274 "setenv stdout serial,vga ; " \
275 "echo ; echo 6x_bootscript not found ; " \
276 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
277 "echo details at http://boundarydevices.com/6q_bootscript ; " \
Eric Nelson8d97b3a2014-10-02 12:16:44 -0700278 "setenv stdout serial;" \
279 "setenv stdin serial,usbkbd;" \
280 "for dtype in ${umsdevs} ; do " \
281 "if itest.s sata == ${dtype}; then " \
282 "initcmd='sata init' ;" \
283 "else " \
284 "initcmd='mmc rescan' ;" \
285 "fi; " \
286 "for disk in 0 1 ; do " \
287 "if $initcmd && $dtype dev $disk ; then " \
288 "setenv stdout serial,vga; " \
289 "echo expose ${dtype} ${disk} " \
290 "over USB; " \
291 "ums 0 $dtype $disk ;" \
292 "fi; " \
293 " done; " \
294 "done ;" \
295 "setenv stdout serial,vga; " \
296 "echo no block devices found;" \
297 "\0" \
Eric Nelson8145ccc2014-10-02 12:16:43 -0700298 "initrd_high=0xffffffff\0" \
Diego Rondini5b7103e2014-10-02 12:16:41 -0700299 "upgradeu=for dtype in ${bootdevs}" \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000300 "; do " \
301 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich43a34312014-10-02 12:16:42 -0700302 "load ${dtype} ${disk}:1 10008000 " \
303 "/6x_upgrade " \
304 "&& source 10008000 ; " \
Eric Nelsond67b0d92013-03-11 08:44:53 +0000305 "done ; " \
306 "done\0" \
307
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300308#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000309/* Miscellaneous configurable options */
310#define CONFIG_SYS_LONGHELP
311#define CONFIG_SYS_HUSH_PARSER
312#define CONFIG_SYS_PROMPT "U-Boot > "
313#define CONFIG_AUTO_COMPLETE
314#define CONFIG_SYS_CBSIZE 1024
Troy Kisky3f5d9642014-10-02 12:16:48 -0700315#define CONFIG_SYS_MAXARGS 48
Eric Nelsond67b0d92013-03-11 08:44:53 +0000316#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
317
318#define CONFIG_SYS_MEMTEST_START 0x10000000
319#define CONFIG_SYS_MEMTEST_END 0x10010000
320#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
321
322#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsond67b0d92013-03-11 08:44:53 +0000323
324#define CONFIG_CMDLINE_EDITING
325
326/* Physical Memory Map */
327#define CONFIG_NR_DRAM_BANKS 1
328#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
329
330#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
331#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
332#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
333
334#define CONFIG_SYS_INIT_SP_OFFSET \
335 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
336#define CONFIG_SYS_INIT_SP_ADDR \
337 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
338
Peter Robinson056845c2015-05-22 17:30:45 +0100339/* Environment organization */
Eric Nelsond67b0d92013-03-11 08:44:53 +0000340#define CONFIG_ENV_SIZE (8 * 1024)
341
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300342#if defined(CONFIG_SABRELITE)
343#define CONFIG_ENV_IS_IN_MMC
344#else
Eric Nelsond67b0d92013-03-11 08:44:53 +0000345#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevamf8b1e862013-07-26 11:37:17 -0300346#endif
Eric Nelsond67b0d92013-03-11 08:44:53 +0000347
348#if defined(CONFIG_ENV_IS_IN_MMC)
349#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
350#define CONFIG_SYS_MMC_ENV_DEV 0
351#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
352#define CONFIG_ENV_OFFSET (768 * 1024)
353#define CONFIG_ENV_SECT_SIZE (8 * 1024)
354#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
355#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
356#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
357#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
358#endif
359
360#define CONFIG_OF_LIBFDT
361#define CONFIG_CMD_BOOTZ
362
Eric Nelsond67b0d92013-03-11 08:44:53 +0000363#ifndef CONFIG_SYS_DCACHE_OFF
364#define CONFIG_CMD_CACHE
365#endif
366
367#define CONFIG_CMD_BMP
368
369#define CONFIG_CMD_TIME
Eric Nelsond3d70e62014-10-02 12:16:46 -0700370#define CONFIG_CMD_MEMTEST
Eric Nelsond67b0d92013-03-11 08:44:53 +0000371#define CONFIG_SYS_ALT_MEMTEST
372
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700373#define CONFIG_CMD_BOOTZ
Robert Winkler36558292013-06-06 10:39:27 -0700374#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler262326b2013-06-06 10:39:28 -0700375#define CONFIG_CMD_FS_GENERIC
Robert Winkler9b9ba6f2013-06-06 10:39:26 -0700376
Marek Vasut147f8fa2013-12-14 05:55:29 +0100377/*
378 * PCI express
379 */
Marek Vasut147f8fa2013-12-14 05:55:29 +0100380#ifdef CONFIG_CMD_PCI
381#define CONFIG_PCI
382#define CONFIG_PCI_PNP
383#define CONFIG_PCI_SCAN_SHOW
384#define CONFIG_PCIE_IMX
385#endif
386
Eric Nelson84e2dc02014-10-02 12:16:40 -0700387#define CONFIG_CMD_ELF
388
389#define CONFIG_USB_GADGET
390#define CONFIG_CMD_USB_MASS_STORAGE
391#define CONFIG_USB_GADGET_MASS_STORAGE
392#define CONFIG_USBDOWNLOAD_GADGET
393#define CONFIG_USB_GADGET_VBUS_DRAW 2
394
395/* Netchip IDs */
396#define CONFIG_G_DNL_VENDOR_NUM 0x0525
397#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
398#define CONFIG_G_DNL_MANUFACTURER "Boundary"
399
Eric Nelsone9feee62014-10-02 12:16:52 -0700400#define CONFIG_CMD_FASTBOOT
401#define CONFIG_ANDROID_BOOT_IMAGE
402#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
403#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000
404
Eric Nelsond67b0d92013-03-11 08:44:53 +0000405#endif /* __CONFIG_H */