blob: 1432b866b441e3bb50c526ed352a22730ab4475d [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
Eric Nelsone5b3a502013-03-11 08:44:53 +000020#define CONFIG_CMDLINE_TAG
21#define CONFIG_SETUP_MEMORY_TAGS
22#define CONFIG_INITRD_TAG
23#define CONFIG_REVISION_TAG
Eric Nelsonc08cd412014-04-25 16:15:46 -070024#define CONFIG_SYS_GENERIC_BOARD
Eric Nelsone5b3a502013-03-11 08:44:53 +000025
26/* Size of malloc() pool */
27#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
28
29#define CONFIG_BOARD_EARLY_INIT_F
30#define CONFIG_MISC_INIT_R
31#define CONFIG_MXC_GPIO
Eric Nelson202e3be2014-10-02 12:16:51 -070032#define CONFIG_CMD_GPIO
Marek Vasut9ba89972014-02-06 02:43:45 +010033#define CONFIG_CI_UDC
Troy Kisky760327c2013-09-25 18:41:18 -070034#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 Nelsone5b3a502013-03-11 08:44:53 +000039
Benoît Thébaudeaudfbc3b22013-04-23 10:17:46 +000040#define CONFIG_CMD_FUSE
41#ifdef CONFIG_CMD_FUSE
42#define CONFIG_MXC_OCOTP
43#endif
44
Eric Nelsone5b3a502013-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
Nikita Kiryanov00cd7382014-08-20 15:08:50 +030054#define CONFIG_SF_DEFAULT_CS 0
Eric Nelsone5b3a502013-03-11 08:44:53 +000055#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
trem03997412013-09-21 18:13:36 +020061#define CONFIG_SYS_I2C
62#define CONFIG_SYS_I2C_MXC
York Sunf1a52162015-03-20 10:20:40 -070063#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Eric Nelsone5b3a502013-03-11 08:44:53 +000064#define CONFIG_SYS_I2C_SPEED 100000
Eric Nelson69691c62014-10-02 12:16:47 -070065#define CONFIG_I2C_EDID
Eric Nelsone5b3a502013-03-11 08:44:53 +000066
Eric Nelsone5b3a502013-03-11 08:44:53 +000067/* MMC Configs */
68#define CONFIG_FSL_ESDHC
69#define CONFIG_FSL_USDHC
70#define CONFIG_SYS_FSL_ESDHC_ADDR 0
71#define CONFIG_SYS_FSL_USDHC_NUM 2
72
73#define CONFIG_MMC
74#define CONFIG_CMD_MMC
75#define CONFIG_GENERIC_MMC
76#define CONFIG_BOUNCE_BUFFER
77#define CONFIG_CMD_EXT2
Kevin Mihelicha7f95eb2014-10-02 12:16:53 -070078#define CONFIG_CMD_EXT4
79#define CONFIG_CMD_EXT4_WRITE
Eric Nelsone5b3a502013-03-11 08:44:53 +000080#define CONFIG_CMD_FAT
81#define CONFIG_DOS_PARTITION
82
83#ifdef CONFIG_MX6Q
84#define CONFIG_CMD_SATA
85#endif
86
87/*
88 * SATA Configs
89 */
90#ifdef CONFIG_CMD_SATA
91#define CONFIG_DWC_AHSATA
92#define CONFIG_SYS_SATA_MAX_DEVICE 1
93#define CONFIG_DWC_AHSATA_PORT_ID 0
94#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
95#define CONFIG_LBA48
96#define CONFIG_LIBATA
97#endif
98
99#define CONFIG_CMD_PING
100#define CONFIG_CMD_DHCP
101#define CONFIG_CMD_MII
102#define CONFIG_CMD_NET
103#define CONFIG_FEC_MXC
104#define CONFIG_MII
105#define IMX_FEC_BASE ENET_BASE_ADDR
106#define CONFIG_FEC_XCV_TYPE RGMII
107#define CONFIG_ETHPRIME "FEC"
108#define CONFIG_FEC_MXC_PHYADDR 6
109#define CONFIG_PHYLIB
110#define CONFIG_PHY_MICREL
111#define CONFIG_PHY_MICREL_KSZ9021
112
113/* USB Configs */
114#define CONFIG_CMD_USB
115#define CONFIG_CMD_FAT
116#define CONFIG_USB_EHCI
117#define CONFIG_USB_EHCI_MX6
118#define CONFIG_USB_STORAGE
119#define CONFIG_USB_HOST_ETHER
120#define CONFIG_USB_ETHER_ASIX
Gerhard Sittig42436a92014-03-08 19:46:16 +0100121#define CONFIG_USB_ETHER_MCS7830
Eric Nelsone5b3a502013-03-11 08:44:53 +0000122#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyed72a9e2013-10-10 15:27:59 -0700123#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
124#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000125#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
126#define CONFIG_MXC_USB_FLAGS 0
Eric Nelson73f61c02014-10-02 12:16:45 -0700127#define CONFIG_USB_KEYBOARD
128#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000129
130/* Miscellaneous commands */
131#define CONFIG_CMD_BMODE
132#define CONFIG_CMD_SETEXPR
133
134/* Framebuffer and LCD */
135#define CONFIG_VIDEO
136#define CONFIG_VIDEO_IPUV3
137#define CONFIG_CFB_CONSOLE
138#define CONFIG_VGA_AS_SINGLE_DEVICE
139#define CONFIG_SYS_CONSOLE_IS_IN_ENV
140#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
141#define CONFIG_VIDEO_BMP_RLE8
142#define CONFIG_SPLASH_SCREEN
Eric Nelson89f2be52015-04-16 11:31:33 -0700143#define CONFIG_SPLASH_SCREEN_ALIGN
144#define CONFIG_VIDEO_BMP_GZIP
145#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000146#define CONFIG_BMP_16BPP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000147#define CONFIG_IPUV3_CLK 260000000
148#define CONFIG_CMD_HDMIDETECT
149#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singlac1fa1302013-07-25 12:12:13 -0500150#define CONFIG_IMX_HDMI
Eric Benard7f63c142014-04-04 19:05:53 +0200151#define CONFIG_IMX_VIDEO_SKIP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000152
153/* allow to overwrite serial and ethaddr */
154#define CONFIG_ENV_OVERWRITE
155#define CONFIG_CONS_INDEX 1
156#define CONFIG_BAUDRATE 115200
157
158/* Command definition */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000159
160#define CONFIG_BOOTDELAY 1
161
162#define CONFIG_PREBOOT ""
163
164#define CONFIG_LOADADDR 0x12000000
165#define CONFIG_SYS_TEXT_BASE 0x17800000
166
167#ifdef CONFIG_CMD_SATA
168#define CONFIG_DRIVE_SATA "sata "
169#else
170#define CONFIG_DRIVE_SATA
171#endif
172
173#ifdef CONFIG_CMD_MMC
174#define CONFIG_DRIVE_MMC "mmc "
175#else
176#define CONFIG_DRIVE_MMC
177#endif
178
Diego Rondini4e7394d2014-10-02 12:16:41 -0700179#ifdef CONFIG_USB_STORAGE
180#define CONFIG_DRIVE_USB "usb "
181#else
182#define CONFIG_DRIVE_USB
183#endif
184
185#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
Eric Nelson4cee9852014-10-02 12:16:44 -0700186#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Eric Nelsone5b3a502013-03-11 08:44:53 +0000187
Fabio Estevam1fd60922013-07-26 11:37:17 -0300188#if defined(CONFIG_SABRELITE)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000189#define CONFIG_EXTRA_ENV_SETTINGS \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300190 "script=boot.scr\0" \
191 "uimage=uImage\0" \
192 "console=ttymxc1\0" \
193 "fdt_high=0xffffffff\0" \
194 "initrd_high=0xffffffff\0" \
195 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador2abc2ae2013-12-16 20:44:04 -0200196 "fdt_addr=0x18000000\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300197 "boot_fdt=try\0" \
198 "ip_dyn=yes\0" \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200199 "mmcdevs=0 1\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300200 "mmcpart=1\0" \
201 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
202 "mmcargs=setenv bootargs console=${console},${baudrate} " \
203 "root=${mmcroot}\0" \
204 "loadbootscript=" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200205 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300206 "bootscript=echo Running bootscript from mmc ...; " \
207 "source\0" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200208 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
209 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300210 "mmcboot=echo Booting from mmc ...; " \
211 "run mmcargs; " \
212 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
213 "if run loadfdt; then " \
214 "bootm ${loadaddr} - ${fdt_addr}; " \
215 "else " \
216 "if test ${boot_fdt} = try; then " \
217 "bootm; " \
218 "else " \
219 "echo WARN: Cannot load the DT; " \
220 "fi; " \
221 "fi; " \
222 "else " \
223 "bootm; " \
224 "fi;\0" \
225 "netargs=setenv bootargs console=${console},${baudrate} " \
226 "root=/dev/nfs " \
227 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
228 "netboot=echo Booting from net ...; " \
229 "run netargs; " \
230 "if test ${ip_dyn} = yes; then " \
231 "setenv get_cmd dhcp; " \
232 "else " \
233 "setenv get_cmd tftp; " \
234 "fi; " \
235 "${get_cmd} ${uimage}; " \
236 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
237 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
238 "bootm ${loadaddr} - ${fdt_addr}; " \
239 "else " \
240 "if test ${boot_fdt} = try; then " \
241 "bootm; " \
242 "else " \
243 "echo WARN: Cannot load the DT; " \
244 "fi; " \
245 "fi; " \
246 "else " \
247 "bootm; " \
248 "fi;\0"
249
250#define CONFIG_BOOTCOMMAND \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200251 "for mmcdev in ${mmcdevs}; do " \
252 "mmc dev ${mmcdev}; " \
253 "if mmc rescan; then " \
254 "if run loadbootscript; then " \
255 "run bootscript; " \
256 "else " \
257 "if run loaduimage; then " \
258 "run mmcboot; " \
259 "fi; " \
260 "fi; " \
261 "fi; " \
262 "done; " \
263 "run netboot; "
Fabio Estevam1fd60922013-07-26 11:37:17 -0300264#else
265#define CONFIG_EXTRA_ENV_SETTINGS \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700266 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
Eric Nelson4cee9852014-10-02 12:16:44 -0700267 "umsdevs=" CONFIG_UMSDEVS "\0" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000268 "console=ttymxc1\0" \
269 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
270 "sf erase 0xc0000 0x2000 && " \
271 "echo restored environment to factory default ; fi\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700272 "bootcmd=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000273 "; do " \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700274 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
275 "usb start ;" \
276 "fi; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000277 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700278 "load " \
279 "${dtype} ${disk}:1 " \
280 "10008000 " \
281 "/6x_bootscript" \
282 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000283 "done ; " \
284 "done; " \
285 "setenv stdout serial,vga ; " \
286 "echo ; echo 6x_bootscript not found ; " \
287 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
288 "echo details at http://boundarydevices.com/6q_bootscript ; " \
Eric Nelson4cee9852014-10-02 12:16:44 -0700289 "setenv stdout serial;" \
290 "setenv stdin serial,usbkbd;" \
291 "for dtype in ${umsdevs} ; do " \
292 "if itest.s sata == ${dtype}; then " \
293 "initcmd='sata init' ;" \
294 "else " \
295 "initcmd='mmc rescan' ;" \
296 "fi; " \
297 "for disk in 0 1 ; do " \
298 "if $initcmd && $dtype dev $disk ; then " \
299 "setenv stdout serial,vga; " \
300 "echo expose ${dtype} ${disk} " \
301 "over USB; " \
302 "ums 0 $dtype $disk ;" \
303 "fi; " \
304 " done; " \
305 "done ;" \
306 "setenv stdout serial,vga; " \
307 "echo no block devices found;" \
308 "\0" \
Eric Nelson3253b872014-10-02 12:16:43 -0700309 "initrd_high=0xffffffff\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700310 "upgradeu=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000311 "; do " \
312 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700313 "load ${dtype} ${disk}:1 10008000 " \
314 "/6x_upgrade " \
315 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000316 "done ; " \
317 "done\0" \
318
Fabio Estevam1fd60922013-07-26 11:37:17 -0300319#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000320/* Miscellaneous configurable options */
321#define CONFIG_SYS_LONGHELP
322#define CONFIG_SYS_HUSH_PARSER
323#define CONFIG_SYS_PROMPT "U-Boot > "
324#define CONFIG_AUTO_COMPLETE
325#define CONFIG_SYS_CBSIZE 1024
Troy Kisky93960ca2014-10-02 12:16:48 -0700326#define CONFIG_SYS_MAXARGS 48
Eric Nelsone5b3a502013-03-11 08:44:53 +0000327#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
328
329#define CONFIG_SYS_MEMTEST_START 0x10000000
330#define CONFIG_SYS_MEMTEST_END 0x10010000
331#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
332
333#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsone5b3a502013-03-11 08:44:53 +0000334
335#define CONFIG_CMDLINE_EDITING
336
337/* Physical Memory Map */
338#define CONFIG_NR_DRAM_BANKS 1
339#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
340
341#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
342#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
343#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
344
345#define CONFIG_SYS_INIT_SP_OFFSET \
346 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
347#define CONFIG_SYS_INIT_SP_ADDR \
348 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
349
Peter Robinson4b671502015-05-22 17:30:45 +0100350/* Environment organization */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000351#define CONFIG_ENV_SIZE (8 * 1024)
352
Fabio Estevam1fd60922013-07-26 11:37:17 -0300353#if defined(CONFIG_SABRELITE)
354#define CONFIG_ENV_IS_IN_MMC
355#else
Eric Nelsone5b3a502013-03-11 08:44:53 +0000356#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevam1fd60922013-07-26 11:37:17 -0300357#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000358
359#if defined(CONFIG_ENV_IS_IN_MMC)
360#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
361#define CONFIG_SYS_MMC_ENV_DEV 0
362#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
363#define CONFIG_ENV_OFFSET (768 * 1024)
364#define CONFIG_ENV_SECT_SIZE (8 * 1024)
365#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
366#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
367#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
368#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
369#endif
370
371#define CONFIG_OF_LIBFDT
372#define CONFIG_CMD_BOOTZ
373
Eric Nelsone5b3a502013-03-11 08:44:53 +0000374#ifndef CONFIG_SYS_DCACHE_OFF
375#define CONFIG_CMD_CACHE
376#endif
377
378#define CONFIG_CMD_BMP
379
380#define CONFIG_CMD_TIME
Eric Nelson2dc9f952014-10-02 12:16:46 -0700381#define CONFIG_CMD_MEMTEST
Eric Nelsone5b3a502013-03-11 08:44:53 +0000382#define CONFIG_SYS_ALT_MEMTEST
383
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700384#define CONFIG_CMD_BOOTZ
Robert Winklerbd76bdd2013-06-06 10:39:27 -0700385#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler6bced722013-06-06 10:39:28 -0700386#define CONFIG_CMD_FS_GENERIC
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700387
Marek Vasut52303852013-12-14 05:55:29 +0100388/*
389 * PCI express
390 */
Marek Vasut52303852013-12-14 05:55:29 +0100391#ifdef CONFIG_CMD_PCI
392#define CONFIG_PCI
393#define CONFIG_PCI_PNP
394#define CONFIG_PCI_SCAN_SHOW
395#define CONFIG_PCIE_IMX
396#endif
397
Eric Nelson07e6c6a2014-10-02 12:16:40 -0700398#define CONFIG_CMD_ELF
399
400#define CONFIG_USB_GADGET
401#define CONFIG_CMD_USB_MASS_STORAGE
402#define CONFIG_USB_GADGET_MASS_STORAGE
403#define CONFIG_USBDOWNLOAD_GADGET
404#define CONFIG_USB_GADGET_VBUS_DRAW 2
405
406/* Netchip IDs */
407#define CONFIG_G_DNL_VENDOR_NUM 0x0525
408#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
409#define CONFIG_G_DNL_MANUFACTURER "Boundary"
410
Eric Nelson76890e52014-10-02 12:16:52 -0700411#define CONFIG_CMD_FASTBOOT
412#define CONFIG_ANDROID_BOOT_IMAGE
413#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
414#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000
415
Eric Nelsone5b3a502013-03-11 08:44:53 +0000416#endif /* __CONFIG_H */