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