blob: 0909a67883e59b9f1549a30a3deeccd95cd36dad [file] [log] [blame]
Simon Glassde441862016-11-25 20:16:01 -07001#include <config.h>
2
Samuel Hollandacaf53a2023-10-31 00:17:40 -05003#ifdef CONFIG_ARM64
4#define ARCH "arm64"
5#else
6#define ARCH "arm"
7#endif
8
Simon Glassde441862016-11-25 20:16:01 -07009/ {
Jagan Teki301a6652019-01-21 16:01:15 +053010 aliases {
Andre Przywara724b9a82021-04-16 11:52:27 +010011 mmc0 = &mmc0;
Andre Przywara42284ec2021-11-30 23:18:54 +000012#if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
Jagan Teki301a6652019-01-21 16:01:15 +053013 mmc1 = &mmc2;
Icenowy Zheng63809112021-07-22 14:30:04 +080014#endif
Jagan Teki301a6652019-01-21 16:01:15 +053015 };
16
Simon Glass896b4212020-09-01 05:14:01 -060017 binman: binman {
18 multiple-images;
19 };
20};
21
Andre Przywara1987b0c2022-09-06 15:59:57 +010022/* 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
Simon Glass896b4212020-09-01 05:14:01 -060029&binman {
30 u-boot-sunxi-with-spl {
Simon Glassde441862016-11-25 20:16:01 -070031 filename = "u-boot-sunxi-with-spl.bin";
32 pad-byte = <0xff>;
Samuel Holland85852b22020-10-21 21:12:10 -050033
Simon Glassde441862016-11-25 20:16:01 -070034 blob {
Samuel Holland0cb149a2023-01-21 17:25:17 -060035 /*
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>;
Simon Glassde441862016-11-25 20:16:01 -070040 filename = "spl/sunxi-spl.bin";
41 };
Samuel Holland85852b22020-10-21 21:12:10 -050042
Samuel Hollandacaf53a2023-10-31 00:17:40 -050043#ifdef CONFIG_SPL_LOAD_FIT
Simon Glass896b4212020-09-01 05:14:01 -060044 fit {
Samuel Hollandacaf53a2023-10-31 00:17:40 -050045 description = "Configuration to load U-Boot and firmware";
Simon Glass896b4212020-09-01 05:14:01 -060046 #address-cells = <1>;
47 fit,fdt-list = "of-list";
48
49 images {
50 uboot {
Samuel Hollandacaf53a2023-10-31 00:17:40 -050051 description = "U-Boot";
Simon Glass896b4212020-09-01 05:14:01 -060052 type = "standalone";
Samuel Holland91079ac2020-10-21 21:12:14 -050053 os = "u-boot";
Samuel Hollandacaf53a2023-10-31 00:17:40 -050054 arch = ARCH;
Simon Glass896b4212020-09-01 05:14:01 -060055 compression = "none";
Simon Glass72cc5382022-10-20 18:22:39 -060056 load = <CONFIG_TEXT_BASE>;
Samuel Hollandacaf53a2023-10-31 00:17:40 -050057#if CONFIG_SUNXI_BL31_BASE == 0
58 entry = <CONFIG_TEXT_BASE>;
59#endif
Simon Glass896b4212020-09-01 05:14:01 -060060
61 u-boot-nodtb {
62 };
63 };
Samuel Holland85852b22020-10-21 21:12:10 -050064
Samuel Hollandacaf53a2023-10-31 00:17:40 -050065#if CONFIG_SUNXI_BL31_BASE
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";
Samuel Hollandacaf53a2023-10-31 00:17:40 -050070 arch = ARCH;
Simon Glass896b4212020-09-01 05:14:01 -060071 compression = "none";
Samuel Holland405e06c2023-10-31 00:17:39 -050072 load = <CONFIG_SUNXI_BL31_BASE>;
73 entry = <CONFIG_SUNXI_BL31_BASE>;
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 };
Samuel Hollandacaf53a2023-10-31 00:17:40 -050080#endif
Simon Glass896b4212020-09-01 05:14:01 -060081
Samuel Holland405e06c2023-10-31 00:17:39 -050082#if CONFIG_SUNXI_SCP_BASE
Samuel Holland6b7db0a2020-10-21 21:12:16 -050083 scp {
84 description = "SCP firmware";
85 type = "firmware";
86 arch = "or1k";
87 compression = "none";
Samuel Holland405e06c2023-10-31 00:17:39 -050088 load = <CONFIG_SUNXI_SCP_BASE>;
Samuel Holland6b7db0a2020-10-21 21:12:16 -050089
90 scp {
91 filename = "scp.bin";
92 missing-msg = "scp-sunxi";
93 };
94 };
Jernej Skrabece638e052021-01-11 21:11:46 +010095#endif
Samuel Holland6b7db0a2020-10-21 21:12:16 -050096
Simon Glass896b4212020-09-01 05:14:01 -060097 @fdt-SEQ {
98 description = "NAME";
99 type = "flat_dt";
100 compression = "none";
101 };
102 };
103
104 configurations {
Samuel Holland1d52ffb2021-02-08 00:03:16 -0600105 default = "@config-DEFAULT-SEQ";
Samuel Holland85852b22020-10-21 21:12:10 -0500106
Simon Glass896b4212020-09-01 05:14:01 -0600107 @config-SEQ {
108 description = "NAME";
Samuel Hollandacaf53a2023-10-31 00:17:40 -0500109#if CONFIG_SUNXI_BL31_BASE
Samuel Holland91079ac2020-10-21 21:12:14 -0500110 firmware = "atf";
Samuel Hollandacaf53a2023-10-31 00:17:40 -0500111#else
112 firmware = "uboot";
113#endif
Samuel Holland405e06c2023-10-31 00:17:39 -0500114#if CONFIG_SUNXI_SCP_BASE
Samuel Holland6b7db0a2020-10-21 21:12:16 -0500115 loadables = "scp", "uboot";
Samuel Holland405e06c2023-10-31 00:17:39 -0500116#else
117 loadables = "uboot";
Jernej Skrabece638e052021-01-11 21:11:46 +0100118#endif
Simon Glass896b4212020-09-01 05:14:01 -0600119 fdt = "fdt-SEQ";
120 };
121 };
122 };
123#else
Simon Glassde441862016-11-25 20:16:01 -0700124 u-boot-img {
Simon Glassde441862016-11-25 20:16:01 -0700125 };
Simon Glass896b4212020-09-01 05:14:01 -0600126#endif
Simon Glassde441862016-11-25 20:16:01 -0700127 };
128};