1#include <config.h>
2
3#ifdef CONFIG_MACH_SUN50I_H6
4#define BL31_ADDR 0x104000
5#define  SCP_ADDR 0x114000
6#elif defined(CONFIG_MACH_SUN50I_H616)
7#define BL31_ADDR 0x40000000
8#else
9#define BL31_ADDR  0x44000
10#define  SCP_ADDR  0x50000
11#endif
12
13/ {
14	aliases {
15		mmc0 = &mmc0;
16#if CONFIG_MMC_SUNXI_EXTRA_SLOT == 2
17		mmc1 = &mmc2;
18#endif
19	};
20
21	binman: binman {
22		multiple-images;
23	};
24};
25
26&binman {
27	u-boot-sunxi-with-spl {
28		filename = "u-boot-sunxi-with-spl.bin";
29		pad-byte = <0xff>;
30
31		blob {
32			filename = "spl/sunxi-spl.bin";
33		};
34
35#ifdef CONFIG_ARM64
36		fit {
37			description = "Configuration to load ATF before U-Boot";
38			#address-cells = <1>;
39			fit,fdt-list = "of-list";
40
41			images {
42				uboot {
43					description = "U-Boot (64-bit)";
44					type = "standalone";
45					os = "u-boot";
46					arch = "arm64";
47					compression = "none";
48					load = <CONFIG_SYS_TEXT_BASE>;
49
50					u-boot-nodtb {
51					};
52				};
53
54				atf {
55					description = "ARM Trusted Firmware";
56					type = "firmware";
57					os = "arm-trusted-firmware";
58					arch = "arm64";
59					compression = "none";
60					load = <BL31_ADDR>;
61					entry = <BL31_ADDR>;
62
63					atf-bl31 {
64						filename = "bl31.bin";
65						missing-msg = "atf-bl31-sunxi";
66					};
67				};
68
69#ifdef SCP_ADDR
70				scp {
71					description = "SCP firmware";
72					type = "firmware";
73					arch = "or1k";
74					compression = "none";
75					load = <SCP_ADDR>;
76
77					scp {
78						filename = "scp.bin";
79						missing-msg = "scp-sunxi";
80					};
81				};
82#endif
83
84				@fdt-SEQ {
85					description = "NAME";
86					type = "flat_dt";
87					compression = "none";
88				};
89			};
90
91			configurations {
92				default = "@config-DEFAULT-SEQ";
93
94				@config-SEQ {
95					description = "NAME";
96					firmware = "atf";
97#ifndef SCP_ADDR
98					loadables = "uboot";
99#else
100					loadables = "scp", "uboot";
101#endif
102					fdt = "fdt-SEQ";
103				};
104			};
105		};
106#else
107		u-boot-img {
108			offset = <CONFIG_SPL_PAD_TO>;
109		};
110#endif
111	};
112};
113