Merge branch '2022-06-28-assorted-fixes'
[platform/kernel/u-boot.git] / include / configs / imx8mn_bsh_smm_s2.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright 2021 Collabora Ltd.
4  */
5
6 #ifndef __IMX8MN_BSH_SMM_S2_H
7 #define __IMX8MN_BSH_SMM_S2_H
8
9 #include <configs/imx8mn_bsh_smm_s2_common.h>
10
11 #define BOOT_TARGET_DEVICES(func) \
12         func(NAND, nand, 0) \
13
14 #include <config_distro_bootcmd.h>
15
16 #define NANDARGS \
17         "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
18         "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
19         "nandargs=setenv bootargs " \
20                 "${optargs} " \
21                 "mtdparts=${mtdparts} " \
22                 "root=${nandroot} " \
23                 "rootfstype=${nandrootfstype}\0" \
24         "nandroot=ubi0:root rw ubi.mtd=nandrootfs\0" \
25         "nandrootfstype=ubifs rootwait=1\0" \
26         "nandboot=echo Booting from nand ...; " \
27                 "run nandargs; " \
28                 "nand read ${fdt_addr_r} nanddtb; " \
29                 "nand read ${loadaddr} nandkernel; " \
30                 "booti ${loadaddr} - ${fdt_addr_r}\0"
31
32 #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
33         "bootcmd_" #devtypel #instance "=" \
34         "run nandboot\0"
35
36 #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
37         #devtypel #instance " "
38
39 /* Initial environment variables */
40 #define CONFIG_EXTRA_ENV_SETTINGS \
41         MEM_LAYOUT_ENV_SETTINGS \
42         NANDARGS \
43         BOOTENV
44
45 #define PHYS_SDRAM_SIZE                 SZ_256M
46
47 /* NAND */
48 #define CONFIG_SYS_MAX_NAND_DEVICE      1
49
50 #define CONFIG_SYS_NAND_BASE            0x20000000
51
52 #endif /* __IMX8MN_BSH_SMM_S2_H */