blob: 9313b9ff3d541866760a7c03dcc26476fe2605a2 [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
15#define CONFIG_MACH_TYPE 3769
16
Eric Nelsone5b3a502013-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 Vasut9ba89972014-02-06 02:43:45 +010022#define CONFIG_CI_UDC
Troy Kisky760327c2013-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 Nelsone5b3a502013-03-11 08:44:53 +000028
Benoît Thébaudeaudfbc3b22013-04-23 10:17:46 +000029#define CONFIG_CMD_FUSE
30#ifdef CONFIG_CMD_FUSE
31#define CONFIG_MXC_OCOTP
32#endif
33
Eric Nelsone5b3a502013-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 Kiryanov00cd7382014-08-20 15:08:50 +030043#define CONFIG_SF_DEFAULT_CS 0
Eric Nelsone5b3a502013-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
trem03997412013-09-21 18:13:36 +020050#define CONFIG_SYS_I2C
51#define CONFIG_SYS_I2C_MXC
York Sunf1a52162015-03-20 10:20:40 -070052#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
Eric Nelsone5b3a502013-03-11 08:44:53 +000053#define CONFIG_SYS_I2C_SPEED 100000
Eric Nelson69691c62014-10-02 12:16:47 -070054#define CONFIG_I2C_EDID
Eric Nelsone5b3a502013-03-11 08:44:53 +000055
Eric Nelsone5b3a502013-03-11 08:44:53 +000056/* MMC Configs */
Eric Nelsone5b3a502013-03-11 08:44:53 +000057#define CONFIG_SYS_FSL_ESDHC_ADDR 0
58#define CONFIG_SYS_FSL_USDHC_NUM 2
59
Eric Nelsone5b3a502013-03-11 08:44:53 +000060#ifdef CONFIG_MX6Q
61#define CONFIG_CMD_SATA
62#endif
63
64/*
65 * SATA Configs
66 */
67#ifdef CONFIG_CMD_SATA
68#define CONFIG_DWC_AHSATA
69#define CONFIG_SYS_SATA_MAX_DEVICE 1
70#define CONFIG_DWC_AHSATA_PORT_ID 0
71#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
72#define CONFIG_LBA48
73#define CONFIG_LIBATA
74#endif
75
76#define CONFIG_CMD_PING
77#define CONFIG_CMD_DHCP
78#define CONFIG_CMD_MII
79#define CONFIG_CMD_NET
80#define CONFIG_FEC_MXC
81#define CONFIG_MII
82#define IMX_FEC_BASE ENET_BASE_ADDR
83#define CONFIG_FEC_XCV_TYPE RGMII
84#define CONFIG_ETHPRIME "FEC"
85#define CONFIG_FEC_MXC_PHYADDR 6
86#define CONFIG_PHYLIB
87#define CONFIG_PHY_MICREL
88#define CONFIG_PHY_MICREL_KSZ9021
89
90/* USB Configs */
91#define CONFIG_CMD_USB
Eric Nelsone5b3a502013-03-11 08:44:53 +000092#define CONFIG_USB_EHCI
93#define CONFIG_USB_EHCI_MX6
94#define CONFIG_USB_STORAGE
95#define CONFIG_USB_HOST_ETHER
96#define CONFIG_USB_ETHER_ASIX
Gerhard Sittig42436a92014-03-08 19:46:16 +010097#define CONFIG_USB_ETHER_MCS7830
Eric Nelsone5b3a502013-03-11 08:44:53 +000098#define CONFIG_USB_ETHER_SMSC95XX
Troy Kiskyed72a9e2013-10-10 15:27:59 -070099#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
100#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000101#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
102#define CONFIG_MXC_USB_FLAGS 0
Eric Nelson73f61c02014-10-02 12:16:45 -0700103#define CONFIG_USB_KEYBOARD
104#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000105
106/* Miscellaneous commands */
107#define CONFIG_CMD_BMODE
108#define CONFIG_CMD_SETEXPR
109
110/* Framebuffer and LCD */
111#define CONFIG_VIDEO
112#define CONFIG_VIDEO_IPUV3
113#define CONFIG_CFB_CONSOLE
114#define CONFIG_VGA_AS_SINGLE_DEVICE
115#define CONFIG_SYS_CONSOLE_IS_IN_ENV
116#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
117#define CONFIG_VIDEO_BMP_RLE8
118#define CONFIG_SPLASH_SCREEN
Eric Nelson89f2be52015-04-16 11:31:33 -0700119#define CONFIG_SPLASH_SCREEN_ALIGN
120#define CONFIG_VIDEO_BMP_GZIP
121#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000122#define CONFIG_BMP_16BPP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000123#define CONFIG_IPUV3_CLK 260000000
124#define CONFIG_CMD_HDMIDETECT
125#define CONFIG_CONSOLE_MUX
Pardeep Kumar Singlac1fa1302013-07-25 12:12:13 -0500126#define CONFIG_IMX_HDMI
Eric Benard7f63c142014-04-04 19:05:53 +0200127#define CONFIG_IMX_VIDEO_SKIP
Eric Nelsone5b3a502013-03-11 08:44:53 +0000128
Eric Nelsone5b3a502013-03-11 08:44:53 +0000129#define CONFIG_PREBOOT ""
130
Eric Nelsone5b3a502013-03-11 08:44:53 +0000131#ifdef CONFIG_CMD_SATA
132#define CONFIG_DRIVE_SATA "sata "
133#else
134#define CONFIG_DRIVE_SATA
135#endif
136
137#ifdef CONFIG_CMD_MMC
138#define CONFIG_DRIVE_MMC "mmc "
139#else
140#define CONFIG_DRIVE_MMC
141#endif
142
Diego Rondini4e7394d2014-10-02 12:16:41 -0700143#ifdef CONFIG_USB_STORAGE
144#define CONFIG_DRIVE_USB "usb "
145#else
146#define CONFIG_DRIVE_USB
147#endif
148
149#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
Eric Nelson4cee9852014-10-02 12:16:44 -0700150#define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
Eric Nelsone5b3a502013-03-11 08:44:53 +0000151
Fabio Estevam1fd60922013-07-26 11:37:17 -0300152#if defined(CONFIG_SABRELITE)
Eric Nelsone5b3a502013-03-11 08:44:53 +0000153#define CONFIG_EXTRA_ENV_SETTINGS \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300154 "script=boot.scr\0" \
155 "uimage=uImage\0" \
156 "console=ttymxc1\0" \
157 "fdt_high=0xffffffff\0" \
158 "initrd_high=0xffffffff\0" \
159 "fdt_file=imx6q-sabrelite.dtb\0" \
Otavio Salvador2abc2ae2013-12-16 20:44:04 -0200160 "fdt_addr=0x18000000\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300161 "boot_fdt=try\0" \
162 "ip_dyn=yes\0" \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200163 "mmcdevs=0 1\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300164 "mmcpart=1\0" \
165 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
166 "mmcargs=setenv bootargs console=${console},${baudrate} " \
167 "root=${mmcroot}\0" \
168 "loadbootscript=" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200169 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300170 "bootscript=echo Running bootscript from mmc ...; " \
171 "source\0" \
Guillaume GARDET91f86802014-08-26 12:05:31 +0200172 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
173 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
Fabio Estevam1fd60922013-07-26 11:37:17 -0300174 "mmcboot=echo Booting from mmc ...; " \
175 "run mmcargs; " \
176 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
177 "if run loadfdt; then " \
178 "bootm ${loadaddr} - ${fdt_addr}; " \
179 "else " \
180 "if test ${boot_fdt} = try; then " \
181 "bootm; " \
182 "else " \
183 "echo WARN: Cannot load the DT; " \
184 "fi; " \
185 "fi; " \
186 "else " \
187 "bootm; " \
188 "fi;\0" \
189 "netargs=setenv bootargs console=${console},${baudrate} " \
190 "root=/dev/nfs " \
191 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
192 "netboot=echo Booting from net ...; " \
193 "run netargs; " \
194 "if test ${ip_dyn} = yes; then " \
195 "setenv get_cmd dhcp; " \
196 "else " \
197 "setenv get_cmd tftp; " \
198 "fi; " \
199 "${get_cmd} ${uimage}; " \
200 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
201 "if ${get_cmd} ${fdt_addr} ${fdt_file}; 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
214#define CONFIG_BOOTCOMMAND \
Guillaume GARDET6426ce32014-09-11 11:59:52 +0200215 "for mmcdev in ${mmcdevs}; do " \
216 "mmc dev ${mmcdev}; " \
217 "if mmc rescan; then " \
218 "if run loadbootscript; then " \
219 "run bootscript; " \
220 "else " \
221 "if run loaduimage; then " \
222 "run mmcboot; " \
223 "fi; " \
224 "fi; " \
225 "fi; " \
226 "done; " \
227 "run netboot; "
Fabio Estevam1fd60922013-07-26 11:37:17 -0300228#else
229#define CONFIG_EXTRA_ENV_SETTINGS \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700230 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
Eric Nelson4cee9852014-10-02 12:16:44 -0700231 "umsdevs=" CONFIG_UMSDEVS "\0" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000232 "console=ttymxc1\0" \
233 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
234 "sf erase 0xc0000 0x2000 && " \
235 "echo restored environment to factory default ; fi\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700236 "bootcmd=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000237 "; do " \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700238 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
239 "usb start ;" \
240 "fi; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000241 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700242 "load " \
243 "${dtype} ${disk}:1 " \
244 "10008000 " \
245 "/6x_bootscript" \
246 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000247 "done ; " \
248 "done; " \
249 "setenv stdout serial,vga ; " \
250 "echo ; echo 6x_bootscript not found ; " \
251 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
252 "echo details at http://boundarydevices.com/6q_bootscript ; " \
Eric Nelson4cee9852014-10-02 12:16:44 -0700253 "setenv stdout serial;" \
254 "setenv stdin serial,usbkbd;" \
255 "for dtype in ${umsdevs} ; do " \
256 "if itest.s sata == ${dtype}; then " \
257 "initcmd='sata init' ;" \
258 "else " \
259 "initcmd='mmc rescan' ;" \
260 "fi; " \
261 "for disk in 0 1 ; do " \
262 "if $initcmd && $dtype dev $disk ; then " \
263 "setenv stdout serial,vga; " \
264 "echo expose ${dtype} ${disk} " \
265 "over USB; " \
266 "ums 0 $dtype $disk ;" \
267 "fi; " \
268 " done; " \
269 "done ;" \
270 "setenv stdout serial,vga; " \
271 "echo no block devices found;" \
272 "\0" \
Eric Nelson3253b872014-10-02 12:16:43 -0700273 "initrd_high=0xffffffff\0" \
Diego Rondini4e7394d2014-10-02 12:16:41 -0700274 "upgradeu=for dtype in ${bootdevs}" \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000275 "; do " \
276 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Kevin Mihelich851675a2014-10-02 12:16:42 -0700277 "load ${dtype} ${disk}:1 10008000 " \
278 "/6x_upgrade " \
279 "&& source 10008000 ; " \
Eric Nelsone5b3a502013-03-11 08:44:53 +0000280 "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 */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000285#define CONFIG_SYS_MEMTEST_START 0x10000000
286#define CONFIG_SYS_MEMTEST_END 0x10010000
287#define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
288
Eric Nelsone5b3a502013-03-11 08:44:53 +0000289/* Physical Memory Map */
290#define CONFIG_NR_DRAM_BANKS 1
291#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
292
293#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
294#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
295#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
296
297#define CONFIG_SYS_INIT_SP_OFFSET \
298 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
299#define CONFIG_SYS_INIT_SP_ADDR \
300 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
301
Peter Robinson4b671502015-05-22 17:30:45 +0100302/* Environment organization */
Eric Nelsone5b3a502013-03-11 08:44:53 +0000303#define CONFIG_ENV_SIZE (8 * 1024)
304
Fabio Estevam1fd60922013-07-26 11:37:17 -0300305#if defined(CONFIG_SABRELITE)
306#define CONFIG_ENV_IS_IN_MMC
307#else
Eric Nelsone5b3a502013-03-11 08:44:53 +0000308#define CONFIG_ENV_IS_IN_SPI_FLASH
Fabio Estevam1fd60922013-07-26 11:37:17 -0300309#endif
Eric Nelsone5b3a502013-03-11 08:44:53 +0000310
311#if defined(CONFIG_ENV_IS_IN_MMC)
312#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
313#define CONFIG_SYS_MMC_ENV_DEV 0
314#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
315#define CONFIG_ENV_OFFSET (768 * 1024)
316#define CONFIG_ENV_SECT_SIZE (8 * 1024)
317#define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
318#define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
319#define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
320#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
321#endif
322
Eric Nelsone5b3a502013-03-11 08:44:53 +0000323#define CONFIG_CMD_BMP
324
325#define CONFIG_CMD_TIME
Eric Nelson2dc9f952014-10-02 12:16:46 -0700326#define CONFIG_CMD_MEMTEST
Eric Nelsone5b3a502013-03-11 08:44:53 +0000327#define CONFIG_SYS_ALT_MEMTEST
328
Marek Vasut52303852013-12-14 05:55:29 +0100329/*
330 * PCI express
331 */
Marek Vasut52303852013-12-14 05:55:29 +0100332#ifdef CONFIG_CMD_PCI
333#define CONFIG_PCI
334#define CONFIG_PCI_PNP
335#define CONFIG_PCI_SCAN_SHOW
336#define CONFIG_PCIE_IMX
337#endif
338
Eric Nelson07e6c6a2014-10-02 12:16:40 -0700339#define CONFIG_CMD_ELF
340
341#define CONFIG_USB_GADGET
342#define CONFIG_CMD_USB_MASS_STORAGE
343#define CONFIG_USB_GADGET_MASS_STORAGE
344#define CONFIG_USBDOWNLOAD_GADGET
345#define CONFIG_USB_GADGET_VBUS_DRAW 2
346
347/* Netchip IDs */
348#define CONFIG_G_DNL_VENDOR_NUM 0x0525
349#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
350#define CONFIG_G_DNL_MANUFACTURER "Boundary"
351
Eric Nelson76890e52014-10-02 12:16:52 -0700352#define CONFIG_CMD_FASTBOOT
353#define CONFIG_ANDROID_BOOT_IMAGE
354#define CONFIG_USB_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
355#define CONFIG_USB_FASTBOOT_BUF_SIZE 0x07000000
356
Eric Nelsone5b3a502013-03-11 08:44:53 +0000357#endif /* __CONFIG_H */