blob: a0c8abb703395aa2a2e5366a377a037b68a62075 [file] [log] [blame]
Simon Glassde441862016-11-25 20:16:01 -07001#include <config.h>
2
Samuel Hollandead2bf12020-10-21 21:12:12 -05003#ifdef CONFIG_MACH_SUN50I_H6
4#define BL31_ADDR 0x104000
Samuel Holland6b7db0a2020-10-21 21:12:16 -05005#define SCP_ADDR 0x114000
Jernej Skrabece638e052021-01-11 21:11:46 +01006#elif defined(CONFIG_MACH_SUN50I_H616)
Andre Przywara10d94b12021-03-25 16:20:13 +00007#define BL31_ADDR 0x40000000
Samuel Hollandead2bf12020-10-21 21:12:12 -05008#else
9#define BL31_ADDR 0x44000
Samuel Holland6b7db0a2020-10-21 21:12:16 -050010#define SCP_ADDR 0x50000
Samuel Hollandead2bf12020-10-21 21:12:12 -050011#endif
12
Simon Glassde441862016-11-25 20:16:01 -070013/ {
Jagan Teki301a6652019-01-21 16:01:15 +053014 aliases {
Andre Przywara724b9a82021-04-16 11:52:27 +010015 mmc0 = &mmc0;
Andre Przywara42284ec2021-11-30 23:18:54 +000016#if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
Jagan Teki301a6652019-01-21 16:01:15 +053017 mmc1 = &mmc2;
Icenowy Zheng63809112021-07-22 14:30:04 +080018#endif
Jagan Teki301a6652019-01-21 16:01:15 +053019 };
20
Simon Glass896b4212020-09-01 05:14:01 -060021 binman: binman {
22 multiple-images;
23 };
24};
25
Andre Przywara1987b0c2022-09-06 15:59:57 +010026/* Let U-Boot be the firmware layer that controls the watchdog. */
27#ifdef CONFIG_MACH_SUN8I_R528
28&wdt {
29 status = "okay";
30};
31#endif
32
Simon Glass896b4212020-09-01 05:14:01 -060033&binman {
34 u-boot-sunxi-with-spl {
Simon Glassde441862016-11-25 20:16:01 -070035 filename = "u-boot-sunxi-with-spl.bin";
36 pad-byte = <0xff>;
Samuel Holland85852b22020-10-21 21:12:10 -050037
Simon Glassde441862016-11-25 20:16:01 -070038 blob {
Samuel Holland0cb149a2023-01-21 17:25:17 -060039 /*
40 * This value matches SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
41 * and SYS_SPI_U_BOOT_OFFS if those are defined.
42 */
43 min-size = <0x8000>;
Simon Glassde441862016-11-25 20:16:01 -070044 filename = "spl/sunxi-spl.bin";
45 };
Samuel Holland85852b22020-10-21 21:12:10 -050046
Simon Glass896b4212020-09-01 05:14:01 -060047#ifdef CONFIG_ARM64
48 fit {
49 description = "Configuration to load ATF before U-Boot";
50 #address-cells = <1>;
51 fit,fdt-list = "of-list";
52
53 images {
54 uboot {
55 description = "U-Boot (64-bit)";
56 type = "standalone";
Samuel Holland91079ac2020-10-21 21:12:14 -050057 os = "u-boot";
Simon Glass896b4212020-09-01 05:14:01 -060058 arch = "arm64";
59 compression = "none";
Simon Glass72cc5382022-10-20 18:22:39 -060060 load = <CONFIG_TEXT_BASE>;
Simon Glass896b4212020-09-01 05:14:01 -060061
62 u-boot-nodtb {
63 };
64 };
Samuel Holland85852b22020-10-21 21:12:10 -050065
Simon Glass896b4212020-09-01 05:14:01 -060066 atf {
67 description = "ARM Trusted Firmware";
68 type = "firmware";
Samuel Holland91079ac2020-10-21 21:12:14 -050069 os = "arm-trusted-firmware";
Simon Glass896b4212020-09-01 05:14:01 -060070 arch = "arm64";
71 compression = "none";
Samuel Hollandead2bf12020-10-21 21:12:12 -050072 load = <BL31_ADDR>;
73 entry = <BL31_ADDR>;
Samuel Holland85852b22020-10-21 21:12:10 -050074
Simon Glass896b4212020-09-01 05:14:01 -060075 atf-bl31 {
Samuel Hollandd8c15442020-10-21 21:12:11 -050076 filename = "bl31.bin";
Simon Glass5d90d5e2020-09-06 10:39:10 -060077 missing-msg = "atf-bl31-sunxi";
Simon Glass896b4212020-09-01 05:14:01 -060078 };
79 };
80
Icenowy Zheng713d6482021-07-22 14:30:03 +080081#ifdef SCP_ADDR
Samuel Holland6b7db0a2020-10-21 21:12:16 -050082 scp {
83 description = "SCP firmware";
84 type = "firmware";
85 arch = "or1k";
86 compression = "none";
87 load = <SCP_ADDR>;
88
89 scp {
90 filename = "scp.bin";
91 missing-msg = "scp-sunxi";
92 };
93 };
Jernej Skrabece638e052021-01-11 21:11:46 +010094#endif
Samuel Holland6b7db0a2020-10-21 21:12:16 -050095
Simon Glass896b4212020-09-01 05:14:01 -060096 @fdt-SEQ {
97 description = "NAME";
98 type = "flat_dt";
99 compression = "none";
100 };
101 };
102
103 configurations {
Samuel Holland1d52ffb2021-02-08 00:03:16 -0600104 default = "@config-DEFAULT-SEQ";
Samuel Holland85852b22020-10-21 21:12:10 -0500105
Simon Glass896b4212020-09-01 05:14:01 -0600106 @config-SEQ {
107 description = "NAME";
Samuel Holland91079ac2020-10-21 21:12:14 -0500108 firmware = "atf";
Icenowy Zheng713d6482021-07-22 14:30:03 +0800109#ifndef SCP_ADDR
Jernej Skrabece638e052021-01-11 21:11:46 +0100110 loadables = "uboot";
111#else
Samuel Holland6b7db0a2020-10-21 21:12:16 -0500112 loadables = "scp", "uboot";
Jernej Skrabece638e052021-01-11 21:11:46 +0100113#endif
Simon Glass896b4212020-09-01 05:14:01 -0600114 fdt = "fdt-SEQ";
115 };
116 };
117 };
118#else
Simon Glassde441862016-11-25 20:16:01 -0700119 u-boot-img {
Simon Glassde441862016-11-25 20:16:01 -0700120 };
Simon Glass896b4212020-09-01 05:14:01 -0600121#endif
Simon Glassde441862016-11-25 20:16:01 -0700122 };
123};