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 <linux/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 #define CONFIG_SYS_GENERIC_BOARD
32 /* Size of malloc() pool */
33 #define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
35 #define CONFIG_BOARD_EARLY_INIT_F
36 #define CONFIG_MXC_GPIO
38 #define CONFIG_MXC_UART
39 #define CONFIG_MXC_UART_BASE UART1_BASE
41 /* allow to overwrite serial and ethaddr */
42 #define CONFIG_ENV_OVERWRITE
43 #define CONFIG_CONS_INDEX 1
44 #define CONFIG_BAUDRATE 115200
46 /* Command definition */
47 #include <config_cmd_default.h>
49 #undef CONFIG_CMD_IMLS
52 #define CONFIG_CMD_BMODE
53 #define CONFIG_CMD_SETEXPR
54 #define CONFIG_CMD_MEMTEST
55 #define CONFIG_BOOTDELAY 3
57 #define CONFIG_SYS_MEMTEST_START 0x10000000
58 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
59 #define CONFIG_LOADADDR 0x12000000
60 #define CONFIG_SYS_TEXT_BASE 0x17800000
62 /* MMC Configuration */
63 #define CONFIG_FSL_ESDHC
64 #define CONFIG_FSL_USDHC
65 #define CONFIG_SYS_FSL_USDHC_NUM 1
66 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
69 #define CONFIG_CMD_MMC
70 #define CONFIG_GENERIC_MMC
71 #define CONFIG_BOUNCE_BUFFER
72 #define CONFIG_CMD_EXT2
73 #define CONFIG_CMD_FAT
74 #define CONFIG_DOS_PARTITION
76 /* Ethernet Configuration */
77 #define CONFIG_FEC_MXC
79 #define CONFIG_CMD_PING
80 #define CONFIG_CMD_DHCP
81 #define CONFIG_CMD_MII
82 #define CONFIG_CMD_NET
84 #define IMX_FEC_BASE ENET_BASE_ADDR
85 #define CONFIG_FEC_XCV_TYPE RGMII
86 #define CONFIG_FEC_MXC_PHYADDR 0
88 #define CONFIG_PHY_ATHEROS
91 #if defined(CONFIG_MX6S)
92 #define CONFIG_DEFAULT_FDT_FILE "imx6dl-hummingboard.dtb"
95 #define CONFIG_EXTRA_ENV_SETTINGS \
100 "fdt_high=0xffffffff\0" \
101 "initrd_high=0xffffffff\0" \
102 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
103 "fdt_addr=0x18000000\0" \
106 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
108 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
109 "update_sd_firmware_filename=u-boot.imx\0" \
110 "update_sd_firmware=" \
111 "if test ${ip_dyn} = yes; then " \
112 "setenv get_cmd dhcp; " \
114 "setenv get_cmd tftp; " \
116 "if mmc dev ${mmcdev}; then " \
117 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
118 "setexpr fw_sz ${filesize} / 0x200; " \
119 "setexpr fw_sz ${fw_sz} + 1; " \
120 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
123 "mmcargs=setenv bootargs console=${console},${baudrate} " \
124 "root=${mmcroot}\0" \
126 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
127 "bootscript=echo Running bootscript from mmc ...; " \
129 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
130 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
131 "mmcboot=echo Booting from mmc ...; " \
133 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
134 "if run loadfdt; then " \
135 "bootz ${loadaddr} - ${fdt_addr}; " \
137 "if test ${boot_fdt} = try; then " \
140 "echo WARN: Cannot load the DT; " \
146 "netargs=setenv bootargs console=${console},${baudrate} " \
148 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
149 "netboot=echo Booting from net ...; " \
151 "if test ${ip_dyn} = yes; then " \
152 "setenv get_cmd dhcp; " \
154 "setenv get_cmd tftp; " \
156 "${get_cmd} ${image}; " \
157 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
158 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
159 "bootz ${loadaddr} - ${fdt_addr}; " \
161 "if test ${boot_fdt} = try; then " \
164 "echo WARN: Cannot load the DT; " \
171 #define CONFIG_BOOTCOMMAND \
172 "mmc dev ${mmcdev}; if mmc rescan; then " \
173 "if run loadbootscript; then " \
176 "if run loadimage; then " \
178 "else run netboot; " \
181 "else run netboot; fi"
183 /* Miscellaneous configurable options */
184 #define CONFIG_SYS_LONGHELP
185 #define CONFIG_SYS_HUSH_PARSER
186 #define CONFIG_AUTO_COMPLETE
187 #define CONFIG_SYS_CBSIZE 1024
189 /* Print Buffer Size */
190 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
191 #define CONFIG_SYS_MAXARGS 16
192 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
194 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
196 #define CONFIG_CMDLINE_EDITING
198 /* Physical Memory Map */
199 #define CONFIG_NR_DRAM_BANKS 1
200 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
202 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
203 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
204 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
206 #define CONFIG_SYS_INIT_SP_OFFSET \
207 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
208 #define CONFIG_SYS_INIT_SP_ADDR \
209 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
211 /* FLASH and environment organization */
212 #define CONFIG_SYS_NO_FLASH
214 #define CONFIG_ENV_SIZE (8 * 1024)
216 #define CONFIG_ENV_IS_IN_MMC
217 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
218 #define CONFIG_SYS_MMC_ENV_DEV 0
220 #define CONFIG_OF_LIBFDT
221 #define CONFIG_CMD_BOOTZ
223 #ifndef CONFIG_SYS_DCACHE_OFF
224 #define CONFIG_CMD_CACHE
227 #endif /* __CONFIG_H * */