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
36 #define CONFIG_USBD_HS
37 #define CONFIG_USB_GADGET_DUALSPEED
38 #define CONFIG_USB_ETHER
39 #define CONFIG_USB_ETH_CDC
40 #define CONFIG_NETCONSOLE
42 #define CONFIG_CMD_FUSE
43 #ifdef CONFIG_CMD_FUSE
44 #define CONFIG_MXC_OCOTP
47 #define CONFIG_MXC_UART
48 #define CONFIG_MXC_UART_BASE UART2_BASE
52 #define CONFIG_SPI_FLASH
53 #define CONFIG_SPI_FLASH_SST
54 #define CONFIG_MXC_SPI
55 #define CONFIG_SF_DEFAULT_BUS 0
56 #define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(3, 19)<<8))
57 #define CONFIG_SF_DEFAULT_SPEED 25000000
58 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
62 #define CONFIG_CMD_I2C
63 #define CONFIG_SYS_I2C
64 #define CONFIG_SYS_I2C_MXC
65 #define CONFIG_SYS_I2C_SPEED 100000
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
74 #define CONFIG_CMD_MMC
75 #define CONFIG_GENERIC_MMC
76 #define CONFIG_BOUNCE_BUFFER
77 #define CONFIG_CMD_EXT2
78 #define CONFIG_CMD_FAT
79 #define CONFIG_DOS_PARTITION
82 #define CONFIG_CMD_SATA
88 #ifdef CONFIG_CMD_SATA
89 #define CONFIG_DWC_AHSATA
90 #define CONFIG_SYS_SATA_MAX_DEVICE 1
91 #define CONFIG_DWC_AHSATA_PORT_ID 0
92 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
97 #define CONFIG_CMD_PING
98 #define CONFIG_CMD_DHCP
99 #define CONFIG_CMD_MII
100 #define CONFIG_CMD_NET
101 #define CONFIG_FEC_MXC
103 #define IMX_FEC_BASE ENET_BASE_ADDR
104 #define CONFIG_FEC_XCV_TYPE RGMII
105 #define CONFIG_ETHPRIME "FEC"
106 #define CONFIG_FEC_MXC_PHYADDR 6
107 #define CONFIG_PHYLIB
108 #define CONFIG_PHY_MICREL
109 #define CONFIG_PHY_MICREL_KSZ9021
112 #define CONFIG_CMD_USB
113 #define CONFIG_CMD_FAT
114 #define CONFIG_USB_EHCI
115 #define CONFIG_USB_EHCI_MX6
116 #define CONFIG_USB_STORAGE
117 #define CONFIG_USB_HOST_ETHER
118 #define CONFIG_USB_ETHER_ASIX
119 #define CONFIG_USB_ETHER_MCS7830
120 #define CONFIG_USB_ETHER_SMSC95XX
121 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
122 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
123 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
124 #define CONFIG_MXC_USB_FLAGS 0
126 /* Miscellaneous commands */
127 #define CONFIG_CMD_BMODE
128 #define CONFIG_CMD_SETEXPR
130 /* Framebuffer and LCD */
132 #define CONFIG_VIDEO_IPUV3
133 #define CONFIG_CFB_CONSOLE
134 #define CONFIG_VGA_AS_SINGLE_DEVICE
135 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
136 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
137 #define CONFIG_VIDEO_BMP_RLE8
138 #define CONFIG_SPLASH_SCREEN
139 #define CONFIG_BMP_16BPP
140 #define CONFIG_VIDEO_LOGO
141 #define CONFIG_IPUV3_CLK 260000000
142 #define CONFIG_CMD_HDMIDETECT
143 #define CONFIG_CONSOLE_MUX
144 #define CONFIG_IMX_HDMI
145 #define CONFIG_IMX_VIDEO_SKIP
147 /* allow to overwrite serial and ethaddr */
148 #define CONFIG_ENV_OVERWRITE
149 #define CONFIG_CONS_INDEX 1
150 #define CONFIG_BAUDRATE 115200
152 /* Command definition */
153 #include <config_cmd_default.h>
155 #undef CONFIG_CMD_IMLS
157 #define CONFIG_BOOTDELAY 1
159 #define CONFIG_PREBOOT ""
161 #define CONFIG_LOADADDR 0x12000000
162 #define CONFIG_SYS_TEXT_BASE 0x17800000
164 #ifdef CONFIG_CMD_SATA
165 #define CONFIG_DRIVE_SATA "sata "
167 #define CONFIG_DRIVE_SATA
170 #ifdef CONFIG_CMD_MMC
171 #define CONFIG_DRIVE_MMC "mmc "
173 #define CONFIG_DRIVE_MMC
176 #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
178 #if defined(CONFIG_SABRELITE)
179 #define CONFIG_EXTRA_ENV_SETTINGS \
180 "script=boot.scr\0" \
182 "console=ttymxc1\0" \
183 "fdt_high=0xffffffff\0" \
184 "initrd_high=0xffffffff\0" \
185 "fdt_file=imx6q-sabrelite.dtb\0" \
186 "fdt_addr=0x18000000\0" \
191 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
192 "mmcargs=setenv bootargs console=${console},${baudrate} " \
193 "root=${mmcroot}\0" \
195 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
196 "bootscript=echo Running bootscript from mmc ...; " \
198 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
199 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
200 "mmcboot=echo Booting from mmc ...; " \
202 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
203 "if run loadfdt; then " \
204 "bootm ${loadaddr} - ${fdt_addr}; " \
206 "if test ${boot_fdt} = try; then " \
209 "echo WARN: Cannot load the DT; " \
215 "netargs=setenv bootargs console=${console},${baudrate} " \
217 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
218 "netboot=echo Booting from net ...; " \
220 "if test ${ip_dyn} = yes; then " \
221 "setenv get_cmd dhcp; " \
223 "setenv get_cmd tftp; " \
225 "${get_cmd} ${uimage}; " \
226 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
227 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
228 "bootm ${loadaddr} - ${fdt_addr}; " \
230 "if test ${boot_fdt} = try; then " \
233 "echo WARN: Cannot load the DT; " \
240 #define CONFIG_BOOTCOMMAND \
241 "mmc dev ${mmcdev}; if mmc rescan; then " \
242 "if run loadbootscript; then " \
245 "if run loaduimage; then " \
247 "else run netboot; " \
250 "else run netboot; fi"
252 #define CONFIG_EXTRA_ENV_SETTINGS \
253 "console=ttymxc1\0" \
254 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
255 "sf erase 0xc0000 0x2000 && " \
256 "echo restored environment to factory default ; fi\0" \
257 "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \
259 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
260 "for fs in fat ext2 ; do " \
262 "${dtype} ${disk}:1 " \
265 "&& source 10008000 ; " \
269 "setenv stdout serial,vga ; " \
270 "echo ; echo 6x_bootscript not found ; " \
271 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
272 "echo details at http://boundarydevices.com/6q_bootscript ; " \
273 "setenv stdout serial\0" \
274 "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
276 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
277 "for fs in fat ext2 ; do " \
278 "${fs}load ${dtype} ${disk}:1 10008000 " \
280 "&& source 10008000 ; " \
286 /* Miscellaneous configurable options */
287 #define CONFIG_SYS_LONGHELP
288 #define CONFIG_SYS_HUSH_PARSER
289 #define CONFIG_SYS_PROMPT "U-Boot > "
290 #define CONFIG_AUTO_COMPLETE
291 #define CONFIG_SYS_CBSIZE 1024
293 /* Print Buffer Size */
294 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
295 #define CONFIG_SYS_MAXARGS 16
296 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
298 #define CONFIG_SYS_MEMTEST_START 0x10000000
299 #define CONFIG_SYS_MEMTEST_END 0x10010000
300 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
302 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
304 #define CONFIG_CMDLINE_EDITING
306 /* Physical Memory Map */
307 #define CONFIG_NR_DRAM_BANKS 1
308 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
310 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
311 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
312 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
314 #define CONFIG_SYS_INIT_SP_OFFSET \
315 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
316 #define CONFIG_SYS_INIT_SP_ADDR \
317 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
319 /* FLASH and environment organization */
320 #define CONFIG_SYS_NO_FLASH
322 #define CONFIG_ENV_SIZE (8 * 1024)
324 #if defined(CONFIG_SABRELITE)
325 #define CONFIG_ENV_IS_IN_MMC
327 #define CONFIG_ENV_IS_IN_SPI_FLASH
330 #if defined(CONFIG_ENV_IS_IN_MMC)
331 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
332 #define CONFIG_SYS_MMC_ENV_DEV 0
333 #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
334 #define CONFIG_ENV_OFFSET (768 * 1024)
335 #define CONFIG_ENV_SECT_SIZE (8 * 1024)
336 #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
337 #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
338 #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
339 #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
342 #define CONFIG_OF_LIBFDT
343 #define CONFIG_CMD_BOOTZ
345 #ifndef CONFIG_SYS_DCACHE_OFF
346 #define CONFIG_CMD_CACHE
349 #define CONFIG_CMD_BMP
351 #define CONFIG_CMD_TIME
352 #define CONFIG_SYS_ALT_MEMTEST
354 #define CONFIG_CMD_BOOTZ
355 #define CONFIG_SUPPORT_RAW_INITRD
356 #define CONFIG_CMD_FS_GENERIC
361 #ifdef CONFIG_CMD_PCI
363 #define CONFIG_PCI_PNP
364 #define CONFIG_PCI_SCAN_SHOW
365 #define CONFIG_PCIE_IMX
368 #endif /* __CONFIG_H */