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>
18 #define CONFIG_MXC_UART_BASE UART4_BASE
20 #ifndef CONFIG_SPL_BUILD
22 #define BOOT_TARGET_DEVICES(func) \
25 #include <config_distro_bootcmd.h>
27 #endif /* !CONFIG_SPL_BUILD */
29 #define MEM_LAYOUT_ENV_SETTINGS \
30 "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
31 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
32 "fdt_addr_r=0x81000000\0" \
33 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
34 "bootcmd_mfg=echo Running fastboot mode; fastboot usb 0\0" \
37 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
38 CONFIG_MTDPARTS_DEFAULT "\0" \
39 "nandargs=setenv bootargs " \
41 "mtdparts=${mtdparts} " \
43 "rootfstype=${nandrootfstype}\0" \
44 "nandroot=ubi0:root rw ubi.mtd=rootfs\0" \
45 "nandrootfstype=ubifs rootwait=1\0" \
46 "nandboot=echo Booting from nand ...; " \
48 "nand read ${fdt_addr_r} nanddtb; " \
49 "nand read ${loadaddr} kernel; " \
50 "bootz ${loadaddr} - ${fdt_addr_r}\0"
52 #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
53 "bootcmd_" #devtypel #instance "=" \
56 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
57 #devtypel #instance " "
59 /* Initial environment variables */
60 #define CONFIG_EXTRA_ENV_SETTINGS \
61 MEM_LAYOUT_ENV_SETTINGS \
65 /* Physical Memory Map */
66 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
67 #define PHYS_SDRAM_SIZE SZ_128M
69 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
70 #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
71 #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
74 #define CONFIG_SYS_MAX_NAND_DEVICE 1
76 #define CONFIG_SYS_NAND_BASE 0x20000000