2 * Copyright (C) 2012 Freescale Semiconductor, Inc.
4 * Configuration settings for the Freescale i.MX6Q SabreSD board.
6 * SPDX-License-Identifier: GPL-2.0+
9 #ifndef __MX6QSABRE_COMMON_CONFIG_H
10 #define __MX6QSABRE_COMMON_CONFIG_H
13 #include "mx6_common.h"
14 #include <linux/sizes.h>
16 #define CONFIG_DISPLAY_CPUINFO
17 #define CONFIG_DISPLAY_BOARDINFO
19 #include <asm/arch/imx-regs.h>
20 #include <asm/imx-common/gpio.h>
22 #define CONFIG_CMDLINE_TAG
23 #define CONFIG_SETUP_MEMORY_TAGS
24 #define CONFIG_INITRD_TAG
25 #define CONFIG_REVISION_TAG
27 #define CONFIG_IMX6_THERMAL
29 #define CONFIG_SYS_GENERIC_BOARD
31 /* Size of malloc() pool */
32 #define CONFIG_SYS_MALLOC_LEN (10 * SZ_1M)
34 #define CONFIG_BOARD_EARLY_INIT_F
35 #define CONFIG_BOARD_LATE_INIT
36 #define CONFIG_MXC_GPIO
38 #define CONFIG_MXC_UART
40 #define CONFIG_CMD_FUSE
41 #if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
42 #define CONFIG_MXC_OCOTP
46 #define CONFIG_FSL_ESDHC
47 #define CONFIG_FSL_USDHC
48 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
51 #define CONFIG_CMD_MMC
52 #define CONFIG_GENERIC_MMC
53 #define CONFIG_BOUNCE_BUFFER
54 #define CONFIG_CMD_EXT2
55 #define CONFIG_CMD_EXT4
56 #define CONFIG_CMD_EXT4_WRITE
57 #define CONFIG_CMD_FAT
58 #define CONFIG_DOS_PARTITION
60 #define CONFIG_CMD_PING
61 #define CONFIG_CMD_DHCP
62 #define CONFIG_CMD_MII
63 #define CONFIG_CMD_NET
64 #define CONFIG_FEC_MXC
66 #define IMX_FEC_BASE ENET_BASE_ADDR
67 #define CONFIG_FEC_XCV_TYPE RGMII
68 #define CONFIG_ETHPRIME "FEC"
69 #define CONFIG_FEC_MXC_PHYADDR 1
72 #define CONFIG_PHY_ATHEROS
76 #define CONFIG_SPI_FLASH
77 #define CONFIG_SPI_FLASH_STMICRO
78 #define CONFIG_MXC_SPI
79 #define CONFIG_SF_DEFAULT_BUS 0
80 #define CONFIG_SF_DEFAULT_CS 0
81 #define CONFIG_SF_DEFAULT_SPEED 20000000
82 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
85 /* allow to overwrite serial and ethaddr */
86 #define CONFIG_ENV_OVERWRITE
87 #define CONFIG_CONS_INDEX 1
88 #define CONFIG_BAUDRATE 115200
90 /* Command definition */
91 #include <config_cmd_default.h>
93 #define CONFIG_CMD_BMODE
94 #define CONFIG_CMD_BOOTZ
95 #define CONFIG_CMD_SETEXPR
96 #undef CONFIG_CMD_IMLS
98 #define CONFIG_BOOTDELAY 1
100 #define CONFIG_LOADADDR 0x12000000
101 #define CONFIG_SYS_TEXT_BASE 0x17800000
103 #ifdef CONFIG_SUPPORT_EMMC_BOOT
106 "update_emmc_firmware=" \
107 "if test ${ip_dyn} = yes; then " \
108 "setenv get_cmd dhcp; " \
110 "setenv get_cmd tftp; " \
112 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
113 "if mmc dev ${emmcdev} 1; then " \
114 "setexpr fw_sz ${filesize} / 0x200; " \
115 "setexpr fw_sz ${fw_sz} + 1; " \
116 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
124 #define VIDEO_ARGS ""
127 #ifndef VIDEO_ARGS_SCRIPT
128 #define VIDEO_ARGS_SCRIPT ""
131 #define CONFIG_EXTRA_ENV_SETTINGS \
132 "script=boot.scr\0" \
134 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
135 "fdt_addr=0x18000000\0" \
138 "console=" CONFIG_CONSOLE_DEV "\0" \
139 "fdt_high=0xffffffff\0" \
140 "initrd_high=0xffffffff\0" \
141 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
143 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
144 "update_sd_firmware=" \
145 "if test ${ip_dyn} = yes; then " \
146 "setenv get_cmd dhcp; " \
148 "setenv get_cmd tftp; " \
150 "if mmc dev ${mmcdev}; then " \
151 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
152 "setexpr fw_sz ${filesize} / 0x200; " \
153 "setexpr fw_sz ${fw_sz} + 1; " \
154 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
158 "video_args_hdmi=setenv video_args $video_args " \
159 "video=mxcfb${fb}:dev=hdmi,1280x720M@60,if=RGB24\0" \
160 "video_args_lvds=setenv video_args $video_args " \
161 "video=mxcfb${fb}:dev=ldb,LDB-XGA,if=RGB666\0" \
162 "video_args_lcd=setenv video_args $video_args " \
163 "video=mxcfb${fb}:dev=lcd,CLAA-WVGA,if=RGB666\0" \
165 "video_interfaces=hdmi lvds lcd\0" \
166 "video_args_script=" \
167 "for v in ${video_interfaces}; do " \
168 "run video_args_${v}; " \
169 "setexpr fb $fb + 1; " \
171 "mmcargs=setenv bootargs console=${console},${baudrate} " \
175 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
176 "bootscript=echo Running bootscript from mmc ...; " \
178 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
179 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
180 "mmcboot=echo Booting from mmc ...; " \
183 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
184 "if run loadfdt; then " \
185 "bootz ${loadaddr} - ${fdt_addr}; " \
187 "if test ${boot_fdt} = try; then " \
190 "echo WARN: Cannot load the DT; " \
196 "netargs=setenv bootargs console=${console},${baudrate} " \
198 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
199 "netboot=echo Booting from net ...; " \
201 "if test ${ip_dyn} = yes; then " \
202 "setenv get_cmd dhcp; " \
204 "setenv get_cmd tftp; " \
206 "${get_cmd} ${image}; " \
207 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
208 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
209 "bootz ${loadaddr} - ${fdt_addr}; " \
211 "if test ${boot_fdt} = try; then " \
214 "echo WARN: Cannot load the DT; " \
221 #define CONFIG_BOOTCOMMAND \
222 "mmc dev ${mmcdev};" \
223 "if mmc rescan; then " \
224 "if run loadbootscript; then " \
227 "if run loadimage; then " \
229 "else run netboot; " \
232 "else run netboot; fi"
234 #define CONFIG_ARP_TIMEOUT 200UL
236 /* Miscellaneous configurable options */
237 #define CONFIG_SYS_LONGHELP
238 #define CONFIG_SYS_HUSH_PARSER
239 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
240 #define CONFIG_AUTO_COMPLETE
241 #define CONFIG_SYS_CBSIZE 256
242 #define CONFIG_SYS_MAXARGS 16
243 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
245 #define CONFIG_SYS_MEMTEST_START 0x10000000
246 #define CONFIG_SYS_MEMTEST_END 0x10010000
247 #define CONFIG_SYS_MEMTEST_SCRATCH 0x10800000
249 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
251 #define CONFIG_CMDLINE_EDITING
252 #define CONFIG_STACKSIZE (128 * 1024)
254 /* Physical Memory Map */
255 #define CONFIG_NR_DRAM_BANKS 1
256 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
258 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
259 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
260 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
262 #define CONFIG_SYS_INIT_SP_OFFSET \
263 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
264 #define CONFIG_SYS_INIT_SP_ADDR \
265 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
267 /* FLASH and environment organization */
268 #define CONFIG_SYS_NO_FLASH
270 #define CONFIG_ENV_SIZE (8 * 1024)
272 #define CONFIG_ENV_IS_IN_MMC
274 #if defined(CONFIG_ENV_IS_IN_MMC)
275 #define CONFIG_ENV_OFFSET (8 * 64 * 1024)
278 #define CONFIG_OF_LIBFDT
280 #ifndef CONFIG_SYS_DCACHE_OFF
281 #define CONFIG_CMD_CACHE
286 #define CONFIG_VIDEO_IPUV3
287 #define CONFIG_CFB_CONSOLE
288 #define CONFIG_VGA_AS_SINGLE_DEVICE
289 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
290 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
291 #define CONFIG_VIDEO_BMP_RLE8
292 #define CONFIG_SPLASH_SCREEN
293 #define CONFIG_SPLASH_SCREEN_ALIGN
294 #define CONFIG_BMP_16BPP
295 #define CONFIG_VIDEO_LOGO
296 #define CONFIG_VIDEO_BMP_LOGO
297 #define CONFIG_IPUV3_CLK 260000000
298 #define CONFIG_IMX_HDMI
299 #define CONFIG_IMX_VIDEO_SKIP
302 #define CONFIG_CI_UDC
303 #define CONFIG_USBD_HS
304 #define CONFIG_USB_GADGET_DUALSPEED
306 #define CONFIG_USB_GADGET
307 #define CONFIG_CMD_USB_MASS_STORAGE
308 #define CONFIG_USB_GADGET_MASS_STORAGE
309 #define CONFIG_USBDOWNLOAD_GADGET
310 #define CONFIG_USB_GADGET_VBUS_DRAW 2
312 #define CONFIG_G_DNL_VENDOR_NUM 0x0525
313 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
314 #define CONFIG_G_DNL_MANUFACTURER "FSL"
317 #endif /* __MX6QSABRE_COMMON_CONFIG_H */