2 * Copyright (C) 2015 Freescale Semiconductor, Inc.
4 * Configuration settings for the SolidRun mx6 based boards
6 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __MX6CUBOXI_CONFIG_H
9 #define __MX6CUBOXI_CONFIG_H
11 #include <linux/sizes.h>
12 #include <asm/arch/imx-regs.h>
13 #include <asm/imx-common/gpio.h>
14 #include "mx6_common.h"
17 #define CONFIG_SPL_LIBCOMMON_SUPPORT
18 #define CONFIG_SPL_MMC_SUPPORT
21 #define CONFIG_DISPLAY_CPUINFO
22 #define CONFIG_DISPLAY_BOARDINFO
23 #define CONFIG_CMDLINE_TAG
24 #define CONFIG_SETUP_MEMORY_TAGS
25 #define CONFIG_INITRD_TAG
26 #define CONFIG_REVISION_TAG
27 #define CONFIG_IMX6_THERMAL
28 #define CONFIG_SYS_GENERIC_BOARD
30 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
31 #define CONFIG_BOARD_EARLY_INIT_F
32 #define CONFIG_BOARD_LATE_INIT
33 #define CONFIG_MXC_GPIO
34 #define CONFIG_MXC_UART
35 #define CONFIG_CMD_FUSE
36 #define CONFIG_MXC_OCOTP
39 #define CONFIG_FSL_ESDHC
40 #define CONFIG_FSL_USDHC
41 #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC2_BASE_ADDR
43 #define CONFIG_CMD_MMC
44 #define CONFIG_GENERIC_MMC
45 #define CONFIG_BOUNCE_BUFFER
46 #define CONFIG_CMD_EXT4
47 #define CONFIG_CMD_EXT4_WRITE
48 #define CONFIG_CMD_FAT
49 #define CONFIG_DOS_PARTITION
51 /* Ethernet Configuration */
52 #define CONFIG_FEC_MXC
53 #define CONFIG_CMD_PING
54 #define CONFIG_CMD_DHCP
55 #define CONFIG_CMD_MII
56 #define CONFIG_CMD_NET
58 #define IMX_FEC_BASE ENET_BASE_ADDR
59 #define CONFIG_FEC_XCV_TYPE RGMII
60 #define CONFIG_FEC_MXC_PHYADDR 0
62 #define CONFIG_PHY_ATHEROS
64 /* allow to overwrite serial and ethaddr */
65 #define CONFIG_ENV_OVERWRITE
66 #define CONFIG_CONS_INDEX 1
67 #define CONFIG_BAUDRATE 115200
71 #define CONFIG_VIDEO_IPUV3
72 #define CONFIG_IPUV3_CLK 260000000
73 #define CONFIG_CFB_CONSOLE
74 #define CONFIG_VGA_AS_SINGLE_DEVICE
75 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
76 #define CONFIG_VIDEO_BMP_RLE8
77 #define CONFIG_SPLASH_SCREEN
78 #define CONFIG_SPLASH_SCREEN_ALIGN
79 #define CONFIG_BMP_16BPP
80 #define CONFIG_VIDEO_LOGO
81 #define CONFIG_VIDEO_BMP_LOGO
82 #define CONFIG_IMX_HDMI
83 #define CONFIG_IMX_VIDEO_SKIP
85 #define CONFIG_SYS_NO_FLASH
87 /* Command definition */
88 #include <config_cmd_default.h>
90 #define CONFIG_CMD_BOOTZ
91 #define CONFIG_CMD_SETEXPR
93 #define CONFIG_BOOTDELAY 1
95 #define CONFIG_LOADADDR 0x12000000
96 #define CONFIG_SYS_TEXT_BASE 0x17800000
98 #define CONFIG_MXC_UART_BASE UART1_BASE
99 #define CONFIG_CONSOLE_DEV "ttymxc0"
100 #define CONFIG_MMCROOT "/dev/mmcblk0p2"
101 #define CONFIG_SYS_FSL_USDHC_NUM 1
102 #define CONFIG_SYS_MMC_ENV_DEV 0 /* SDHC2 */
104 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
105 #define CONFIG_EXTRA_ENV_SETTINGS \
106 "script=boot.scr\0" \
108 "fdtfile=undefined\0" \
109 "fdt_addr_r=0x18000000\0" \
112 "console=" CONFIG_CONSOLE_DEV "\0" \
113 "bootm_size=0x10000000\0" \
114 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
116 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
117 "update_sd_firmware=" \
118 "if test ${ip_dyn} = yes; then " \
119 "setenv get_cmd dhcp; " \
121 "setenv get_cmd tftp; " \
123 "if mmc dev ${mmcdev}; then " \
124 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
125 "setexpr fw_sz ${filesize} / 0x200; " \
126 "setexpr fw_sz ${fw_sz} + 1; " \
127 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
130 "mmcargs=setenv bootargs console=${console},${baudrate} " \
131 "root=${mmcroot}\0" \
133 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
134 "bootscript=echo Running bootscript from mmc ...; " \
136 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
137 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}\0" \
138 "mmcboot=echo Booting from mmc ...; " \
140 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
141 "if run loadfdt; then " \
142 "bootz ${loadaddr} - ${fdt_addr_r}; " \
144 "if test ${boot_fdt} = try; then " \
147 "echo WARN: Cannot load the DT; " \
153 "netargs=setenv bootargs console=${console},${baudrate} " \
155 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
156 "netboot=echo Booting from net ...; " \
158 "if test ${ip_dyn} = yes; then " \
159 "setenv get_cmd dhcp; " \
161 "setenv get_cmd tftp; " \
163 "${get_cmd} ${image}; " \
164 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
165 "if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then " \
166 "bootz ${loadaddr} - ${fdt_addr_r}; " \
168 "if test ${boot_fdt} = try; then " \
171 "echo WARN: Cannot load the DT; " \
178 "if test $board_name = HUMMINGBOARD && test $board_rev = MX6Q ; then " \
179 "setenv fdtfile imx6q-hummingboard.dtb; fi; " \
180 "if test $board_name = HUMMINGBOARD && test $board_rev = MX6DL ; then " \
181 "setenv fdtfile imx6dl-hummingboard.dtb; fi; " \
182 "if test $board_name = CUBOXI && test $board_rev = MX6Q ; then " \
183 "setenv fdtfile imx6q-cubox-i.dtb; fi; " \
184 "if test $board_name = CUBOXI && test $board_rev = MX6DL ; then " \
185 "setenv fdtfile imx6dl-cubox-i.dtb; fi; " \
186 "if test $fdtfile = undefined; then " \
187 "echo WARNING: Could not determine dtb to use; fi; \0" \
189 #define CONFIG_BOOTCOMMAND \
191 "mmc dev ${mmcdev};" \
192 "if mmc rescan; then " \
193 "if run loadbootscript; then " \
196 "if run loadimage; then " \
198 "else run netboot; " \
201 "else run netboot; fi"
203 /* Miscellaneous configurable options */
204 #define CONFIG_SYS_LONGHELP
205 #define CONFIG_SYS_HUSH_PARSER
206 #define CONFIG_AUTO_COMPLETE
207 #define CONFIG_SYS_CBSIZE 256
208 #define CONFIG_SYS_MAXARGS 16
209 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
211 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
213 #define CONFIG_CMDLINE_EDITING
215 /* Physical Memory Map */
216 #define CONFIG_NR_DRAM_BANKS 1
217 #define CONFIG_SYS_SDRAM_BASE MMDC0_ARB_BASE_ADDR
218 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
219 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
221 #define CONFIG_SYS_INIT_SP_OFFSET \
222 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
223 #define CONFIG_SYS_INIT_SP_ADDR \
224 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
226 /* Environment organization */
227 #define CONFIG_ENV_SIZE (8 * 1024)
228 #define CONFIG_ENV_IS_IN_MMC
229 #define CONFIG_ENV_OFFSET (8 * 64 * 1024)
231 #define CONFIG_OF_LIBFDT
232 #define CONFIG_CMD_CACHE
234 #endif /* __MX6CUBOXI_CONFIG_H */