blob: be2658e8ef1866dd33d95758a1c0fa34f3f10599 [file] [log] [blame]
Jagan Tekib22da752020-01-10 00:16:21 +05301// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com>
4 */
5
6#include <config.h>
7
8/ {
Simon Glass88315f72020-07-19 13:55:57 -06009 binman: binman {
10 multiple-images;
11 };
12};
13
Jagan Tekiffce0ff2023-01-27 12:51:33 +053014#ifdef CONFIG_SPL
Simon Glass88315f72020-07-19 13:55:57 -060015&binman {
16 simple-bin {
Jagan Tekib22da752020-01-10 00:16:21 +053017 filename = "u-boot-rockchip.bin";
18 pad-byte = <0xff>;
19
Quentin Schulz8c9b9fe2022-09-02 15:10:51 +020020 mkimage {
Jagan Tekib22da752020-01-10 00:16:21 +053021 filename = "idbloader.img";
Quentin Schulz8c9b9fe2022-09-02 15:10:51 +020022 args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
Quentin Schulz8c9b9fe2022-09-02 15:10:51 +020023 multiple-data-files;
24
Jonas Karlman38ad6c92023-02-25 19:01:34 +000025#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
26 rockchip-tpl {
27 };
28#elif defined(CONFIG_TPL)
Quentin Schulz8c9b9fe2022-09-02 15:10:51 +020029 u-boot-tpl {
30 };
31#endif
32 u-boot-spl {
33 };
Jagan Tekib22da752020-01-10 00:16:21 +053034 };
35
Alex Beec32c9dc2023-07-18 16:57:11 +020036#if defined(CONFIG_SPL_FIT) && (defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE))
Simon Glass4de36172023-01-07 14:07:18 -070037 fit: fit {
Alex Beec32c9dc2023-07-18 16:57:11 +020038#ifdef CONFIG_ARM64
Simon Glass4de36172023-01-07 14:07:18 -070039 description = "FIT image for U-Boot with bl31 (TF-A)";
Alex Beec32c9dc2023-07-18 16:57:11 +020040#else
41 description = "FIT image with OP-TEE";
42#endif
Simon Glass4de36172023-01-07 14:07:18 -070043 #address-cells = <1>;
44 fit,fdt-list = "of-list";
Quentin Schulzd9ffa5e2022-09-02 15:10:52 +020045 filename = "u-boot.itb";
Simon Glass4de36172023-01-07 14:07:18 -070046 fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
Jonas Karlman42d201a2023-01-21 19:01:39 +000047 fit,align = <512>;
Simon Glass4de36172023-01-07 14:07:18 -070048 offset = <CONFIG_SPL_PAD_TO>;
49 images {
50 u-boot {
Alex Beec32c9dc2023-07-18 16:57:11 +020051 description = "U-Boot";
Simon Glass4de36172023-01-07 14:07:18 -070052 type = "standalone";
53 os = "U-Boot";
Alex Beec32c9dc2023-07-18 16:57:11 +020054#ifdef CONFIG_ARM64
Simon Glass4de36172023-01-07 14:07:18 -070055 arch = "arm64";
Alex Beec32c9dc2023-07-18 16:57:11 +020056#else
57 arch = "arm";
58#endif
Simon Glass4de36172023-01-07 14:07:18 -070059 compression = "none";
60 load = <CONFIG_TEXT_BASE>;
61 entry = <CONFIG_TEXT_BASE>;
62 u-boot-nodtb {
63 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000064#ifdef CONFIG_SPL_FIT_SIGNATURE
65 hash {
66 algo = "sha256";
67 };
68#endif
Simon Glass4de36172023-01-07 14:07:18 -070069 };
70
Alex Beec32c9dc2023-07-18 16:57:11 +020071#ifdef CONFIG_ARM64
Simon Glass4de36172023-01-07 14:07:18 -070072 @atf-SEQ {
73 fit,operation = "split-elf";
74 description = "ARM Trusted Firmware";
75 type = "firmware";
76 arch = "arm64";
77 os = "arm-trusted-firmware";
78 compression = "none";
79 fit,load;
80 fit,entry;
81 fit,data;
82
83 atf-bl31 {
84 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000085#ifdef CONFIG_SPL_FIT_SIGNATURE
86 hash {
87 algo = "sha256";
88 };
89#endif
Simon Glass4de36172023-01-07 14:07:18 -070090 };
91 @tee-SEQ {
92 fit,operation = "split-elf";
93 description = "TEE";
94 type = "tee";
95 arch = "arm64";
96 os = "tee";
97 compression = "none";
98 fit,load;
99 fit,entry;
100 fit,data;
101
102 tee-os {
103 optional;
104 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +0000105#ifdef CONFIG_SPL_FIT_SIGNATURE
106 hash {
107 algo = "sha256";
108 };
109#endif
Simon Glass4de36172023-01-07 14:07:18 -0700110 };
Alex Beec32c9dc2023-07-18 16:57:11 +0200111#else
112 op-tee {
113 description = "OP-TEE";
114 type = "tee";
115 arch = "arm";
116 os = "tee";
117 compression = "none";
118 load = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
119 entry = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
120
121 tee-os {
122 };
123#ifdef CONFIG_SPL_FIT_SIGNATURE
124 hash {
125 algo = "sha256";
126 };
127#endif
128 };
129#endif
Simon Glass4de36172023-01-07 14:07:18 -0700130
131 @fdt-SEQ {
132 description = "fdt-NAME";
133 compression = "none";
134 type = "flat_dt";
Jonas Karlmand20ecb82023-01-21 19:01:59 +0000135#ifdef CONFIG_SPL_FIT_SIGNATURE
136 hash {
137 algo = "sha256";
138 };
139#endif
Simon Glass4de36172023-01-07 14:07:18 -0700140 };
141 };
142
143 configurations {
144 default = "@config-DEFAULT-SEQ";
145 @config-SEQ {
146 description = "NAME.dtb";
147 fdt = "fdt-SEQ";
Alex Beec32c9dc2023-07-18 16:57:11 +0200148#ifdef CONFIG_ARM64
Jonas Karlman60ee1922023-01-21 19:02:26 +0000149 fit,firmware = "atf-1", "u-boot";
Alex Beec32c9dc2023-07-18 16:57:11 +0200150#else
151 fit,firmware = "op-tee", "u-boot";
152#endif
Simon Glass4de36172023-01-07 14:07:18 -0700153 fit,loadables;
154 };
155 };
156 };
Quentin Schulzd9ffa5e2022-09-02 15:10:52 +0200157#else
Jagan Tekib22da752020-01-10 00:16:21 +0530158 u-boot-img {
159 offset = <CONFIG_SPL_PAD_TO>;
160 };
Simon Glass4de36172023-01-07 14:07:18 -0700161#endif
Jagan Tekib22da752020-01-10 00:16:21 +0530162 };
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200163
164#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
165 simple-bin-spi {
166 filename = "u-boot-rockchip-spi.bin";
167 pad-byte = <0xff>;
168
169 mkimage {
170 filename = "idbloader-spi.img";
171 args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200172 multiple-data-files;
173
Jonas Karlman38ad6c92023-02-25 19:01:34 +0000174#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
175 rockchip-tpl {
176 };
177#elif defined(CONFIG_TPL)
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200178 u-boot-tpl {
179 };
180#endif
181 u-boot-spl {
182 };
183 };
184
Alex Beec32c9dc2023-07-18 16:57:11 +0200185#if defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE)
Simon Glass4de36172023-01-07 14:07:18 -0700186 fit {
187 type = "blob";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200188 filename = "u-boot.itb";
189#else
190 u-boot-img {
191#endif
192 /* Sync with u-boot,spl-payload-offset if present */
193 offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
194 };
195 };
Simon Glass4de36172023-01-07 14:07:18 -0700196#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
Jagan Tekib22da752020-01-10 00:16:21 +0530197};
Simon Glass4de36172023-01-07 14:07:18 -0700198#endif /* CONFIG_SPL */