blob: c8604e0de592f5e93d06c085dc1a3b9984ad7fb9 [file] [log] [blame]
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -03001/* 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
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030013#define CONFIG_SYS_MONITOR_LEN SZ_512K
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030014#define CONFIG_SYS_UBOOT_BASE \
15 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
16
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030017#define BOOT_TARGET_DEVICES(func) \
18 func(MMC, mmc, 1) \
19 func(MMC, mmc, 2) \
20 func(MMC, mmc, 0) \
21 func(PXE, pxe, na) \
22 func(DHCP, dhcp, na) \
23
24#include <config_distro_bootcmd.h>
25
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030026#define MEM_LAYOUT_ENV_SETTINGS \
27 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
28 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
29 "ramdisk_addr_r=0x43800000\0" \
30 "fdt_addr_r=0x43000000\0" \
31 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
32 "fastboot_partition_alias_all=" \
33 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".0:0\0" \
34 "fastboot_partition_alias_bootloader=" \
35 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".1:0\0" \
36 "emmc_dev=" __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) "\0" \
37 "emmc_ack=1\0" \
38 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
39
40/* Initial environment variables */
41#define CONFIG_EXTRA_ENV_SETTINGS \
42 MEM_LAYOUT_ENV_SETTINGS \
43 BOOTENV
44
45/* Link Definitions */
46
47#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
48#define CONFIG_SYS_INIT_RAM_SIZE SZ_512K
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030049
50#define CONFIG_SYS_SDRAM_BASE 0x40000000
51#define PHYS_SDRAM 0x40000000
52#define PHYS_SDRAM_SIZE SZ_1G /* 1GB DDR */
53
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030054/* USDHC */
55#define CONFIG_SYS_FSL_ESDHC_ADDR 0
56
Ariel D'Alessandroc4c1ed62021-11-23 13:33:30 -030057#endif /* __IMX8MN_VAR_SOM_H */