blob: ce679098e5c2e9dec04fece8e65a12e8b3ff9a60 [file] [log] [blame]
Ariel D'Alessandrob6d5e132021-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
13#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M)
14
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030015#define CONFIG_SYS_MONITOR_LEN SZ_512K
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030016#define CONFIG_SYS_UBOOT_BASE \
17 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
18
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030019#define BOOT_TARGET_DEVICES(func) \
20 func(MMC, mmc, 1) \
21 func(MMC, mmc, 2) \
22 func(MMC, mmc, 0) \
23 func(PXE, pxe, na) \
24 func(DHCP, dhcp, na) \
25
26#include <config_distro_bootcmd.h>
27
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030028#define MEM_LAYOUT_ENV_SETTINGS \
29 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
30 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
31 "ramdisk_addr_r=0x43800000\0" \
32 "fdt_addr_r=0x43000000\0" \
33 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
34 "fastboot_partition_alias_all=" \
35 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".0:0\0" \
36 "fastboot_partition_alias_bootloader=" \
37 __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) ".1:0\0" \
38 "emmc_dev=" __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) "\0" \
39 "emmc_ack=1\0" \
40 "pxefile_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
41
42/* Initial environment variables */
43#define CONFIG_EXTRA_ENV_SETTINGS \
44 MEM_LAYOUT_ENV_SETTINGS \
45 BOOTENV
46
47/* Link Definitions */
48
49#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
50#define CONFIG_SYS_INIT_RAM_SIZE SZ_512K
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030051
52#define CONFIG_SYS_SDRAM_BASE 0x40000000
53#define PHYS_SDRAM 0x40000000
54#define PHYS_SDRAM_SIZE SZ_1G /* 1GB DDR */
55
Marek Vasut86a27482022-04-24 23:44:03 +020056#define CONFIG_MXC_UART_BASE UART_BASE_ADDR(4)
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030057
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030058/* USDHC */
59#define CONFIG_SYS_FSL_ESDHC_ADDR 0
60
Ariel D'Alessandrob6d5e132021-11-23 13:33:30 -030061#endif /* __IMX8MN_VAR_SOM_H */