1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2021 Amarula Solutions B.V.
6 #ifndef __IMX6ULZ_SMM_M2_CONFIG_H
7 #define __IMX6ULZ_SMM_M2_CONFIG_H
9 #include "mx6_common.h"
11 #include <asm/arch/imx-regs.h>
12 #include <linux/sizes.h>
13 #include <linux/stringify.h>
15 #define CFG_MXC_UART_BASE UART4_BASE
17 #ifndef CONFIG_XPL_BUILD
19 #define BOOT_TARGET_DEVICES(func) \
22 #include <config_distro_bootcmd.h>
24 #endif /* !CONFIG_XPL_BUILD */
26 #define MEM_LAYOUT_ENV_SETTINGS \
27 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
28 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
29 "fdt_addr_r=0x81000000\0" \
30 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
31 "bootcmd_mfg=echo Running fastboot mode; fastboot usb 0\0" \
34 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
35 CONFIG_MTDPARTS_DEFAULT "\0" \
36 "nandargs=setenv bootargs " \
38 "mtdparts=${mtdparts} " \
40 "rootfstype=${nandrootfstype}\0" \
41 "nandroot=ubi0:root rw ubi.mtd=rootfs\0" \
42 "nandrootfstype=ubifs rootwait=1\0" \
43 "nandboot=echo Booting from nand ...; " \
45 "nand read ${fdt_addr_r} nanddtb; " \
46 "nand read ${loadaddr} kernel; " \
47 "bootz ${loadaddr} - ${fdt_addr_r}\0"
49 #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
50 "bootcmd_" #devtypel #instance "=" \
53 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
54 #devtypel #instance " "
56 /* Initial environment variables */
57 #define CFG_EXTRA_ENV_SETTINGS \
58 MEM_LAYOUT_ENV_SETTINGS \
62 /* Physical Memory Map */
63 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
64 #define PHYS_SDRAM_SIZE SZ_128M
66 #define CFG_SYS_SDRAM_BASE PHYS_SDRAM
67 #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
68 #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
72 #define CFG_SYS_NAND_BASE 0x20000000