blob: 6ab8db36a85ebd8fc69983d56bd36e4beb563311 [file] [log] [blame]
Peng Fan77fa0452017-02-22 16:21:56 +08001/*
2 * Copyright (C) 2016 Freescale Semiconductor, Inc.
3 *
4 * Configuration settings for the Freescale i.MX7ULP EVK board.
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef __MX7ULP_EVK_CONFIG_H
10#define __MX7ULP_EVK_CONFIG_H
11
12#include <linux/sizes.h>
13#include <asm/arch/imx-regs.h>
14
15/*Uncomment it to use secure boot*/
16/*#define CONFIG_SECURE_BOOT*/
17
18#ifdef CONFIG_SECURE_BOOT
19#ifndef CONFIG_CSF_SIZE
20#define CONFIG_CSF_SIZE 0x4000
21#endif
22#endif
23
24#define CONFIG_BOARD_POSTCLK_INIT
25#define CONFIG_SYS_BOOTM_LEN 0x1000000
26
27#define SRC_BASE_ADDR CMC1_RBASE
28#define IRAM_BASE_ADDR OCRAM_0_BASE
29#define IOMUXC_BASE_ADDR IOMUXC1_RBASE
30
Peng Fan04cb0d32017-02-22 16:21:57 +080031#define CONFIG_BOUNCE_BUFFER
32#define CONFIG_FSL_ESDHC
33#define CONFIG_FSL_USDHC
34#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
35
36#define CONFIG_SYS_FSL_USDHC_NUM 1
37
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
43
44#define CONFIG_ENV_OFFSET (12 * SZ_64K)
Peng Fan77fa0452017-02-22 16:21:56 +080045#define CONFIG_ENV_SIZE SZ_8K
46
Peng Fan77fa0452017-02-22 16:21:56 +080047/* Using ULP WDOG for reset */
48#define WDOG_BASE_ADDR WDG1_RBASE
49
50#define CONFIG_SYS_ARCH_TIMER
51#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
52
53#define CONFIG_INITRD_TAG
54#define CONFIG_CMDLINE_TAG
55#define CONFIG_SETUP_MEMORY_TAGS
56/*#define CONFIG_REVISION_TAG*/
57
58/* Size of malloc() pool */
59#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
60
61#define CONFIG_BOARD_EARLY_INIT_F
62
63/* UART */
64#define LPUART_BASE LPUART4_RBASE
65
66/* allow to overwrite serial and ethaddr */
67#define CONFIG_ENV_OVERWRITE
68#define CONFIG_CONS_INDEX 1
69#define CONFIG_BAUDRATE 115200
70
Peng Fan77fa0452017-02-22 16:21:56 +080071#define CONFIG_SYS_LONGHELP
72#define CONFIG_AUTO_COMPLETE
73
74#define CONFIG_SYS_CACHELINE_SIZE 64
75
76/* Miscellaneous configurable options */
77#define CONFIG_SYS_PROMPT "=> "
78#define CONFIG_SYS_CBSIZE 512
79
Peng Fan77fa0452017-02-22 16:21:56 +080080#define CONFIG_SYS_MAXARGS 256
Peng Fan77fa0452017-02-22 16:21:56 +080081
82#define CONFIG_CMDLINE_EDITING
Peng Fan77fa0452017-02-22 16:21:56 +080083
84/* Physical Memory Map */
85#define CONFIG_NR_DRAM_BANKS 1
86
87#define CONFIG_SYS_TEXT_BASE 0x67800000
88#define PHYS_SDRAM 0x60000000
89#define PHYS_SDRAM_SIZE SZ_1G
90#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
91#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fan77fa0452017-02-22 16:21:56 +080092
93#define CONFIG_LOADADDR 0x60800000
94
95#define CONFIG_CMD_MEMTEST
96#define CONFIG_SYS_MEMTEST_END 0x9E000000
97
Peng Fan04cb0d32017-02-22 16:21:57 +080098#define CONFIG_EXTRA_ENV_SETTINGS \
99 "script=boot.scr\0" \
100 "image=zImage\0" \
101 "console=ttyLP0\0" \
102 "fdt_high=0xffffffff\0" \
103 "initrd_high=0xffffffff\0" \
104 "fdt_file=imx7ulp-evk.dtb\0" \
105 "fdt_addr=0x63000000\0" \
106 "boot_fdt=try\0" \
107 "earlycon=lpuart32,0x402D0010\0" \
108 "ip_dyn=yes\0" \
109 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
110 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
111 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
112 "mmcautodetect=yes\0" \
113 "mmcargs=setenv bootargs console=${console},${baudrate} " \
114 "root=${mmcroot}\0" \
115 "loadbootscript=" \
116 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
117 "bootscript=echo Running bootscript from mmc ...; " \
118 "source\0" \
119 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
120 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
121 "mmcboot=echo Booting from mmc ...; " \
122 "run mmcargs; " \
123 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
124 "if run loadfdt; then " \
125 "bootz ${loadaddr} - ${fdt_addr}; " \
126 "else " \
127 "if test ${boot_fdt} = try; then " \
128 "bootz; " \
129 "else " \
130 "echo WARN: Cannot load the DT; " \
131 "fi; " \
132 "fi; " \
133 "else " \
134 "bootz; " \
135 "fi;\0" \
136 "netargs=setenv bootargs console=${console},${baudrate} " \
137 "root=/dev/nfs " \
138 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
139 "netboot=echo Booting from net ...; " \
140 "run netargs; " \
141 "if test ${ip_dyn} = yes; then " \
142 "setenv get_cmd dhcp; " \
143 "else " \
144 "setenv get_cmd tftp; " \
145 "fi; " \
146 "usb start; "\
147 "${get_cmd} ${image}; " \
148 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
149 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
150 "bootz ${loadaddr} - ${fdt_addr}; " \
151 "else " \
152 "if test ${boot_fdt} = try; then " \
153 "bootz; " \
154 "else " \
155 "echo WARN: Cannot load the DT; " \
156 "fi; " \
157 "fi; " \
158 "else " \
159 "bootz; " \
160 "fi;\0" \
161
162#define CONFIG_BOOTCOMMAND \
163 "mmc dev ${mmcdev}; if mmc rescan; then " \
164 "if run loadbootscript; then " \
165 "run bootscript; " \
166 "else " \
167 "if run loadimage; then " \
168 "run mmcboot; " \
169 "fi; " \
170 "fi; " \
171 "fi"
172
Peng Fan77fa0452017-02-22 16:21:56 +0800173#define CONFIG_SYS_HZ 1000
174#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
175
176#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
177#define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
178
179#define CONFIG_SYS_INIT_SP_OFFSET \
180 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
181#define CONFIG_SYS_INIT_SP_ADDR \
182 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
183
184#ifndef CONFIG_SYS_DCACHE_OFF
185#define CONFIG_CMD_CACHE
186#endif
187
188#endif /* __CONFIG_H */