]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
77fa0457 PF |
2 | /* |
3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. | |
4 | * | |
5 | * Configuration settings for the Freescale i.MX7ULP EVK board. | |
77fa0457 PF |
6 | */ |
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 | ||
04cb0d3e PF |
30 | #define CONFIG_SYS_FSL_USDHC_NUM 1 |
31 | ||
32 | #define CONFIG_SYS_FSL_ESDHC_ADDR 0 | |
33 | #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */ | |
34 | #define CONFIG_SYS_MMC_ENV_PART 0 /* user area */ | |
35 | #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */ | |
36 | #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 | |
37 | ||
38 | #define CONFIG_ENV_OFFSET (12 * SZ_64K) | |
77fa0457 PF |
39 | #define CONFIG_ENV_SIZE SZ_8K |
40 | ||
77fa0457 PF |
41 | /* Using ULP WDOG for reset */ |
42 | #define WDOG_BASE_ADDR WDG1_RBASE | |
43 | ||
77fa0457 PF |
44 | #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */ |
45 | ||
46 | #define CONFIG_INITRD_TAG | |
47 | #define CONFIG_CMDLINE_TAG | |
48 | #define CONFIG_SETUP_MEMORY_TAGS | |
49 | /*#define CONFIG_REVISION_TAG*/ | |
50 | ||
51 | /* Size of malloc() pool */ | |
52 | #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M) | |
53 | ||
54 | #define CONFIG_BOARD_EARLY_INIT_F | |
55 | ||
56 | /* UART */ | |
57 | #define LPUART_BASE LPUART4_RBASE | |
58 | ||
59 | /* allow to overwrite serial and ethaddr */ | |
60 | #define CONFIG_ENV_OVERWRITE | |
77fa0457 PF |
61 | #define CONFIG_BAUDRATE 115200 |
62 | ||
77fa0457 PF |
63 | #define CONFIG_SYS_CACHELINE_SIZE 64 |
64 | ||
65 | /* Miscellaneous configurable options */ | |
66 | #define CONFIG_SYS_PROMPT "=> " | |
67 | #define CONFIG_SYS_CBSIZE 512 | |
68 | ||
77fa0457 | 69 | #define CONFIG_SYS_MAXARGS 256 |
77fa0457 | 70 | |
77fa0457 | 71 | /* Physical Memory Map */ |
77fa0457 | 72 | |
77fa0457 PF |
73 | #define PHYS_SDRAM 0x60000000 |
74 | #define PHYS_SDRAM_SIZE SZ_1G | |
75 | #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM | |
76 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM | |
77fa0457 PF |
77 | |
78 | #define CONFIG_LOADADDR 0x60800000 | |
79 | ||
77fa0457 PF |
80 | #define CONFIG_SYS_MEMTEST_END 0x9E000000 |
81 | ||
04cb0d3e PF |
82 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
83 | "script=boot.scr\0" \ | |
84 | "image=zImage\0" \ | |
85 | "console=ttyLP0\0" \ | |
86 | "fdt_high=0xffffffff\0" \ | |
87 | "initrd_high=0xffffffff\0" \ | |
88 | "fdt_file=imx7ulp-evk.dtb\0" \ | |
89 | "fdt_addr=0x63000000\0" \ | |
90 | "boot_fdt=try\0" \ | |
91 | "earlycon=lpuart32,0x402D0010\0" \ | |
92 | "ip_dyn=yes\0" \ | |
93 | "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ | |
94 | "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ | |
95 | "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ | |
96 | "mmcautodetect=yes\0" \ | |
97 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ | |
98 | "root=${mmcroot}\0" \ | |
99 | "loadbootscript=" \ | |
100 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | |
101 | "bootscript=echo Running bootscript from mmc ...; " \ | |
102 | "source\0" \ | |
103 | "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ | |
104 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | |
105 | "mmcboot=echo Booting from mmc ...; " \ | |
106 | "run mmcargs; " \ | |
107 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
108 | "if run loadfdt; then " \ | |
109 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
110 | "else " \ | |
111 | "if test ${boot_fdt} = try; then " \ | |
112 | "bootz; " \ | |
113 | "else " \ | |
114 | "echo WARN: Cannot load the DT; " \ | |
115 | "fi; " \ | |
116 | "fi; " \ | |
117 | "else " \ | |
118 | "bootz; " \ | |
119 | "fi;\0" \ | |
120 | "netargs=setenv bootargs console=${console},${baudrate} " \ | |
121 | "root=/dev/nfs " \ | |
122 | "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ | |
123 | "netboot=echo Booting from net ...; " \ | |
124 | "run netargs; " \ | |
125 | "if test ${ip_dyn} = yes; then " \ | |
126 | "setenv get_cmd dhcp; " \ | |
127 | "else " \ | |
128 | "setenv get_cmd tftp; " \ | |
129 | "fi; " \ | |
130 | "usb start; "\ | |
131 | "${get_cmd} ${image}; " \ | |
132 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | |
133 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | |
134 | "bootz ${loadaddr} - ${fdt_addr}; " \ | |
135 | "else " \ | |
136 | "if test ${boot_fdt} = try; then " \ | |
137 | "bootz; " \ | |
138 | "else " \ | |
139 | "echo WARN: Cannot load the DT; " \ | |
140 | "fi; " \ | |
141 | "fi; " \ | |
142 | "else " \ | |
143 | "bootz; " \ | |
144 | "fi;\0" \ | |
145 | ||
146 | #define CONFIG_BOOTCOMMAND \ | |
147 | "mmc dev ${mmcdev}; if mmc rescan; then " \ | |
148 | "if run loadbootscript; then " \ | |
149 | "run bootscript; " \ | |
150 | "else " \ | |
151 | "if run loadimage; then " \ | |
152 | "run mmcboot; " \ | |
153 | "fi; " \ | |
154 | "fi; " \ | |
155 | "fi" | |
156 | ||
77fa0457 PF |
157 | #define CONFIG_SYS_HZ 1000 |
158 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR | |
159 | ||
160 | #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR | |
161 | #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K | |
162 | ||
163 | #define CONFIG_SYS_INIT_SP_OFFSET \ | |
164 | (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) | |
165 | #define CONFIG_SYS_INIT_SP_ADDR \ | |
166 | (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) | |
167 | ||
10015025 | 168 | #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) |
77fa0457 PF |
169 | #define CONFIG_CMD_CACHE |
170 | #endif | |
171 | ||
172 | #endif /* __CONFIG_H */ |