2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 * Copyright (C) 2013 SolidRun ltd.
4 * Copyright (C) 2013 Jon Nettleton <jon.nettleton@gmail.com>
6 * Configuration settings for the SolidRun Hummingboard.
8 * SPDX-License-Identifier: GPL-2.0+
14 #include "mx6_common.h"
15 #include <asm/arch/imx-regs.h>
16 #include <asm/imx-common/gpio.h>
17 #include <asm/sizes.h>
20 #define CONFIG_DISPLAY_CPUINFO
21 #define CONFIG_DISPLAY_BOARDINFO
23 #define CONFIG_MACH_TYPE 4773
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 (2 * SZ_1M)
33 #define CONFIG_BOARD_EARLY_INIT_F
34 #define CONFIG_MXC_GPIO
36 #define CONFIG_MXC_UART
37 #define CONFIG_MXC_UART_BASE UART1_BASE
39 /* allow to overwrite serial and ethaddr */
40 #define CONFIG_ENV_OVERWRITE
41 #define CONFIG_CONS_INDEX 1
42 #define CONFIG_BAUDRATE 115200
44 /* Command definition */
45 #include <config_cmd_default.h>
47 #undef CONFIG_CMD_IMLS
50 #define CONFIG_CMD_BMODE
51 #define CONFIG_CMD_SETEXPR
52 #define CONFIG_CMD_MEMTEST
53 #define CONFIG_BOOTDELAY 3
55 #define CONFIG_SYS_MEMTEST_START 0x10000000
56 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
57 #define CONFIG_LOADADDR 0x12000000
58 #define CONFIG_SYS_TEXT_BASE 0x17800000
60 /* MMC Configuration */
61 #define CONFIG_FSL_ESDHC
62 #define CONFIG_FSL_USDHC
63 #define CONFIG_SYS_FSL_USDHC_NUM 1
64 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
67 #define CONFIG_CMD_MMC
68 #define CONFIG_GENERIC_MMC
69 #define CONFIG_BOUNCE_BUFFER
70 #define CONFIG_CMD_EXT2
71 #define CONFIG_CMD_FAT
72 #define CONFIG_DOS_PARTITION
74 /* Ethernet Configuration */
75 #define CONFIG_FEC_MXC
77 #define CONFIG_CMD_PING
78 #define CONFIG_CMD_DHCP
79 #define CONFIG_CMD_MII
80 #define CONFIG_CMD_NET
82 #define IMX_FEC_BASE ENET_BASE_ADDR
83 #define CONFIG_FEC_XCV_TYPE RGMII
84 #define CONFIG_FEC_MXC_PHYADDR 0
86 #define CONFIG_PHY_ATHEROS
89 #if defined(CONFIG_MX6S)
90 #define CONFIG_DEFAULT_FDT_FILE "imx6dl-hummingboard.dtb"
93 #define CONFIG_EXTRA_ENV_SETTINGS \
98 "fdt_high=0xffffffff\0" \
99 "initrd_high=0xffffffff\0" \
100 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
101 "fdt_addr=0x18000000\0" \
104 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
106 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
107 "update_sd_firmware_filename=u-boot.imx\0" \
108 "update_sd_firmware=" \
109 "if test ${ip_dyn} = yes; then " \
110 "setenv get_cmd dhcp; " \
112 "setenv get_cmd tftp; " \
114 "if mmc dev ${mmcdev}; then " \
115 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
116 "setexpr fw_sz ${filesize} / 0x200; " \
117 "setexpr fw_sz ${fw_sz} + 1; " \
118 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
121 "mmcargs=setenv bootargs console=${console},${baudrate} " \
122 "root=${mmcroot}\0" \
124 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
125 "bootscript=echo Running bootscript from mmc ...; " \
127 "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
128 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
129 "mmcboot=echo Booting from mmc ...; " \
131 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
132 "if run loadfdt; then " \
133 "bootm ${loadaddr} - ${fdt_addr}; " \
135 "if test ${boot_fdt} = try; then " \
138 "echo WARN: Cannot load the DT; " \
144 "netargs=setenv bootargs console=${console},${baudrate} " \
146 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
147 "netboot=echo Booting from net ...; " \
149 "if test ${ip_dyn} = yes; then " \
150 "setenv get_cmd dhcp; " \
152 "setenv get_cmd tftp; " \
154 "${get_cmd} ${uimage}; " \
155 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
156 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
157 "bootm ${loadaddr} - ${fdt_addr}; " \
159 "if test ${boot_fdt} = try; then " \
162 "echo WARN: Cannot load the DT; " \
169 #define CONFIG_BOOTCOMMAND \
170 "mmc dev ${mmcdev}; if mmc rescan; then " \
171 "if run loadbootscript; then " \
174 "if run loaduimage; then " \
176 "else run netboot; " \
179 "else run netboot; fi"
181 /* Miscellaneous configurable options */
182 #define CONFIG_SYS_LONGHELP
183 #define CONFIG_SYS_HUSH_PARSER
184 #define CONFIG_AUTO_COMPLETE
185 #define CONFIG_SYS_CBSIZE 1024
187 /* Print Buffer Size */
188 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
189 #define CONFIG_SYS_MAXARGS 16
190 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
192 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
193 #define CONFIG_SYS_HZ 1000
195 #define CONFIG_CMDLINE_EDITING
197 /* Physical Memory Map */
198 #define CONFIG_NR_DRAM_BANKS 1
199 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
201 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
202 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
203 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
205 #define CONFIG_SYS_INIT_SP_OFFSET \
206 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
207 #define CONFIG_SYS_INIT_SP_ADDR \
208 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
210 /* FLASH and environment organization */
211 #define CONFIG_SYS_NO_FLASH
213 #define CONFIG_ENV_SIZE (8 * 1024)
215 #define CONFIG_ENV_IS_IN_MMC
216 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
217 #define CONFIG_SYS_MMC_ENV_DEV 0
219 #define CONFIG_OF_LIBFDT
220 #define CONFIG_CMD_BOOTZ
222 #ifndef CONFIG_SYS_DCACHE_OFF
223 #define CONFIG_CMD_CACHE
226 #endif /* __CONFIG_H * */