blob: c1b379bdeaf34098b8654cf677d4cd9c26c2d330 [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
Peng Fan77fa0452017-02-22 16:21:56 +080014#define CONFIG_BOARD_POSTCLK_INIT
15#define CONFIG_SYS_BOOTM_LEN 0x1000000
16
Peng Fan04cb0d32017-02-22 16:21:57 +080017#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
18#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
19#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
20#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
21
Peng Fan77fa0452017-02-22 16:21:56 +080022/* Using ULP WDOG for reset */
23#define WDOG_BASE_ADDR WDG1_RBASE
24
Peng Fan77fa0452017-02-22 16:21:56 +080025#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
26
27#define CONFIG_INITRD_TAG
28#define CONFIG_CMDLINE_TAG
29#define CONFIG_SETUP_MEMORY_TAGS
30/*#define CONFIG_REVISION_TAG*/
31
32/* Size of malloc() pool */
33#define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
34
35#define CONFIG_BOARD_EARLY_INIT_F
36
37/* UART */
38#define LPUART_BASE LPUART4_RBASE
39
40/* allow to overwrite serial and ethaddr */
41#define CONFIG_ENV_OVERWRITE
Peng Fan77fa0452017-02-22 16:21:56 +080042#define CONFIG_BAUDRATE 115200
43
Peng Fan77fa0452017-02-22 16:21:56 +080044#define CONFIG_SYS_CACHELINE_SIZE 64
45
46/* Miscellaneous configurable options */
47#define CONFIG_SYS_PROMPT "=> "
48#define CONFIG_SYS_CBSIZE 512
49
Peng Fan77fa0452017-02-22 16:21:56 +080050#define CONFIG_SYS_MAXARGS 256
Peng Fan77fa0452017-02-22 16:21:56 +080051
Peng Fan77fa0452017-02-22 16:21:56 +080052/* Physical Memory Map */
Peng Fan77fa0452017-02-22 16:21:56 +080053
Peng Fan77fa0452017-02-22 16:21:56 +080054#define PHYS_SDRAM 0x60000000
55#define PHYS_SDRAM_SIZE SZ_1G
56#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
57#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fan77fa0452017-02-22 16:21:56 +080058
59#define CONFIG_LOADADDR 0x60800000
60
Peng Fan77fa0452017-02-22 16:21:56 +080061#define CONFIG_SYS_MEMTEST_END 0x9E000000
62
Peng Fan04cb0d32017-02-22 16:21:57 +080063#define CONFIG_EXTRA_ENV_SETTINGS \
64 "script=boot.scr\0" \
65 "image=zImage\0" \
66 "console=ttyLP0\0" \
67 "fdt_high=0xffffffff\0" \
68 "initrd_high=0xffffffff\0" \
69 "fdt_file=imx7ulp-evk.dtb\0" \
70 "fdt_addr=0x63000000\0" \
71 "boot_fdt=try\0" \
72 "earlycon=lpuart32,0x402D0010\0" \
73 "ip_dyn=yes\0" \
74 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
75 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
76 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
77 "mmcautodetect=yes\0" \
78 "mmcargs=setenv bootargs console=${console},${baudrate} " \
79 "root=${mmcroot}\0" \
80 "loadbootscript=" \
81 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
82 "bootscript=echo Running bootscript from mmc ...; " \
83 "source\0" \
84 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
85 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
86 "mmcboot=echo Booting from mmc ...; " \
87 "run mmcargs; " \
88 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
89 "if run loadfdt; then " \
90 "bootz ${loadaddr} - ${fdt_addr}; " \
91 "else " \
92 "if test ${boot_fdt} = try; then " \
93 "bootz; " \
94 "else " \
95 "echo WARN: Cannot load the DT; " \
96 "fi; " \
97 "fi; " \
98 "else " \
99 "bootz; " \
100 "fi;\0" \
101 "netargs=setenv bootargs console=${console},${baudrate} " \
102 "root=/dev/nfs " \
103 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
104 "netboot=echo Booting from net ...; " \
105 "run netargs; " \
106 "if test ${ip_dyn} = yes; then " \
107 "setenv get_cmd dhcp; " \
108 "else " \
109 "setenv get_cmd tftp; " \
110 "fi; " \
111 "usb start; "\
112 "${get_cmd} ${image}; " \
113 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
114 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
115 "bootz ${loadaddr} - ${fdt_addr}; " \
116 "else " \
117 "if test ${boot_fdt} = try; then " \
118 "bootz; " \
119 "else " \
120 "echo WARN: Cannot load the DT; " \
121 "fi; " \
122 "fi; " \
123 "else " \
124 "bootz; " \
125 "fi;\0" \
126
127#define CONFIG_BOOTCOMMAND \
128 "mmc dev ${mmcdev}; if mmc rescan; then " \
129 "if run loadbootscript; then " \
130 "run bootscript; " \
131 "else " \
132 "if run loadimage; then " \
133 "run mmcboot; " \
134 "fi; " \
135 "fi; " \
136 "fi"
137
Peng Fan77fa0452017-02-22 16:21:56 +0800138#define CONFIG_SYS_HZ 1000
139#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
140
141#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
142#define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
143
144#define CONFIG_SYS_INIT_SP_OFFSET \
145 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
146#define CONFIG_SYS_INIT_SP_ADDR \
147 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
148
Trevor Woerner10015022019-05-03 09:41:00 -0400149#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
Peng Fan77fa0452017-02-22 16:21:56 +0800150#define CONFIG_CMD_CACHE
151#endif
152
153#endif /* __CONFIG_H */