blob: c2223bd858d6fe248614b7493a4ec084468633a9 [file] [log] [blame]
Peng Fanf7765d72017-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 Fan8e861112017-02-22 16:21:57 +080031#define CONFIG_BOUNCE_BUFFER
Peng Fan8e861112017-02-22 16:21:57 +080032#define CONFIG_FSL_USDHC
33#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
34
35#define CONFIG_SYS_FSL_USDHC_NUM 1
36
37#define CONFIG_SYS_FSL_ESDHC_ADDR 0
38#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
39#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
40#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
41#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
42
43#define CONFIG_ENV_OFFSET (12 * SZ_64K)
Peng Fanf7765d72017-02-22 16:21:56 +080044#define CONFIG_ENV_SIZE SZ_8K
45
Peng Fanf7765d72017-02-22 16:21:56 +080046/* Using ULP WDOG for reset */
47#define WDOG_BASE_ADDR WDG1_RBASE
48
49#define CONFIG_SYS_ARCH_TIMER
50#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
51
52#define CONFIG_INITRD_TAG
53#define CONFIG_CMDLINE_TAG
54#define CONFIG_SETUP_MEMORY_TAGS
55/*#define CONFIG_REVISION_TAG*/
56
57/* Size of malloc() pool */
58#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
59
60#define CONFIG_BOARD_EARLY_INIT_F
61
62/* UART */
63#define LPUART_BASE LPUART4_RBASE
64
65/* allow to overwrite serial and ethaddr */
66#define CONFIG_ENV_OVERWRITE
Peng Fanf7765d72017-02-22 16:21:56 +080067#define CONFIG_BAUDRATE 115200
68
Peng Fanf7765d72017-02-22 16:21:56 +080069#define CONFIG_SYS_CACHELINE_SIZE 64
70
71/* Miscellaneous configurable options */
72#define CONFIG_SYS_PROMPT "=> "
73#define CONFIG_SYS_CBSIZE 512
74
Peng Fanf7765d72017-02-22 16:21:56 +080075#define CONFIG_SYS_MAXARGS 256
Peng Fanf7765d72017-02-22 16:21:56 +080076
Peng Fanf7765d72017-02-22 16:21:56 +080077/* Physical Memory Map */
78#define CONFIG_NR_DRAM_BANKS 1
79
Peng Fanf7765d72017-02-22 16:21:56 +080080#define PHYS_SDRAM 0x60000000
81#define PHYS_SDRAM_SIZE SZ_1G
82#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
83#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fanf7765d72017-02-22 16:21:56 +080084
85#define CONFIG_LOADADDR 0x60800000
86
Peng Fanf7765d72017-02-22 16:21:56 +080087#define CONFIG_SYS_MEMTEST_END 0x9E000000
88
Peng Fan8e861112017-02-22 16:21:57 +080089#define CONFIG_EXTRA_ENV_SETTINGS \
90 "script=boot.scr\0" \
91 "image=zImage\0" \
92 "console=ttyLP0\0" \
93 "fdt_high=0xffffffff\0" \
94 "initrd_high=0xffffffff\0" \
95 "fdt_file=imx7ulp-evk.dtb\0" \
96 "fdt_addr=0x63000000\0" \
97 "boot_fdt=try\0" \
98 "earlycon=lpuart32,0x402D0010\0" \
99 "ip_dyn=yes\0" \
100 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
101 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
102 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
103 "mmcautodetect=yes\0" \
104 "mmcargs=setenv bootargs console=${console},${baudrate} " \
105 "root=${mmcroot}\0" \
106 "loadbootscript=" \
107 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
108 "bootscript=echo Running bootscript from mmc ...; " \
109 "source\0" \
110 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
111 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
112 "mmcboot=echo Booting from mmc ...; " \
113 "run mmcargs; " \
114 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
115 "if run loadfdt; then " \
116 "bootz ${loadaddr} - ${fdt_addr}; " \
117 "else " \
118 "if test ${boot_fdt} = try; then " \
119 "bootz; " \
120 "else " \
121 "echo WARN: Cannot load the DT; " \
122 "fi; " \
123 "fi; " \
124 "else " \
125 "bootz; " \
126 "fi;\0" \
127 "netargs=setenv bootargs console=${console},${baudrate} " \
128 "root=/dev/nfs " \
129 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
130 "netboot=echo Booting from net ...; " \
131 "run netargs; " \
132 "if test ${ip_dyn} = yes; then " \
133 "setenv get_cmd dhcp; " \
134 "else " \
135 "setenv get_cmd tftp; " \
136 "fi; " \
137 "usb start; "\
138 "${get_cmd} ${image}; " \
139 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
140 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
141 "bootz ${loadaddr} - ${fdt_addr}; " \
142 "else " \
143 "if test ${boot_fdt} = try; then " \
144 "bootz; " \
145 "else " \
146 "echo WARN: Cannot load the DT; " \
147 "fi; " \
148 "fi; " \
149 "else " \
150 "bootz; " \
151 "fi;\0" \
152
153#define CONFIG_BOOTCOMMAND \
154 "mmc dev ${mmcdev}; if mmc rescan; then " \
155 "if run loadbootscript; then " \
156 "run bootscript; " \
157 "else " \
158 "if run loadimage; then " \
159 "run mmcboot; " \
160 "fi; " \
161 "fi; " \
162 "fi"
163
Peng Fanf7765d72017-02-22 16:21:56 +0800164#define CONFIG_SYS_HZ 1000
165#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
166
167#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
168#define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
169
170#define CONFIG_SYS_INIT_SP_OFFSET \
171 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
172#define CONFIG_SYS_INIT_SP_ADDR \
173 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
174
175#ifndef CONFIG_SYS_DCACHE_OFF
176#define CONFIG_CMD_CACHE
177#endif
178
179#endif /* __CONFIG_H */