1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
5 * Configuration settings for the Freescale i.MX7ULP EVK board.
8 #ifndef __MX7ULP_EVK_CONFIG_H
9 #define __MX7ULP_EVK_CONFIG_H
11 #include <linux/sizes.h>
12 #include <asm/arch/imx-regs.h>
14 #define CONFIG_BOARD_POSTCLK_INIT
15 #define CONFIG_SYS_BOOTM_LEN 0x1000000
17 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
18 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1
20 /* Using ULP WDOG for reset */
21 #define WDOG_BASE_ADDR WDG1_RBASE
23 #define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
25 #define CONFIG_INITRD_TAG
26 #define CONFIG_CMDLINE_TAG
27 #define CONFIG_SETUP_MEMORY_TAGS
28 /*#define CONFIG_REVISION_TAG*/
30 /* Size of malloc() pool */
31 #define CONFIG_SYS_MALLOC_LEN (8 * SZ_1M)
34 #define LPUART_BASE LPUART4_RBASE
36 #define CONFIG_SYS_CACHELINE_SIZE 64
38 /* Miscellaneous configurable options */
39 #define CONFIG_SYS_PROMPT "=> "
40 #define CONFIG_SYS_CBSIZE 512
42 #define CONFIG_SYS_MAXARGS 256
44 /* Physical Memory Map */
46 #define PHYS_SDRAM 0x60000000
47 #define PHYS_SDRAM_SIZE SZ_1G
48 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
50 #define CONFIG_LOADADDR 0x60800000
52 #define CONFIG_EXTRA_ENV_SETTINGS \
56 "fdt_high=0xffffffff\0" \
57 "initrd_high=0xffffffff\0" \
58 "fdt_file=imx7ulp-evk.dtb\0" \
59 "fdt_addr=0x63000000\0" \
61 "earlycon=lpuart32,0x402D0010\0" \
63 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
64 "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
65 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
66 "mmcautodetect=yes\0" \
67 "mmcargs=setenv bootargs console=${console},${baudrate} " \
70 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
71 "bootscript=echo Running bootscript from mmc ...; " \
73 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
74 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
75 "mmcboot=echo Booting from mmc ...; " \
77 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
78 "if run loadfdt; then " \
79 "bootz ${loadaddr} - ${fdt_addr}; " \
81 "if test ${boot_fdt} = try; then " \
84 "echo WARN: Cannot load the DT; " \
90 "netargs=setenv bootargs console=${console},${baudrate} " \
92 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
93 "netboot=echo Booting from net ...; " \
95 "if test ${ip_dyn} = yes; then " \
96 "setenv get_cmd dhcp; " \
98 "setenv get_cmd tftp; " \
101 "${get_cmd} ${image}; " \
102 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
103 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
104 "bootz ${loadaddr} - ${fdt_addr}; " \
106 "if test ${boot_fdt} = try; then " \
109 "echo WARN: Cannot load the DT; " \
116 #define CONFIG_BOOTCOMMAND \
117 "mmc dev ${mmcdev}; if mmc rescan; then " \
118 "if run loadbootscript; then " \
121 "if run loadimage; then " \
127 #define CONFIG_SYS_HZ 1000
128 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
130 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
131 #define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
133 #define CONFIG_SYS_INIT_SP_OFFSET \
134 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
135 #define CONFIG_SYS_INIT_SP_ADDR \
136 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
138 #endif /* __CONFIG_H */