2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
4 * Configuration settings for Udoo board.
6 * SPDX-License-Identifier: GPL-2.0+
12 #include "mx6_common.h"
13 #include <asm/arch/imx-regs.h>
14 #include <asm/imx-common/gpio.h>
15 #include <linux/sizes.h>
18 #define CONFIG_DISPLAY_CPUINFO
19 #define CONFIG_DISPLAY_BOARDINFO
21 #define MACH_TYPE_UDOO 4800
22 #define CONFIG_MACH_TYPE MACH_TYPE_UDOO
24 #define CONFIG_CMDLINE_TAG
25 #define CONFIG_SETUP_MEMORY_TAGS
26 #define CONFIG_INITRD_TAG
27 #define CONFIG_REVISION_TAG
29 #define CONFIG_SYS_GENERIC_BOARD
31 /* Size of malloc() pool */
32 #define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
34 #define CONFIG_BOARD_EARLY_INIT_F
35 #define CONFIG_MXC_GPIO
37 #define CONFIG_MXC_UART
38 #define CONFIG_MXC_UART_BASE UART2_BASE
42 #define CONFIG_CMD_SATA
43 #ifdef CONFIG_CMD_SATA
44 #define CONFIG_DWC_AHSATA
45 #define CONFIG_SYS_SATA_MAX_DEVICE 1
46 #define CONFIG_DWC_AHSATA_PORT_ID 0
47 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
54 #define CONFIG_CMD_PING
55 #define CONFIG_CMD_DHCP
56 #define CONFIG_CMD_MII
57 #define CONFIG_CMD_NET
58 #define CONFIG_FEC_MXC
60 #define IMX_FEC_BASE ENET_BASE_ADDR
61 #define CONFIG_FEC_XCV_TYPE RGMII
62 #define CONFIG_ETHPRIME "FEC"
63 #define CONFIG_FEC_MXC_PHYADDR 6
65 #define CONFIG_PHY_MICREL
66 #define CONFIG_PHY_MICREL_KSZ9031
68 /* allow to overwrite serial and ethaddr */
69 #define CONFIG_ENV_OVERWRITE
70 #define CONFIG_CONS_INDEX 1
71 #define CONFIG_BAUDRATE 115200
73 /* Command definition */
74 #include <config_cmd_default.h>
76 #undef CONFIG_CMD_IMLS
78 #define CONFIG_CMD_BMODE
79 #define CONFIG_CMD_SETEXPR
81 #define CONFIG_BOOTDELAY 3
83 #define CONFIG_SYS_MEMTEST_START 0x10000000
84 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
85 #define CONFIG_LOADADDR 0x12000000
86 #define CONFIG_SYS_TEXT_BASE 0x17800000
88 /* MMC Configuration */
89 #define CONFIG_FSL_ESDHC
90 #define CONFIG_FSL_USDHC
91 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
94 #define CONFIG_CMD_MMC
95 #define CONFIG_GENERIC_MMC
96 #define CONFIG_BOUNCE_BUFFER
97 #define CONFIG_CMD_EXT2
98 #define CONFIG_CMD_FAT
99 #define CONFIG_DOS_PARTITION
101 #define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
103 #define CONFIG_EXTRA_ENV_SETTINGS \
104 "script=boot.scr\0" \
106 "console=ttymxc1\0" \
108 "fdt_high=0xffffffff\0" \
109 "initrd_high=0xffffffff\0" \
110 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
111 "fdt_addr=0x18000000\0" \
116 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
117 "update_sd_firmware_filename=u-boot.imx\0" \
118 "update_sd_firmware=" \
119 "if test ${ip_dyn} = yes; then " \
120 "setenv get_cmd dhcp; " \
122 "setenv get_cmd tftp; " \
124 "if mmc dev ${mmcdev}; then " \
125 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
126 "setexpr fw_sz ${filesize} / 0x200; " \
127 "setexpr fw_sz ${fw_sz} + 1; " \
128 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
131 "mmcargs=setenv bootargs console=${console},${baudrate} " \
132 "root=${mmcroot}\0" \
134 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
135 "bootscript=echo Running bootscript from mmc ...; " \
137 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
138 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
139 "mmcboot=echo Booting from mmc ...; " \
141 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
142 "if run loadfdt; then " \
143 "bootz ${loadaddr} - ${fdt_addr}; " \
145 "if test ${boot_fdt} = try; then " \
148 "echo WARN: Cannot load the DT; " \
154 "netargs=setenv bootargs console=${console},${baudrate} " \
156 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
157 "netboot=echo Booting from net ...; " \
159 "if test ${ip_dyn} = yes; then " \
160 "setenv get_cmd dhcp; " \
162 "setenv get_cmd tftp; " \
164 "${get_cmd} ${image}; " \
165 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
166 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
167 "bootz ${loadaddr} - ${fdt_addr}; " \
169 "if test ${boot_fdt} = try; then " \
172 "echo WARN: Cannot load the DT; " \
179 #define CONFIG_BOOTCOMMAND \
180 "mmc dev ${mmcdev}; if mmc rescan; then " \
181 "if run loadbootscript; then " \
184 "if run loadimage; then " \
186 "else run netboot; " \
189 "else run netboot; fi"
191 /* Miscellaneous configurable options */
192 #define CONFIG_SYS_LONGHELP
193 #define CONFIG_SYS_HUSH_PARSER
194 #define CONFIG_SYS_PROMPT "=> "
195 #define CONFIG_AUTO_COMPLETE
196 #define CONFIG_SYS_CBSIZE 256
198 /* Print Buffer Size */
199 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
200 #define CONFIG_SYS_MAXARGS 16
201 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
203 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
205 #define CONFIG_CMDLINE_EDITING
207 /* Physical Memory Map */
208 #define CONFIG_NR_DRAM_BANKS 1
209 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
211 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
212 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
213 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
215 #define CONFIG_SYS_INIT_SP_OFFSET \
216 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
217 #define CONFIG_SYS_INIT_SP_ADDR \
218 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
220 /* FLASH and environment organization */
221 #define CONFIG_SYS_NO_FLASH
223 #define CONFIG_ENV_SIZE (8 * 1024)
225 #define CONFIG_ENV_IS_IN_MMC
226 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
227 #define CONFIG_SYS_MMC_ENV_DEV 0
229 #define CONFIG_OF_LIBFDT
230 #define CONFIG_CMD_BOOTZ
232 #ifndef CONFIG_SYS_DCACHE_OFF
233 #define CONFIG_CMD_CACHE
236 #endif /* __CONFIG_H * */