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 (3 * SZ_1M)
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
47 #define CONFIG_CMD_MMC
48 #define CONFIG_GENERIC_MMC
49 #define CONFIG_BOUNCE_BUFFER
50 #define CONFIG_CMD_EXT2
51 #define CONFIG_CMD_EXT4
52 #define CONFIG_CMD_EXT4_WRITE
53 #define CONFIG_CMD_FAT
54 #define CONFIG_DOS_PARTITION
56 /* allow to overwrite serial and ethaddr */
57 #define CONFIG_ENV_OVERWRITE
58 #define CONFIG_CONS_INDEX 1
59 #define CONFIG_BAUDRATE 115200
61 /* FLASH and environment organization */
62 #define CONFIG_SYS_NO_FLASH
64 /* Command definition */
65 #include <config_cmd_default.h>
69 #define CONFIG_BOOTDELAY 3
71 #define CONFIG_LOADADDR 0x82000000
72 #define CONFIG_SYS_TEXT_BASE 0x87800000
74 /* Miscellaneous configurable options */
75 #define CONFIG_SYS_LONGHELP
76 #define CONFIG_SYS_HUSH_PARSER
77 #define CONFIG_AUTO_COMPLETE
78 #define CONFIG_SYS_CBSIZE 256
81 #define CONFIG_HW_WATCHDOG
82 #define CONFIG_IMX_WATCHDOG
83 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
85 /* Print Buffer Size */
86 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
87 #define CONFIG_SYS_MAXARGS 16
88 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
90 #define CONFIG_SYS_MEMTEST_START 0x80000000
91 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + SZ_256M)
93 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
95 #define CONFIG_CMDLINE_EDITING
96 #define CONFIG_STACKSIZE SZ_128K
98 /* Physical Memory Map */
99 #define CONFIG_NR_DRAM_BANKS 1
100 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
101 #define PHYS_SDRAM_SIZE SZ_512M
103 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
104 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
105 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
107 #define CONFIG_SYS_INIT_SP_OFFSET \
108 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
109 #define CONFIG_SYS_INIT_SP_ADDR \
110 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
112 #define CONFIG_ENV_OFFSET (6 * SZ_64K)
113 #define CONFIG_ENV_SIZE SZ_8K
114 #define CONFIG_ENV_IS_IN_MMC
115 #define CONFIG_SYS_MMC_ENV_DEV 0
117 /* VDD voltage 1.65 - 1.95 */
118 #define CONFIG_SYS_SD_VOLTAGE 0x00000080
120 #define CONFIG_OF_LIBFDT
121 #define CONFIG_CMD_BOOTZ
123 #ifndef CONFIG_SYS_DCACHE_OFF
124 #define CONFIG_CMD_CACHE
128 #define CONFIG_CMD_USB
129 #ifdef CONFIG_CMD_USB
130 #define CONFIG_USB_EHCI
131 #define CONFIG_USB_EHCI_MX6
132 #define CONFIG_USB_STORAGE
133 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
134 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
135 #define CONFIG_MXC_USB_FLAGS 0
136 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1 /* Only OTG2 port enabled */
139 #define CONFIG_CI_UDC
140 #define CONFIG_USBD_HS
141 #define CONFIG_USB_GADGET_DUALSPEED
143 #define CONFIG_USB_GADGET
144 #define CONFIG_CMD_USB_MASS_STORAGE
145 #define CONFIG_USB_GADGET_MASS_STORAGE
146 #define CONFIG_USBDOWNLOAD_GADGET
147 #define CONFIG_USB_GADGET_VBUS_DRAW 2
149 #define CONFIG_G_DNL_VENDOR_NUM 0x0525
150 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
151 #define CONFIG_G_DNL_MANUFACTURER "FSL"
153 #define CONFIG_EXTRA_ENV_SETTINGS \
154 "script=boot.scr\0" \
156 "console=ttymxc0\0" \
157 "fdt_high=0xffffffff\0" \
158 "initrd_high=0xffffffff\0" \
159 "fdt_file=imx6sl-warp.dtb\0" \
160 "fdt_addr=0x88000000\0" \
161 "initrd_addr=0x83800000\0" \
166 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
167 "mmcargs=setenv bootargs console=${console},${baudrate} " \
168 "root=${mmcroot}\0" \
170 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
171 "bootscript=echo Running bootscript from mmc ...; " \
173 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
174 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
175 "mmcboot=echo Booting from mmc ...; " \
177 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
178 "if run loadfdt; then " \
179 "bootz ${loadaddr} - ${fdt_addr}; " \
181 "if test ${boot_fdt} = try; then " \
184 "echo WARN: Cannot load the DT; " \
190 "netargs=setenv bootargs console=${console},${baudrate} " \
192 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
193 "netboot=echo Booting from net ...; " \
195 "if test ${ip_dyn} = yes; then " \
196 "setenv get_cmd dhcp; " \
198 "setenv get_cmd tftp; " \
200 "${get_cmd} ${image}; " \
201 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
202 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
203 "bootz ${loadaddr} - ${fdt_addr}; " \
205 "if test ${boot_fdt} = try; then " \
208 "echo WARN: Cannot load the DT; " \
215 #define CONFIG_BOOTCOMMAND \
216 "mmc dev ${mmcdev};" \
217 "mmc dev ${mmcdev}; if mmc rescan; then " \
218 "if run loadbootscript; then " \
221 "if run loadimage; then " \
223 "else run netboot; " \
226 "else run netboot; fi"
228 #endif /* __CONFIG_H */