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
28 /* Size of malloc() pool */
29 #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
31 #define CONFIG_BOARD_EARLY_INIT_F
32 #define CONFIG_MISC_INIT_R
33 #define CONFIG_MXC_GPIO
35 #define CONFIG_USBD_HS
36 #define CONFIG_USB_GADGET_DUALSPEED
37 #define CONFIG_USB_ETHER
38 #define CONFIG_USB_ETH_CDC
39 #define CONFIG_NETCONSOLE
41 #define CONFIG_CMD_FUSE
42 #ifdef CONFIG_CMD_FUSE
43 #define CONFIG_MXC_OCOTP
46 #define CONFIG_MXC_UART
47 #define CONFIG_MXC_UART_BASE UART2_BASE
51 #define CONFIG_SPI_FLASH
52 #define CONFIG_SPI_FLASH_SST
53 #define CONFIG_MXC_SPI
54 #define CONFIG_SF_DEFAULT_BUS 0
55 #define CONFIG_SF_DEFAULT_CS (0|(IMX_GPIO_NR(3, 19)<<8))
56 #define CONFIG_SF_DEFAULT_SPEED 25000000
57 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
61 #define CONFIG_CMD_I2C
62 #define CONFIG_SYS_I2C
63 #define CONFIG_SYS_I2C_MXC
64 #define CONFIG_SYS_I2C_SPEED 100000
67 #define CONFIG_FSL_ESDHC
68 #define CONFIG_FSL_USDHC
69 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
70 #define CONFIG_SYS_FSL_USDHC_NUM 2
73 #define CONFIG_CMD_MMC
74 #define CONFIG_GENERIC_MMC
75 #define CONFIG_BOUNCE_BUFFER
76 #define CONFIG_CMD_EXT2
77 #define CONFIG_CMD_FAT
78 #define CONFIG_DOS_PARTITION
81 #define CONFIG_CMD_SATA
87 #ifdef CONFIG_CMD_SATA
88 #define CONFIG_DWC_AHSATA
89 #define CONFIG_SYS_SATA_MAX_DEVICE 1
90 #define CONFIG_DWC_AHSATA_PORT_ID 0
91 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
96 #define CONFIG_CMD_PING
97 #define CONFIG_CMD_DHCP
98 #define CONFIG_CMD_MII
99 #define CONFIG_CMD_NET
100 #define CONFIG_FEC_MXC
102 #define IMX_FEC_BASE ENET_BASE_ADDR
103 #define CONFIG_FEC_XCV_TYPE RGMII
104 #define CONFIG_ETHPRIME "FEC"
105 #define CONFIG_FEC_MXC_PHYADDR 6
106 #define CONFIG_PHYLIB
107 #define CONFIG_PHY_MICREL
108 #define CONFIG_PHY_MICREL_KSZ9021
111 #define CONFIG_CMD_USB
112 #define CONFIG_CMD_FAT
113 #define CONFIG_USB_EHCI
114 #define CONFIG_USB_EHCI_MX6
115 #define CONFIG_USB_STORAGE
116 #define CONFIG_USB_HOST_ETHER
117 #define CONFIG_USB_ETHER_ASIX
118 #define CONFIG_USB_ETHER_SMSC95XX
119 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
120 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
121 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
122 #define CONFIG_MXC_USB_FLAGS 0
124 /* Miscellaneous commands */
125 #define CONFIG_CMD_BMODE
126 #define CONFIG_CMD_SETEXPR
128 /* Framebuffer and LCD */
130 #define CONFIG_VIDEO_IPUV3
131 #define CONFIG_CFB_CONSOLE
132 #define CONFIG_VGA_AS_SINGLE_DEVICE
133 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
134 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
135 #define CONFIG_VIDEO_BMP_RLE8
136 #define CONFIG_SPLASH_SCREEN
137 #define CONFIG_BMP_16BPP
138 #define CONFIG_VIDEO_LOGO
139 #define CONFIG_IPUV3_CLK 260000000
140 #define CONFIG_CMD_HDMIDETECT
141 #define CONFIG_CONSOLE_MUX
142 #define CONFIG_IMX_HDMI
144 /* allow to overwrite serial and ethaddr */
145 #define CONFIG_ENV_OVERWRITE
146 #define CONFIG_CONS_INDEX 1
147 #define CONFIG_BAUDRATE 115200
149 /* Command definition */
150 #include <config_cmd_default.h>
152 #undef CONFIG_CMD_IMLS
154 #define CONFIG_BOOTDELAY 1
156 #define CONFIG_PREBOOT ""
158 #define CONFIG_LOADADDR 0x12000000
159 #define CONFIG_SYS_TEXT_BASE 0x17800000
161 #ifdef CONFIG_CMD_SATA
162 #define CONFIG_DRIVE_SATA "sata "
164 #define CONFIG_DRIVE_SATA
167 #ifdef CONFIG_CMD_MMC
168 #define CONFIG_DRIVE_MMC "mmc "
170 #define CONFIG_DRIVE_MMC
173 #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
175 #if defined(CONFIG_SABRELITE)
176 #define CONFIG_EXTRA_ENV_SETTINGS \
177 "script=boot.scr\0" \
179 "console=ttymxc1\0" \
180 "fdt_high=0xffffffff\0" \
181 "initrd_high=0xffffffff\0" \
182 "fdt_file=imx6q-sabrelite.dtb\0" \
183 "fdt_addr=0x18000000\0" \
188 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
189 "mmcargs=setenv bootargs console=${console},${baudrate} " \
190 "root=${mmcroot}\0" \
192 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
193 "bootscript=echo Running bootscript from mmc ...; " \
195 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
196 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
197 "mmcboot=echo Booting from mmc ...; " \
199 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
200 "if run loadfdt; then " \
201 "bootm ${loadaddr} - ${fdt_addr}; " \
203 "if test ${boot_fdt} = try; then " \
206 "echo WARN: Cannot load the DT; " \
212 "netargs=setenv bootargs console=${console},${baudrate} " \
214 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
215 "netboot=echo Booting from net ...; " \
217 "if test ${ip_dyn} = yes; then " \
218 "setenv get_cmd dhcp; " \
220 "setenv get_cmd tftp; " \
222 "${get_cmd} ${uimage}; " \
223 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
224 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
225 "bootm ${loadaddr} - ${fdt_addr}; " \
227 "if test ${boot_fdt} = try; then " \
230 "echo WARN: Cannot load the DT; " \
237 #define CONFIG_BOOTCOMMAND \
238 "mmc dev ${mmcdev}; if mmc rescan; then " \
239 "if run loadbootscript; then " \
242 "if run loaduimage; then " \
244 "else run netboot; " \
247 "else run netboot; fi"
249 #define CONFIG_EXTRA_ENV_SETTINGS \
250 "console=ttymxc1\0" \
251 "clearenv=if sf probe || sf probe || sf probe 1 ; then " \
252 "sf erase 0xc0000 0x2000 && " \
253 "echo restored environment to factory default ; fi\0" \
254 "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \
256 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
257 "for fs in fat ext2 ; do " \
259 "${dtype} ${disk}:1 " \
262 "&& source 10008000 ; " \
266 "setenv stdout serial,vga ; " \
267 "echo ; echo 6x_bootscript not found ; " \
268 "echo ; echo serial console at 115200, 8N1 ; echo ; " \
269 "echo details at http://boundarydevices.com/6q_bootscript ; " \
270 "setenv stdout serial\0" \
271 "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
273 "for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
274 "for fs in fat ext2 ; do " \
275 "${fs}load ${dtype} ${disk}:1 10008000 " \
277 "&& source 10008000 ; " \
283 /* Miscellaneous configurable options */
284 #define CONFIG_SYS_LONGHELP
285 #define CONFIG_SYS_HUSH_PARSER
286 #define CONFIG_SYS_PROMPT "U-Boot > "
287 #define CONFIG_AUTO_COMPLETE
288 #define CONFIG_SYS_CBSIZE 1024
290 /* Print Buffer Size */
291 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
292 #define CONFIG_SYS_MAXARGS 16
293 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
295 #define CONFIG_SYS_MEMTEST_START 0x10000000
296 #define CONFIG_SYS_MEMTEST_END 0x10010000
297 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
299 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
301 #define CONFIG_CMDLINE_EDITING
303 /* Physical Memory Map */
304 #define CONFIG_NR_DRAM_BANKS 1
305 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
307 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
308 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
309 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
311 #define CONFIG_SYS_INIT_SP_OFFSET \
312 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
313 #define CONFIG_SYS_INIT_SP_ADDR \
314 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
316 /* FLASH and environment organization */
317 #define CONFIG_SYS_NO_FLASH
319 #define CONFIG_ENV_SIZE (8 * 1024)
321 #if defined(CONFIG_SABRELITE)
322 #define CONFIG_ENV_IS_IN_MMC
324 #define CONFIG_ENV_IS_IN_SPI_FLASH
327 #if defined(CONFIG_ENV_IS_IN_MMC)
328 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
329 #define CONFIG_SYS_MMC_ENV_DEV 0
330 #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
331 #define CONFIG_ENV_OFFSET (768 * 1024)
332 #define CONFIG_ENV_SECT_SIZE (8 * 1024)
333 #define CONFIG_ENV_SPI_BUS CONFIG_SF_DEFAULT_BUS
334 #define CONFIG_ENV_SPI_CS CONFIG_SF_DEFAULT_CS
335 #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
336 #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED
339 #define CONFIG_OF_LIBFDT
340 #define CONFIG_CMD_BOOTZ
342 #ifndef CONFIG_SYS_DCACHE_OFF
343 #define CONFIG_CMD_CACHE
346 #define CONFIG_CMD_BMP
348 #define CONFIG_CMD_TIME
349 #define CONFIG_SYS_ALT_MEMTEST
351 #define CONFIG_CMD_BOOTZ
352 #define CONFIG_SUPPORT_RAW_INITRD
353 #define CONFIG_CMD_FS_GENERIC
355 #endif /* __CONFIG_H */