1#include <config.h>
2
3#ifdef CONFIG_ARM64
4#define ARCH "arm64"
5#else
6#define ARCH "arm"
7#endif
8
9/ {
10	aliases {
11		mmc0 = &mmc0;
12#if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
13		mmc1 = &mmc2;
14#endif
15	};
16
17	binman: binman {
18		multiple-images;
19	};
20};
21
22/* Let U-Boot be the firmware layer that controls the watchdog. */
23#ifdef CONFIG_MACH_SUN8I_R528
24&wdt {
25	status = "okay";
26};
27#endif
28
29&binman {
30	u-boot-sunxi-with-spl {
31		filename = "u-boot-sunxi-with-spl.bin";
32		pad-byte = <0xff>;
33
34		blob {
35			/*
36			 * This value matches SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
37			 * and SYS_SPI_U_BOOT_OFFS if those are defined.
38			 */
39			min-size = <0x8000>;
40			filename = "spl/sunxi-spl.bin";
41		};
42
43#ifdef CONFIG_SPL_LOAD_FIT
44		fit {
45			description = "Configuration to load U-Boot and firmware";
46			#address-cells = <1>;
47			fit,fdt-list = "of-list";
48
49			images {
50				uboot {
51					description = "U-Boot";
52					type = "standalone";
53					os = "u-boot";
54					arch = ARCH;
55					compression = "none";
56					load = <CONFIG_TEXT_BASE>;
57#if CONFIG_SUNXI_BL31_BASE == 0
58					entry = <CONFIG_TEXT_BASE>;
59#endif
60
61					u-boot-nodtb {
62					};
63				};
64
65#if CONFIG_SUNXI_BL31_BASE
66				atf {
67					description = "ARM Trusted Firmware";
68					type = "firmware";
69					os = "arm-trusted-firmware";
70					arch = ARCH;
71					compression = "none";
72					load = <CONFIG_SUNXI_BL31_BASE>;
73					entry = <CONFIG_SUNXI_BL31_BASE>;
74
75					atf-bl31 {
76						filename = "bl31.bin";
77						missing-msg = "atf-bl31-sunxi";
78					};
79				};
80#endif
81
82#if CONFIG_SUNXI_SCP_BASE
83				scp {
84					description = "SCP firmware";
85					type = "firmware";
86					arch = "or1k";
87					compression = "none";
88					load = <CONFIG_SUNXI_SCP_BASE>;
89
90					scp {
91						filename = "scp.bin";
92						missing-msg = "scp-sunxi";
93						optional;
94					};
95				};
96#endif
97
98				@fdt-SEQ {
99					description = "NAME";
100					type = "flat_dt";
101					compression = "none";
102				};
103			};
104
105			configurations {
106				default = "@config-DEFAULT-SEQ";
107
108				@config-SEQ {
109					description = "NAME";
110#if CONFIG_SUNXI_BL31_BASE
111					firmware = "atf";
112#else
113					firmware = "uboot";
114#endif
115#if CONFIG_SUNXI_SCP_BASE
116					loadables = "scp", "uboot";
117#else
118					loadables = "uboot";
119#endif
120					fdt = "fdt-SEQ";
121				};
122			};
123		};
124#else
125		u-boot-img {
126		};
127#endif
128	};
129};
130