2 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 * Configuration settings for the Freescale i.MX7ULP EVK board.
6 * SPDX-License-Identifier: GPL-2.0+
9 #ifndef __MX7ULP_EVK_CONFIG_H
10 #define __MX7ULP_EVK_CONFIG_H
12 #include <linux/sizes.h>
13 #include <asm/arch/imx-regs.h>
15 /*Uncomment it to use secure boot*/
16 /*#define CONFIG_SECURE_BOOT*/
18 #ifdef CONFIG_SECURE_BOOT
19 #ifndef CONFIG_CSF_SIZE
20 #define CONFIG_CSF_SIZE 0x4000
24 #define CONFIG_BOARD_POSTCLK_INIT
25 #define CONFIG_SYS_BOOTM_LEN 0x1000000
27 #define SRC_BASE_ADDR CMC1_RBASE
28 #define IRAM_BASE_ADDR OCRAM_0_BASE
29 #define IOMUXC_BASE_ADDR IOMUXC1_RBASE
31 #define CONFIG_BOUNCE_BUFFER
32 #define CONFIG_FSL_ESDHC
33 #define CONFIG_FSL_USDHC
34 #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
36 #define CONFIG_SYS_FSL_USDHC_NUM 1
38 #define CONFIG_SYS_FSL_ESDHC_ADDR 0
39 #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
40 #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
41 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
42 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
44 #define CONFIG_ENV_OFFSET (12 * SZ_64K)
45 #define CONFIG_ENV_IS_IN_MMC
46 #define CONFIG_ENV_SIZE SZ_8K
48 /* Using ULP WDOG for reset */
49 #define WDOG_BASE_ADDR WDG1_RBASE
51 #define CONFIG_SYS_ARCH_TIMER
52 #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
54 #define CONFIG_INITRD_TAG
55 #define CONFIG_CMDLINE_TAG
56 #define CONFIG_SETUP_MEMORY_TAGS
57 /*#define CONFIG_REVISION_TAG*/
59 /* Size of malloc() pool */
60 #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
62 #define CONFIG_BOARD_EARLY_INIT_F
65 #define LPUART_BASE LPUART4_RBASE
67 /* allow to overwrite serial and ethaddr */
68 #define CONFIG_ENV_OVERWRITE
69 #define CONFIG_CONS_INDEX 1
70 #define CONFIG_BAUDRATE 115200
72 #undef CONFIG_CMD_IMLS
73 #define CONFIG_SYS_LONGHELP
74 #define CONFIG_AUTO_COMPLETE
76 #define CONFIG_SYS_CACHELINE_SIZE 64
78 /* Miscellaneous configurable options */
79 #define CONFIG_SYS_PROMPT "=> "
80 #define CONFIG_SYS_CBSIZE 512
82 /* Print Buffer Size */
83 #define CONFIG_SYS_MAXARGS 256
84 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
85 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
87 #define CONFIG_CMDLINE_EDITING
89 /* Physical Memory Map */
90 #define CONFIG_NR_DRAM_BANKS 1
92 #define CONFIG_SYS_TEXT_BASE 0x67800000
93 #define PHYS_SDRAM 0x60000000
94 #define PHYS_SDRAM_SIZE SZ_1G
95 #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
96 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
97 #define CONFIG_CMD_BOOTZ
99 #define CONFIG_LOADADDR 0x60800000
101 #define CONFIG_CMD_MEMTEST
102 #define CONFIG_SYS_MEMTEST_END 0x9E000000
104 #define CONFIG_EXTRA_ENV_SETTINGS \
105 "script=boot.scr\0" \
108 "fdt_high=0xffffffff\0" \
109 "initrd_high=0xffffffff\0" \
110 "fdt_file=imx7ulp-evk.dtb\0" \
111 "fdt_addr=0x63000000\0" \
113 "earlycon=lpuart32,0x402D0010\0" \
115 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
116 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
117 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
118 "mmcautodetect=yes\0" \
119 "mmcargs=setenv bootargs console=${console},${baudrate} " \
120 "root=${mmcroot}\0" \
122 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
123 "bootscript=echo Running bootscript from mmc ...; " \
125 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
126 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
127 "mmcboot=echo Booting from mmc ...; " \
129 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
130 "if run loadfdt; then " \
131 "bootz ${loadaddr} - ${fdt_addr}; " \
133 "if test ${boot_fdt} = try; then " \
136 "echo WARN: Cannot load the DT; " \
142 "netargs=setenv bootargs console=${console},${baudrate} " \
144 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
145 "netboot=echo Booting from net ...; " \
147 "if test ${ip_dyn} = yes; then " \
148 "setenv get_cmd dhcp; " \
150 "setenv get_cmd tftp; " \
153 "${get_cmd} ${image}; " \
154 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
155 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
156 "bootz ${loadaddr} - ${fdt_addr}; " \
158 "if test ${boot_fdt} = try; then " \
161 "echo WARN: Cannot load the DT; " \
168 #define CONFIG_BOOTCOMMAND \
169 "mmc dev ${mmcdev}; if mmc rescan; then " \
170 "if run loadbootscript; then " \
173 "if run loadimage; then " \
179 #define CONFIG_SYS_HZ 1000
180 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
182 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
183 #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
185 #define CONFIG_SYS_INIT_SP_OFFSET \
186 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
187 #define CONFIG_SYS_INIT_SP_ADDR \
188 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
190 #ifndef CONFIG_SYS_DCACHE_OFF
191 #define CONFIG_CMD_CACHE
194 #endif /* __CONFIG_H */