blob: c8c928c7e5089db3a2239f2564e6dee1d82aad95 [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
Manoj Sai0dc80e82023-09-18 00:56:27 +053059#if defined(CONFIG_SPL_GZIP)
60 compression = "gzip";
Manoj Saif6c7c6b2023-09-18 00:56:28 +053061#elif defined(CONFIG_SPL_LZMA)
62 compression = "lzma";
Manoj Sai0dc80e82023-09-18 00:56:27 +053063#else
Simon Glass4de36172023-01-07 14:07:18 -070064 compression = "none";
Manoj Sai0dc80e82023-09-18 00:56:27 +053065#endif
Simon Glass4de36172023-01-07 14:07:18 -070066 load = <CONFIG_TEXT_BASE>;
67 entry = <CONFIG_TEXT_BASE>;
68 u-boot-nodtb {
Manoj Sai0dc80e82023-09-18 00:56:27 +053069#if defined(CONFIG_SPL_GZIP)
70 compress = "gzip";
Manoj Saif6c7c6b2023-09-18 00:56:28 +053071#elif defined(CONFIG_SPL_LZMA)
72 compress = "lzma";
Manoj Sai0dc80e82023-09-18 00:56:27 +053073#endif
Simon Glass4de36172023-01-07 14:07:18 -070074 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000075#ifdef CONFIG_SPL_FIT_SIGNATURE
76 hash {
77 algo = "sha256";
78 };
79#endif
Simon Glass4de36172023-01-07 14:07:18 -070080 };
81
Alex Beec32c9dc2023-07-18 16:57:11 +020082#ifdef CONFIG_ARM64
Simon Glass4de36172023-01-07 14:07:18 -070083 @atf-SEQ {
84 fit,operation = "split-elf";
85 description = "ARM Trusted Firmware";
86 type = "firmware";
87 arch = "arm64";
88 os = "arm-trusted-firmware";
89 compression = "none";
90 fit,load;
91 fit,entry;
92 fit,data;
93
94 atf-bl31 {
95 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000096#ifdef CONFIG_SPL_FIT_SIGNATURE
97 hash {
98 algo = "sha256";
99 };
100#endif
Simon Glass4de36172023-01-07 14:07:18 -0700101 };
102 @tee-SEQ {
103 fit,operation = "split-elf";
104 description = "TEE";
105 type = "tee";
106 arch = "arm64";
107 os = "tee";
108 compression = "none";
109 fit,load;
110 fit,entry;
111 fit,data;
112
113 tee-os {
114 optional;
115 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +0000116#ifdef CONFIG_SPL_FIT_SIGNATURE
117 hash {
118 algo = "sha256";
119 };
120#endif
Simon Glass4de36172023-01-07 14:07:18 -0700121 };
Alex Beec32c9dc2023-07-18 16:57:11 +0200122#else
123 op-tee {
124 description = "OP-TEE";
125 type = "tee";
126 arch = "arm";
127 os = "tee";
128 compression = "none";
129 load = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
130 entry = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
131
132 tee-os {
133 };
134#ifdef CONFIG_SPL_FIT_SIGNATURE
135 hash {
136 algo = "sha256";
137 };
138#endif
139 };
140#endif
Simon Glass4de36172023-01-07 14:07:18 -0700141
142 @fdt-SEQ {
143 description = "fdt-NAME";
144 compression = "none";
145 type = "flat_dt";
Jonas Karlmand20ecb82023-01-21 19:01:59 +0000146#ifdef CONFIG_SPL_FIT_SIGNATURE
147 hash {
148 algo = "sha256";
149 };
150#endif
Simon Glass4de36172023-01-07 14:07:18 -0700151 };
152 };
153
154 configurations {
155 default = "@config-DEFAULT-SEQ";
156 @config-SEQ {
157 description = "NAME.dtb";
158 fdt = "fdt-SEQ";
Alex Beec32c9dc2023-07-18 16:57:11 +0200159#ifdef CONFIG_ARM64
Jonas Karlman60ee1922023-01-21 19:02:26 +0000160 fit,firmware = "atf-1", "u-boot";
Alex Beec32c9dc2023-07-18 16:57:11 +0200161#else
162 fit,firmware = "op-tee", "u-boot";
163#endif
Simon Glass4de36172023-01-07 14:07:18 -0700164 fit,loadables;
165 };
166 };
167 };
Quentin Schulzd9ffa5e2022-09-02 15:10:52 +0200168#else
Jagan Tekib22da752020-01-10 00:16:21 +0530169 u-boot-img {
170 offset = <CONFIG_SPL_PAD_TO>;
171 };
Simon Glass4de36172023-01-07 14:07:18 -0700172#endif
Jagan Tekib22da752020-01-10 00:16:21 +0530173 };
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200174
175#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
176 simple-bin-spi {
177 filename = "u-boot-rockchip-spi.bin";
178 pad-byte = <0xff>;
179
180 mkimage {
181 filename = "idbloader-spi.img";
182 args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200183 multiple-data-files;
184
Jonas Karlman38ad6c92023-02-25 19:01:34 +0000185#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
186 rockchip-tpl {
187 };
188#elif defined(CONFIG_TPL)
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200189 u-boot-tpl {
190 };
191#endif
192 u-boot-spl {
193 };
194 };
195
Alex Beec32c9dc2023-07-18 16:57:11 +0200196#if defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE)
Simon Glass4de36172023-01-07 14:07:18 -0700197 fit {
198 type = "blob";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200199 filename = "u-boot.itb";
200#else
201 u-boot-img {
202#endif
203 /* Sync with u-boot,spl-payload-offset if present */
204 offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
205 };
206 };
Simon Glass4de36172023-01-07 14:07:18 -0700207#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
Jagan Tekib22da752020-01-10 00:16:21 +0530208};
Simon Glass4de36172023-01-07 14:07:18 -0700209#endif /* CONFIG_SPL */