2 * Copyright (C) 2014 O.S. Systems Software LTDA.
3 * Copyright (C) 2014 Kynetics LLC.
4 * Copyright (C) 2014 Revolution Robotics, Inc.
6 * Author: Otavio Salvador <otavio@ossystems.com.br>
8 * Configuration settings for the WaRP Board
10 * SPDX-License-Identifier: GPL-2.0+
16 #include <asm/arch/imx-regs.h>
17 #include <linux/sizes.h>
18 #include "mx6_common.h"
21 #define CONFIG_DISPLAY_CPUINFO
22 #define CONFIG_DISPLAY_BOARDINFO
23 #define CONFIG_SYS_GENERIC_BOARD
25 #define CONFIG_CMDLINE_TAG
26 #define CONFIG_SETUP_MEMORY_TAGS
27 #define CONFIG_INITRD_TAG
28 #define CONFIG_REVISION_TAG
30 /* Size of malloc() pool */
31 #define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) /* Increase due to DFU */
33 #define CONFIG_BOARD_EARLY_INIT_F
34 #define CONFIG_BOARD_LATE_INIT
35 #define CONFIG_MXC_GPIO
37 #define CONFIG_MXC_UART
38 #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
41 #define CONFIG_FSL_ESDHC
42 #define CONFIG_FSL_USDHC
43 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
44 #define CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
45 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
48 #define CONFIG_CMD_MMC
49 #define CONFIG_GENERIC_MMC
50 #define CONFIG_BOUNCE_BUFFER
51 #define CONFIG_CMD_EXT2
52 #define CONFIG_CMD_EXT4
53 #define CONFIG_CMD_EXT4_WRITE
54 #define CONFIG_CMD_FAT
55 #define CONFIG_DOS_PARTITION
57 /* allow to overwrite serial and ethaddr */
58 #define CONFIG_ENV_OVERWRITE
59 #define CONFIG_CONS_INDEX 1
60 #define CONFIG_BAUDRATE 115200
62 /* FLASH and environment organization */
63 #define CONFIG_SYS_NO_FLASH
65 /* Command definition */
66 #include <config_cmd_default.h>
70 #define CONFIG_BOOTDELAY 3
72 #define CONFIG_LOADADDR 0x82000000
73 #define CONFIG_SYS_TEXT_BASE 0x87800000
75 /* Miscellaneous configurable options */
76 #define CONFIG_SYS_LONGHELP
77 #define CONFIG_SYS_HUSH_PARSER
78 #define CONFIG_AUTO_COMPLETE
79 #define CONFIG_SYS_CBSIZE 256
82 #define CONFIG_HW_WATCHDOG
83 #define CONFIG_IMX_WATCHDOG
84 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
85 #define CONFIG_SYS_MAXARGS 16
86 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
88 #define CONFIG_SYS_MEMTEST_START 0x80000000
89 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_256M)
91 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
93 #define CONFIG_CMDLINE_EDITING
94 #define CONFIG_STACKSIZE SZ_128K
96 /* Physical Memory Map */
97 #define CONFIG_NR_DRAM_BANKS 1
98 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
99 #define PHYS_SDRAM_SIZE SZ_512M
101 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
102 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
103 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
105 #define CONFIG_SYS_INIT_SP_OFFSET \
106 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
107 #define CONFIG_SYS_INIT_SP_ADDR \
108 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
110 #define CONFIG_ENV_OFFSET (6 * SZ_64K)
111 #define CONFIG_ENV_SIZE SZ_8K
112 #define CONFIG_ENV_IS_IN_MMC
113 #define CONFIG_SYS_MMC_ENV_DEV 0
115 /* VDD voltage 1.65 - 1.95 */
116 #define CONFIG_SYS_SD_VOLTAGE 0x00000080
118 #define CONFIG_OF_LIBFDT
119 #define CONFIG_CMD_BOOTZ
121 #ifndef CONFIG_SYS_DCACHE_OFF
122 #define CONFIG_CMD_CACHE
126 #define CONFIG_CMD_USB
127 #ifdef CONFIG_CMD_USB
128 #define CONFIG_USB_EHCI
129 #define CONFIG_USB_EHCI_MX6
130 #define CONFIG_USB_STORAGE
131 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
132 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
133 #define CONFIG_MXC_USB_FLAGS 0
134 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG2 port enabled */
137 #define CONFIG_CI_UDC
138 #define CONFIG_USBD_HS
139 #define CONFIG_USB_GADGET_DUALSPEED
141 #define CONFIG_USB_GADGET
142 #define CONFIG_CMD_USB_MASS_STORAGE
143 #define CONFIG_USB_GADGET_MASS_STORAGE
144 #define CONFIG_USBDOWNLOAD_GADGET
145 #define CONFIG_USB_GADGET_VBUS_DRAW 2
147 #define CONFIG_G_DNL_VENDOR_NUM 0x0525
148 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
149 #define CONFIG_G_DNL_MANUFACTURER "FSL"
151 #define CONFIG_CMD_DFU
152 #define CONFIG_DFU_FUNCTION
153 #define CONFIG_DFU_MMC
154 #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M
155 #define DFU_DEFAULT_POLL_TIMEOUT 300
157 #define CONFIG_EXTRA_ENV_SETTINGS \
158 "script=boot.scr\0" \
160 "console=ttymxc0\0" \
161 "fdt_high=0xffffffff\0" \
162 "initrd_high=0xffffffff\0" \
163 "fdt_file=imx6sl-warp.dtb\0" \
164 "fdt_addr=0x88000000\0" \
165 "initrd_addr=0x83800000\0" \
170 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
171 "dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
172 "mmcargs=setenv bootargs console=${console},${baudrate} " \
173 "root=${mmcroot}\0" \
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 ...; " \
182 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
183 "if run loadfdt; then " \
184 "bootz ${loadaddr} - ${fdt_addr}; " \
186 "if test ${boot_fdt} = try; then " \
189 "echo WARN: Cannot load the DT; " \
195 "netargs=setenv bootargs console=${console},${baudrate} " \
197 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
198 "netboot=echo Booting from net ...; " \
200 "if test ${ip_dyn} = yes; then " \
201 "setenv get_cmd dhcp; " \
203 "setenv get_cmd tftp; " \
205 "${get_cmd} ${image}; " \
206 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
207 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
208 "bootz ${loadaddr} - ${fdt_addr}; " \
210 "if test ${boot_fdt} = try; then " \
213 "echo WARN: Cannot load the DT; " \
220 #define CONFIG_BOOTCOMMAND \
221 "mmc dev ${mmcdev};" \
222 "mmc dev ${mmcdev}; if mmc rescan; then " \
223 "if run loadbootscript; then " \
226 "if run loadimage; then " \
228 "else run netboot; " \
231 "else run netboot; fi"
233 #endif /* __CONFIG_H */