2 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
4 * Configuration settings for the Boundary Devices Nitrogen6X
5 * and Freescale i.MX6Q Sabre Lite boards.
7 * SPDX-License-Identifier: GPL-2.0+
13 #include "mx6_common.h"
15 #define CONFIG_DISPLAY_CPUINFO
16 #define CONFIG_DISPLAY_BOARDINFO
18 #define CONFIG_MACH_TYPE 3769
20 #include <asm/arch/imx-regs.h>
21 #include <asm/imx-common/gpio.h>
23 #define CONFIG_CMDLINE_TAG
24 #define CONFIG_SETUP_MEMORY_TAGS
25 #define CONFIG_INITRD_TAG
26 #define CONFIG_REVISION_TAG
27 #define CONFIG_SYS_GENERIC_BOARD
29 /* Size of malloc() pool */
30 #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
32 #define CONFIG_BOARD_EARLY_INIT_F
33 #define CONFIG_MISC_INIT_R
34 #define CONFIG_MXC_GPIO
35 #define CONFIG_CMD_GPIO
37 #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
43 #define CONFIG_CMD_FUSE
44 #ifdef CONFIG_CMD_FUSE
45 #define CONFIG_MXC_OCOTP
48 #define CONFIG_MXC_UART
49 #define CONFIG_MXC_UART_BASE UART2_BASE
53 #define CONFIG_SPI_FLASH
54 #define CONFIG_SPI_FLASH_SST
55 #define CONFIG_MXC_SPI
56 #define CONFIG_SF_DEFAULT_BUS 0
57 #define CONFIG_SF_DEFAULT_CS 0
58 #define CONFIG_SF_DEFAULT_SPEED 25000000
59 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
63 #define CONFIG_CMD_I2C
64 #define CONFIG_SYS_I2C
65 #define CONFIG_SYS_I2C_MXC
66 #define CONFIG_SYS_I2C_SPEED 100000
67 #define CONFIG_I2C_EDID
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
76 #define CONFIG_CMD_MMC
77 #define CONFIG_GENERIC_MMC
78 #define CONFIG_BOUNCE_BUFFER
79 #define CONFIG_CMD_EXT2
80 #define CONFIG_CMD_EXT4
81 #define CONFIG_CMD_EXT4_WRITE
82 #define CONFIG_CMD_FAT
83 #define CONFIG_DOS_PARTITION
86 #define CONFIG_CMD_SATA
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
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
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
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
123 #define CONFIG_USB_ETHER_MCS7830
124 #define CONFIG_USB_ETHER_SMSC95XX
125 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
126 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
127 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
128 #define CONFIG_MXC_USB_FLAGS 0
129 #define CONFIG_USB_KEYBOARD
130 #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
132 /* Miscellaneous commands */
133 #define CONFIG_CMD_BMODE
134 #define CONFIG_CMD_SETEXPR
136 /* Framebuffer and LCD */
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
146 #define CONFIG_IPUV3_CLK 260000000
147 #define CONFIG_CMD_HDMIDETECT
148 #define CONFIG_CONSOLE_MUX
149 #define CONFIG_IMX_HDMI
150 #define CONFIG_IMX_VIDEO_SKIP
152 /* allow to overwrite serial and ethaddr */
153 #define CONFIG_ENV_OVERWRITE
154 #define CONFIG_CONS_INDEX 1
155 #define CONFIG_BAUDRATE 115200
157 /* Command definition */
158 #include <config_cmd_default.h>
160 #undef CONFIG_CMD_IMLS
162 #define CONFIG_BOOTDELAY 1
164 #define CONFIG_PREBOOT ""
166 #define CONFIG_LOADADDR 0x12000000
167 #define CONFIG_SYS_TEXT_BASE 0x17800000
169 #ifdef CONFIG_CMD_SATA
170 #define CONFIG_DRIVE_SATA "sata "
172 #define CONFIG_DRIVE_SATA
175 #ifdef CONFIG_CMD_MMC
176 #define CONFIG_DRIVE_MMC "mmc "
178 #define CONFIG_DRIVE_MMC
181 #ifdef CONFIG_USB_STORAGE
182 #define CONFIG_DRIVE_USB "usb "
184 #define CONFIG_DRIVE_USB
187 #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
188 #define CONFIG_UMSDEVS CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
190 #if defined(CONFIG_SABRELITE)
191 #define CONFIG_EXTRA_ENV_SETTINGS \
192 "script=boot.scr\0" \
194 "console=ttymxc1\0" \
195 "fdt_high=0xffffffff\0" \
196 "initrd_high=0xffffffff\0" \
197 "fdt_file=imx6q-sabrelite.dtb\0" \
198 "fdt_addr=0x18000000\0" \
203 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
204 "mmcargs=setenv bootargs console=${console},${baudrate} " \
205 "root=${mmcroot}\0" \
207 "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
208 "bootscript=echo Running bootscript from mmc ...; " \
210 "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
211 "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
212 "mmcboot=echo Booting from mmc ...; " \
214 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
215 "if run loadfdt; then " \
216 "bootm ${loadaddr} - ${fdt_addr}; " \
218 "if test ${boot_fdt} = try; then " \
221 "echo WARN: Cannot load the DT; " \
227 "netargs=setenv bootargs console=${console},${baudrate} " \
229 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
230 "netboot=echo Booting from net ...; " \
232 "if test ${ip_dyn} = yes; then " \
233 "setenv get_cmd dhcp; " \
235 "setenv get_cmd tftp; " \
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}; " \
242 "if test ${boot_fdt} = try; then " \
245 "echo WARN: Cannot load the DT; " \
252 #define CONFIG_BOOTCOMMAND \
253 "for mmcdev in ${mmcdevs}; do " \
254 "mmc dev ${mmcdev}; " \
255 "if mmc rescan; then " \
256 "if run loadbootscript; then " \
259 "if run loaduimage; then " \
267 #define CONFIG_EXTRA_ENV_SETTINGS \
268 "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
269 "umsdevs=" CONFIG_UMSDEVS "\0" \
270 "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" \
274 "bootcmd=for dtype in ${bootdevs}" \
276 "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
279 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
281 "${dtype} ${disk}:1 " \
284 "&& source 10008000 ; " \
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 ; " \
291 "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' ;" \
297 "initcmd='mmc rescan' ;" \
299 "for disk in 0 1 ; do " \
300 "if $initcmd && $dtype dev $disk ; then " \
301 "setenv stdout serial,vga; " \
302 "echo expose ${dtype} ${disk} " \
304 "ums 0 $dtype $disk ;" \
308 "setenv stdout serial,vga; " \
309 "echo no block devices found;" \
311 "initrd_high=0xffffffff\0" \
312 "upgradeu=for dtype in ${bootdevs}" \
314 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
315 "load ${dtype} ${disk}:1 10008000 " \
317 "&& source 10008000 ; " \
322 /* 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
329 /* Print Buffer Size */
330 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
331 #define CONFIG_SYS_MAXARGS 48
332 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
334 #define CONFIG_SYS_MEMTEST_START 0x10000000
335 #define CONFIG_SYS_MEMTEST_END 0x10010000
336 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
338 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
340 #define CONFIG_CMDLINE_EDITING
342 /* Physical Memory Map */
343 #define CONFIG_NR_DRAM_BANKS 1
344 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
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
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)
355 /* FLASH and environment organization */
356 #define CONFIG_SYS_NO_FLASH
358 #define CONFIG_ENV_SIZE (8 * 1024)
360 #if defined(CONFIG_SABRELITE)
361 #define CONFIG_ENV_IS_IN_MMC
363 #define CONFIG_ENV_IS_IN_SPI_FLASH
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
378 #define CONFIG_OF_LIBFDT
379 #define CONFIG_CMD_BOOTZ
381 #ifndef CONFIG_SYS_DCACHE_OFF
382 #define CONFIG_CMD_CACHE
385 #define CONFIG_CMD_BMP
387 #define CONFIG_CMD_TIME
388 #define CONFIG_CMD_MEMTEST
389 #define CONFIG_SYS_ALT_MEMTEST
391 #define CONFIG_CMD_BOOTZ
392 #define CONFIG_SUPPORT_RAW_INITRD
393 #define CONFIG_CMD_FS_GENERIC
398 #ifdef CONFIG_CMD_PCI
400 #define CONFIG_PCI_PNP
401 #define CONFIG_PCI_SCAN_SHOW
402 #define CONFIG_PCIE_IMX
405 #define CONFIG_CMD_ELF
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
414 #define CONFIG_G_DNL_VENDOR_NUM 0x0525
415 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
416 #define CONFIG_G_DNL_MANUFACTURER "Boundary"
418 #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
423 #endif /* __CONFIG_H */