blob: eaa2c2cd363d4ec4c5713187ad7b8ee0b4080f61 [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
Eric Nelsonc08cd412014-04-25 16:15:46 -070027#define CONFIG_SYS_GENERIC_BOARD
Eric Nelsone5b3a502013-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 Nelson202e3be2014-10-02 12:16:51 -070035#define CONFIG_CMD_GPIO
Marek Vasut9ba89972014-02-06 02:43:45 +010036#define CONFIG_CI_UDC
Troy Kisky760327c2013-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 Nelsone5b3a502013-03-11 08:44:53 +000042
Benoît Thébaudeaudfbc3b22013-04-23 10:17:46 +000043#define CONFIG_CMD_FUSE
44#ifdef CONFIG_CMD_FUSE
45#define CONFIG_MXC_OCOTP
46#endif
47
Eric Nelsone5b3a502013-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 Kiryanov00cd7382014-08-20 15:08:50 +030057#define CONFIG_SF_DEFAULT_CS 0
Eric Nelsone5b3a502013-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
trem03997412013-09-21 18:13:36 +020064#define CONFIG_SYS_I2C
65#define CONFIG_SYS_I2C_MXC
York Sunf1a52162015-03-20 10:20:40 -070066#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Eric Nelsone5b3a502013-03-11 08:44:53 +000067#define CONFIG_SYS_I2C_SPEED 100000
Eric Nelson69691c62014-10-02 12:16:47 -070068#define CONFIG_I2C_EDID
Eric Nelsone5b3a502013-03-11 08:44:53 +000069
Eric Nelsone5b3a502013-03-11 08:44:53 +000070/* MMC Configs */
71#define CONFIG_FSL_ESDHC
72#define CONFIG_FSL_USDHC
73#define CONFIG_SYS_FSL_ESDHC_ADDR 0
74#define CONFIG_SYS_FSL_USDHC_NUM 2
75
76#define CONFIG_MMC
77#define CONFIG_CMD_MMC
78#define CONFIG_GENERIC_MMC
79#define CONFIG_BOUNCE_BUFFER
80#define CONFIG_CMD_EXT2
Kevin Mihelicha7f95eb2014-10-02 12:16:53 -070081#define CONFIG_CMD_EXT4
82#define CONFIG_CMD_EXT4_WRITE
Eric Nelsone5b3a502013-03-11 08:44:53 +000083#define CONFIG_CMD_FAT
84#define CONFIG_DOS_PARTITION
85
86#ifdef CONFIG_MX6Q
87#define CONFIG_CMD_SATA
88#endif
89
90/*
91 * SATA Configs
92 */
93#ifdef CONFIG_CMD_SATA
94#define CONFIG_DWC_AHSATA
95#define CONFIG_SYS_SATA_MAX_DEVICE 1
96#define CONFIG_DWC_AHSATA_PORT_ID 0
97#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
98#define CONFIG_LBA48
99#define CONFIG_LIBATA
100#endif
101
102#define CONFIG_CMD_PING
103#define CONFIG_CMD_DHCP
104#define CONFIG_CMD_MII
105#define CONFIG_CMD_NET
106#define CONFIG_FEC_MXC
107#define CONFIG_MII
108#define IMX_FEC_BASE ENET_BASE_ADDR
109#define CONFIG_FEC_XCV_TYPE RGMII
110#define CONFIG_ETHPRIME "FEC"
111#define CONFIG_FEC_MXC_PHYADDR 6
112#define CONFIG_PHYLIB
113#define CONFIG_PHY_MICREL
114#define CONFIG_PHY_MICREL_KSZ9021
115
116/* USB Configs */
117#define CONFIG_CMD_USB
118#define CONFIG_CMD_FAT
119#define CONFIG_USB_EHCI
120#define CONFIG_USB_EHCI_MX6
121#define CONFIG_USB_STORAGE
122#define CONFIG_USB_HOST_ETHER
123#define CONFIG_USB_ETHER_ASIX
Gerhard Sittig42436a92014-03-08 19:46:16 +0100124#define CONFIG_USB_ETHER_MCS7830
Eric Nelsone5b3a502013-03-11 08:44:53 +0000125#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyed72a9e2013-10-10 15:27:59 -0700126#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
127#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000128#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
129#define CONFIG_MXC_USB_FLAGS 0
Eric Nelson73f61c02014-10-02 12:16:45 -0700130#define CONFIG_USB_KEYBOARD
131#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000132
133/* Miscellaneous commands */
134#define CONFIG_CMD_BMODE
135#define CONFIG_CMD_SETEXPR
136
137/* Framebuffer and LCD */
138#define CONFIG_VIDEO
139#define CONFIG_VIDEO_IPUV3
140#define CONFIG_CFB_CONSOLE
141#define CONFIG_VGA_AS_SINGLE_DEVICE
142#define CONFIG_SYS_CONSOLE_IS_IN_ENV
143#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
144#define CONFIG_VIDEO_BMP_RLE8
145#define CONFIG_SPLASH_SCREEN
Eric Nelson89f2be52015-04-16 11:31:33 -0700146#define CONFIG_SPLASH_SCREEN_ALIGN
147#define CONFIG_VIDEO_BMP_GZIP
148#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000149#define CONFIG_BMP_16BPP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000150#define CONFIG_IPUV3_CLK 260000000
151#define CONFIG_CMD_HDMIDETECT
152#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singlac1fa1302013-07-25 12:12:13 -0500153#define CONFIG_IMX_HDMI
Eric Benard7f63c142014-04-04 19:05:53 +0200154#define CONFIG_IMX_VIDEO_SKIP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000155
156/* allow to overwrite serial and ethaddr */
157#define CONFIG_ENV_OVERWRITE
158#define CONFIG_CONS_INDEX 1
159#define CONFIG_BAUDRATE 115200
160
161/* Command definition */
162#include <config_cmd_default.h>
163
164#undef CONFIG_CMD_IMLS
165
166#define CONFIG_BOOTDELAY 1
167
168#define CONFIG_PREBOOT ""
169
170#define CONFIG_LOADADDR 0x12000000
171#define CONFIG_SYS_TEXT_BASE 0x17800000
172
173#ifdef CONFIG_CMD_SATA
174#define CONFIG_DRIVE_SATA "sata "
175#else
176#define CONFIG_DRIVE_SATA
177#endif
178
179#ifdef CONFIG_CMD_MMC
180#define CONFIG_DRIVE_MMC "mmc "
181#else
182#define CONFIG_DRIVE_MMC
183#endif
184
Diego Rondini4e7394d2014-10-02 12:16:41 -0700185#ifdef CONFIG_USB_STORAGE
186#define CONFIG_DRIVE_USB "usb "
187#else
188#define CONFIG_DRIVE_USB
189#endif
190
191#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
Eric Nelson4cee9852014-10-02 12:16:44 -0700192#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Eric Nelsone5b3a502013-03-11 08:44:53 +0000193
Fabio Estevam1fd60922013-07-26 11:37:17 -0300194#if defined(CONFIG_SABRELITE)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000195#define CONFIG_EXTRA_ENV_SETTINGS \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300196 "script=boot.scr\0" \
197 "uimage=uImage\0" \
198 "console=ttymxc1\0" \
199 "fdt_high=0xffffffff\0" \
200 "initrd_high=0xffffffff\0" \
201 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador2abc2ae2013-12-16 20:44:04 -0200202 "fdt_addr=0x18000000\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300203 "boot_fdt=try\0" \
204 "ip_dyn=yes\0" \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200205 "mmcdevs=0 1\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300206 "mmcpart=1\0" \
207 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
208 "mmcargs=setenv bootargs console=${console},${baudrate} " \
209 "root=${mmcroot}\0" \
210 "loadbootscript=" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200211 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300212 "bootscript=echo Running bootscript from mmc ...; " \
213 "source\0" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200214 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
215 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300216 "mmcboot=echo Booting from mmc ...; " \
217 "run mmcargs; " \
218 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
219 "if run loadfdt; then " \
220 "bootm ${loadaddr} - ${fdt_addr}; " \
221 "else " \
222 "if test ${boot_fdt} = try; then " \
223 "bootm; " \
224 "else " \
225 "echo WARN: Cannot load the DT; " \
226 "fi; " \
227 "fi; " \
228 "else " \
229 "bootm; " \
230 "fi;\0" \
231 "netargs=setenv bootargs console=${console},${baudrate} " \
232 "root=/dev/nfs " \
233 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
234 "netboot=echo Booting from net ...; " \
235 "run netargs; " \
236 "if test ${ip_dyn} = yes; then " \
237 "setenv get_cmd dhcp; " \
238 "else " \
239 "setenv get_cmd tftp; " \
240 "fi; " \
241 "${get_cmd} ${uimage}; " \
242 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
243 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
244 "bootm ${loadaddr} - ${fdt_addr}; " \
245 "else " \
246 "if test ${boot_fdt} = try; then " \
247 "bootm; " \
248 "else " \
249 "echo WARN: Cannot load the DT; " \
250 "fi; " \
251 "fi; " \
252 "else " \
253 "bootm; " \
254 "fi;\0"
255
256#define CONFIG_BOOTCOMMAND \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200257 "for mmcdev in ${mmcdevs}; do " \
258 "mmc dev ${mmcdev}; " \
259 "if mmc rescan; then " \
260 "if run loadbootscript; then " \
261 "run bootscript; " \
262 "else " \
263 "if run loaduimage; then " \
264 "run mmcboot; " \
265 "fi; " \
266 "fi; " \
267 "fi; " \
268 "done; " \
269 "run netboot; "
Fabio Estevam1fd60922013-07-26 11:37:17 -0300270#else
271#define CONFIG_EXTRA_ENV_SETTINGS \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700272 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
Eric Nelson4cee9852014-10-02 12:16:44 -0700273 "umsdevs=" CONFIG_UMSDEVS "\0" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000274 "console=ttymxc1\0" \
275 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
276 "sf erase 0xc0000 0x2000 && " \
277 "echo restored environment to factory default ; fi\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700278 "bootcmd=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000279 "; do " \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700280 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
281 "usb start ;" \
282 "fi; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000283 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700284 "load " \
285 "${dtype} ${disk}:1 " \
286 "10008000 " \
287 "/6x_bootscript" \
288 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000289 "done ; " \
290 "done; " \
291 "setenv stdout serial,vga ; " \
292 "echo ; echo 6x_bootscript not found ; " \
293 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
294 "echo details at http://boundarydevices.com/6q_bootscript ; " \
Eric Nelson4cee9852014-10-02 12:16:44 -0700295 "setenv stdout serial;" \
296 "setenv stdin serial,usbkbd;" \
297 "for dtype in ${umsdevs} ; do " \
298 "if itest.s sata == ${dtype}; then " \
299 "initcmd='sata init' ;" \
300 "else " \
301 "initcmd='mmc rescan' ;" \
302 "fi; " \
303 "for disk in 0 1 ; do " \
304 "if $initcmd && $dtype dev $disk ; then " \
305 "setenv stdout serial,vga; " \
306 "echo expose ${dtype} ${disk} " \
307 "over USB; " \
308 "ums 0 $dtype $disk ;" \
309 "fi; " \
310 " done; " \
311 "done ;" \
312 "setenv stdout serial,vga; " \
313 "echo no block devices found;" \
314 "\0" \
Eric Nelson3253b872014-10-02 12:16:43 -0700315 "initrd_high=0xffffffff\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700316 "upgradeu=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000317 "; do " \
318 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700319 "load ${dtype} ${disk}:1 10008000 " \
320 "/6x_upgrade " \
321 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000322 "done ; " \
323 "done\0" \
324
Fabio Estevam1fd60922013-07-26 11:37:17 -0300325#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000326/* Miscellaneous configurable options */
327#define CONFIG_SYS_LONGHELP
328#define CONFIG_SYS_HUSH_PARSER
329#define CONFIG_SYS_PROMPT "U-Boot > "
330#define CONFIG_AUTO_COMPLETE
331#define CONFIG_SYS_CBSIZE 1024
Troy Kisky93960ca2014-10-02 12:16:48 -0700332#define CONFIG_SYS_MAXARGS 48
Eric Nelsone5b3a502013-03-11 08:44:53 +0000333#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
334
335#define CONFIG_SYS_MEMTEST_START 0x10000000
336#define CONFIG_SYS_MEMTEST_END 0x10010000
337#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
338
339#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
Eric Nelsone5b3a502013-03-11 08:44:53 +0000340
341#define CONFIG_CMDLINE_EDITING
342
343/* Physical Memory Map */
344#define CONFIG_NR_DRAM_BANKS 1
345#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
346
347#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
348#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
349#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
350
351#define CONFIG_SYS_INIT_SP_OFFSET \
352 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
353#define CONFIG_SYS_INIT_SP_ADDR \
354 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
355
356/* FLASH and environment organization */
357#define CONFIG_SYS_NO_FLASH
358
359#define CONFIG_ENV_SIZE (8 * 1024)
360
Fabio Estevam1fd60922013-07-26 11:37:17 -0300361#if defined(CONFIG_SABRELITE)
362#define CONFIG_ENV_IS_IN_MMC
363#else
Eric Nelsone5b3a502013-03-11 08:44:53 +0000364#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevam1fd60922013-07-26 11:37:17 -0300365#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000366
367#if defined(CONFIG_ENV_IS_IN_MMC)
368#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
369#define CONFIG_SYS_MMC_ENV_DEV 0
370#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
371#define CONFIG_ENV_OFFSET (768 * 1024)
372#define CONFIG_ENV_SECT_SIZE (8 * 1024)
373#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
374#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
375#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
376#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
377#endif
378
379#define CONFIG_OF_LIBFDT
380#define CONFIG_CMD_BOOTZ
381
Eric Nelsone5b3a502013-03-11 08:44:53 +0000382#ifndef CONFIG_SYS_DCACHE_OFF
383#define CONFIG_CMD_CACHE
384#endif
385
386#define CONFIG_CMD_BMP
387
388#define CONFIG_CMD_TIME
Eric Nelson2dc9f952014-10-02 12:16:46 -0700389#define CONFIG_CMD_MEMTEST
Eric Nelsone5b3a502013-03-11 08:44:53 +0000390#define CONFIG_SYS_ALT_MEMTEST
391
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700392#define CONFIG_CMD_BOOTZ
Robert Winklerbd76bdd2013-06-06 10:39:27 -0700393#define CONFIG_SUPPORT_RAW_INITRD
Robert Winkler6bced722013-06-06 10:39:28 -0700394#define CONFIG_CMD_FS_GENERIC
Robert Winkler9edd3ba2013-06-06 10:39:26 -0700395
Marek Vasut52303852013-12-14 05:55:29 +0100396/*
397 * PCI express
398 */
Marek Vasut52303852013-12-14 05:55:29 +0100399#ifdef CONFIG_CMD_PCI
400#define CONFIG_PCI
401#define CONFIG_PCI_PNP
402#define CONFIG_PCI_SCAN_SHOW
403#define CONFIG_PCIE_IMX
404#endif
405
Eric Nelson07e6c6a2014-10-02 12:16:40 -0700406#define CONFIG_CMD_ELF
407
408#define CONFIG_USB_GADGET
409#define CONFIG_CMD_USB_MASS_STORAGE
410#define CONFIG_USB_GADGET_MASS_STORAGE
411#define CONFIG_USBDOWNLOAD_GADGET
412#define CONFIG_USB_GADGET_VBUS_DRAW 2
413
414/* Netchip IDs */
415#define CONFIG_G_DNL_VENDOR_NUM 0x0525
416#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
417#define CONFIG_G_DNL_MANUFACTURER "Boundary"
418
Eric Nelson76890e52014-10-02 12:16:52 -0700419#define CONFIG_CMD_FASTBOOT
420#define CONFIG_ANDROID_BOOT_IMAGE
421#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
422#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000
423
Eric Nelsone5b3a502013-03-11 08:44:53 +0000424#endif /* __CONFIG_H */