summaryrefslogtreecommitdiff
path: root/include/configs/imx8mn_bsh_smm_s2.h
blob: 84c19824bdca7d9c9f65d4fd44146bab3d73cfa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright 2021 Collabora Ltd.
 */

#ifndef __IMX8MN_BSH_SMM_S2_H
#define __IMX8MN_BSH_SMM_S2_H

#include <configs/imx8mn_bsh_smm_s2_common.h>

#define BOOT_TARGET_DEVICES(func) \
	func(NAND, nand, 0) \

#include <config_distro_bootcmd.h>

#define NANDARGS \
	"nandargs=setenv bootargs console=${console} " \
		"${optargs} " \
		"root=${nandroot} " \
		"rootfstype=${nandrootfstype}\0" \
	"nandroot=ubi0:root rw ubi.mtd=nandrootfs\0" \
	"nandrootfstype=ubifs rootwait\0" \
	"nandboot=echo Booting from nand ...; " \
		"run nandargs; " \
		"nand read ${fdt_addr_r} nanddtb; " \
		"nand read ${loadaddr} nandkernel; " \
		"booti ${loadaddr} - ${fdt_addr_r}\0"

#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
	"bootcmd_" #devtypel #instance "=" \
	"run nandboot\0"

#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
	#devtypel #instance " "

/* Initial environment variables */
#define CONFIG_EXTRA_ENV_SETTINGS \
	MEM_LAYOUT_ENV_SETTINGS \
	NANDARGS \
	BOOTENV

#define PHYS_SDRAM_SIZE			SZ_256M

/* NAND */
#define CONFIG_SYS_MAX_NAND_DEVICE	1

#define CONFIG_SYS_NAND_BASE		0x20000000

#endif /* __IMX8MN_BSH_SMM_S2_H */