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 /* Size of malloc() pool */
30 #define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
32 #define CONFIG_BOARD_EARLY_INIT_F
33 #define CONFIG_MXC_GPIO
35 #define CONFIG_MXC_UART
36 #define CONFIG_MXC_UART_BASE UART2_BASE
40 #define CONFIG_CMD_SATA
41 #ifdef CONFIG_CMD_SATA
42 #define CONFIG_DWC_AHSATA
43 #define CONFIG_SYS_SATA_MAX_DEVICE 1
44 #define CONFIG_DWC_AHSATA_PORT_ID 0
45 #define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
52 #define CONFIG_CMD_PING
53 #define CONFIG_CMD_DHCP
54 #define CONFIG_CMD_MII
55 #define CONFIG_CMD_NET
56 #define CONFIG_FEC_MXC
58 #define IMX_FEC_BASE ENET_BASE_ADDR
59 #define CONFIG_FEC_XCV_TYPE RGMII
60 #define CONFIG_ETHPRIME "FEC"
61 #define CONFIG_FEC_MXC_PHYADDR 6
63 #define CONFIG_PHY_MICREL
64 #define CONFIG_PHY_MICREL_KSZ9031
66 /* allow to overwrite serial and ethaddr */
67 #define CONFIG_ENV_OVERWRITE
68 #define CONFIG_CONS_INDEX 1
69 #define CONFIG_BAUDRATE 115200
71 /* Command definition */
72 #include <config_cmd_default.h>
74 #undef CONFIG_CMD_IMLS
76 #define CONFIG_CMD_BMODE
77 #define CONFIG_CMD_SETEXPR
79 #define CONFIG_BOOTDELAY 3
81 #define CONFIG_SYS_MEMTEST_START 0x10000000
82 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
83 #define CONFIG_LOADADDR 0x12000000
84 #define CONFIG_SYS_TEXT_BASE 0x17800000
86 /* MMC Configuration */
87 #define CONFIG_FSL_ESDHC
88 #define CONFIG_FSL_USDHC
89 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
92 #define CONFIG_CMD_MMC
93 #define CONFIG_GENERIC_MMC
94 #define CONFIG_BOUNCE_BUFFER
95 #define CONFIG_CMD_EXT2
96 #define CONFIG_CMD_FAT
97 #define CONFIG_DOS_PARTITION
99 #define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
101 #define CONFIG_EXTRA_ENV_SETTINGS \
102 "script=boot.scr\0" \
104 "console=ttymxc1\0" \
106 "fdt_high=0xffffffff\0" \
107 "initrd_high=0xffffffff\0" \
108 "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
109 "fdt_addr=0x18000000\0" \
114 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
115 "update_sd_firmware_filename=u-boot.imx\0" \
116 "update_sd_firmware=" \
117 "if test ${ip_dyn} = yes; then " \
118 "setenv get_cmd dhcp; " \
120 "setenv get_cmd tftp; " \
122 "if mmc dev ${mmcdev}; then " \
123 "if ${get_cmd} ${update_sd_firmware_filename}; then " \
124 "setexpr fw_sz ${filesize} / 0x200; " \
125 "setexpr fw_sz ${fw_sz} + 1; " \
126 "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
129 "mmcargs=setenv bootargs console=${console},${baudrate} " \
130 "root=${mmcroot}\0" \
132 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
133 "bootscript=echo Running bootscript from mmc ...; " \
135 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
136 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
137 "mmcboot=echo Booting from mmc ...; " \
139 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
140 "if run loadfdt; then " \
141 "bootz ${loadaddr} - ${fdt_addr}; " \
143 "if test ${boot_fdt} = try; then " \
146 "echo WARN: Cannot load the DT; " \
152 "netargs=setenv bootargs console=${console},${baudrate} " \
154 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
155 "netboot=echo Booting from net ...; " \
157 "if test ${ip_dyn} = yes; then " \
158 "setenv get_cmd dhcp; " \
160 "setenv get_cmd tftp; " \
162 "${get_cmd} ${image}; " \
163 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
164 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
165 "bootz ${loadaddr} - ${fdt_addr}; " \
167 "if test ${boot_fdt} = try; then " \
170 "echo WARN: Cannot load the DT; " \
177 #define CONFIG_BOOTCOMMAND \
178 "mmc dev ${mmcdev}; if mmc rescan; then " \
179 "if run loadbootscript; then " \
182 "if run loadimage; then " \
184 "else run netboot; " \
187 "else run netboot; fi"
189 /* Miscellaneous configurable options */
190 #define CONFIG_SYS_LONGHELP
191 #define CONFIG_SYS_HUSH_PARSER
192 #define CONFIG_SYS_PROMPT "=> "
193 #define CONFIG_AUTO_COMPLETE
194 #define CONFIG_SYS_CBSIZE 256
196 /* Print Buffer Size */
197 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
198 #define CONFIG_SYS_MAXARGS 16
199 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
201 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
203 #define CONFIG_CMDLINE_EDITING
205 /* Physical Memory Map */
206 #define CONFIG_NR_DRAM_BANKS 1
207 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
209 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
210 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
211 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
213 #define CONFIG_SYS_INIT_SP_OFFSET \
214 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
215 #define CONFIG_SYS_INIT_SP_ADDR \
216 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
218 /* FLASH and environment organization */
219 #define CONFIG_SYS_NO_FLASH
221 #define CONFIG_ENV_SIZE (8 * 1024)
223 #define CONFIG_ENV_IS_IN_MMC
224 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
225 #define CONFIG_SYS_MMC_ENV_DEV 0
227 #define CONFIG_OF_LIBFDT
228 #define CONFIG_CMD_BOOTZ
230 #ifndef CONFIG_SYS_DCACHE_OFF
231 #define CONFIG_CMD_CACHE
234 #endif /* __CONFIG_H * */