d9cf466b0daa2887caf5bb693fd7e231b03ca39b
[platform/kernel/u-boot.git] / include / configs / imx8mn_var_som.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2021 Collabora Ltd.
4  */
5
6 #ifndef __IMX8MN_VAR_SOM_H
7 #define __IMX8MN_VAR_SOM_H
8
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include <asm/arch/imx-regs.h>
12
13 #define CONFIG_SYS_BOOTM_LEN            (32 * SZ_1M)
14
15 #define CONFIG_SYS_MONITOR_LEN          SZ_512K
16 #define CONFIG_SYS_UBOOT_BASE   \
17         (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
18
19 #define CONFIG_SYS_SPL_MALLOC_START     0x42200000
20 #define CONFIG_SYS_SPL_MALLOC_SIZE      SZ_512K
21
22 #define BOOT_TARGET_DEVICES(func) \
23         func(MMC, mmc, 1) \
24         func(MMC, mmc, 2) \
25         func(MMC, mmc, 0) \
26         func(PXE, pxe, na) \
27         func(DHCP, dhcp, na) \
28
29 #include <config_distro_bootcmd.h>
30
31 #define MEM_LAYOUT_ENV_SETTINGS \
32         "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
33         "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
34         "ramdisk_addr_r=0x43800000\0" \
35         "fdt_addr_r=0x43000000\0" \
36         "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
37         "fastboot_partition_alias_all=" \
38                 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".0:0\0" \
39         "fastboot_partition_alias_bootloader=" \
40                 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".1:0\0" \
41         "emmc_dev=" __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) "\0" \
42         "emmc_ack=1\0" \
43         "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
44
45 /* Initial environment variables */
46 #define CONFIG_EXTRA_ENV_SETTINGS \
47         MEM_LAYOUT_ENV_SETTINGS \
48         BOOTENV
49
50 /* Link Definitions */
51
52 #define CONFIG_SYS_INIT_RAM_ADDR        0x40000000
53 #define CONFIG_SYS_INIT_RAM_SIZE        SZ_512K
54
55 #define CONFIG_SYS_SDRAM_BASE           0x40000000
56 #define PHYS_SDRAM                      0x40000000
57 #define PHYS_SDRAM_SIZE                 SZ_1G /* 1GB DDR */
58
59 #define CONFIG_MXC_UART_BASE            UART_BASE_ADDR(4)
60
61 /* USDHC */
62 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
63
64 #endif /* __IMX8MN_VAR_SOM_H */