Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
[platform/kernel/u-boot.git] / include / configs / imx8mm_icore_mx8mm.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2020 Engicam srl
4  * Copyright (c) 2020 Amarula Solutions(India)
5  */
6
7 #ifndef __IMX8MM_ICORE_MX8MM_H
8 #define __IMX8MM_ICORE_MX8MM_H
9
10 #include <linux/sizes.h>
11 #include <asm/arch/imx-regs.h>
12
13 #define CONFIG_SYS_MONITOR_LEN          SZ_512K
14 #define CONFIG_SYS_UBOOT_BASE \
15         (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
16
17 #ifdef CONFIG_SPL_BUILD
18 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
19 # define CONFIG_MALLOC_F_ADDR           0x930000
20 /* For RAW image gives a error info not panic */
21 #endif /* CONFIG_SPL_BUILD */
22
23 #ifndef CONFIG_SPL_BUILD
24 #define BOOT_TARGET_DEVICES(func) \
25         func(MMC, mmc, 2) \
26         func(MMC, mmc, 0)
27 #include <config_distro_bootcmd.h>
28 #else
29 #define BOOTENV
30 #endif
31
32 #define ENV_MEM_LAYOUT_SETTINGS \
33         "fdt_addr_r=0x44000000\0" \
34         "kernel_addr_r=0x42000000\0" \
35         "ramdisk_addr_r=0x46400000\0" \
36         "scriptaddr=0x46000000\0"
37
38 #define CONFIG_EXTRA_ENV_SETTINGS \
39         ENV_MEM_LAYOUT_SETTINGS \
40         "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
41         "console=ttymxc1,115200\0" \
42         BOOTENV
43
44 /* Link Definitions */
45
46 #define CONFIG_SYS_INIT_RAM_ADDR        0x40000000
47 #define CONFIG_SYS_INIT_RAM_SIZE        SZ_2M
48
49 #define CONFIG_SYS_SDRAM_BASE           0x40000000
50
51 /* SDRAM configuration */
52 #define PHYS_SDRAM                      0x40000000
53 #define PHYS_SDRAM_SIZE                 SZ_2G /* 2GB DDR */
54 #define CONFIG_SYS_BOOTM_LEN            SZ_256M
55
56 /* USDHC */
57 #define CONFIG_SYS_FSL_USDHC_NUM        2
58 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
59
60 #endif /* __IMX8MM_ICORE_MX8MM_H */