blob: 8f248f941f964391985e9df69c2cf40bf9e99a90 [file] [log] [blame]
Jagan Teki79030a42020-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 Glass9b312e22020-07-19 13:55:57 -06009 binman: binman {
10 multiple-images;
11 };
12};
13
Jagan Teki1a45a032023-01-27 12:51:33 +053014#ifdef CONFIG_SPL
Simon Glass9b312e22020-07-19 13:55:57 -060015&binman {
16 simple-bin {
Jagan Teki79030a42020-01-10 00:16:21 +053017 filename = "u-boot-rockchip.bin";
18 pad-byte = <0xff>;
19
Quentin Schulz001f7882022-09-02 15:10:51 +020020 mkimage {
Jagan Teki79030a42020-01-10 00:16:21 +053021 filename = "idbloader.img";
Quentin Schulz001f7882022-09-02 15:10:51 +020022 args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
Quentin Schulz001f7882022-09-02 15:10:51 +020023 multiple-data-files;
24
Jonas Karlman4773e9d2023-02-25 19:01:34 +000025#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
26 rockchip-tpl {
27 };
28#elif defined(CONFIG_TPL)
Quentin Schulz001f7882022-09-02 15:10:51 +020029 u-boot-tpl {
30 };
31#endif
32 u-boot-spl {
33 };
Jagan Teki79030a42020-01-10 00:16:21 +053034 };
35
Alex Beefff7f5e2023-07-18 16:57:11 +020036#if defined(CONFIG_SPL_FIT) && (defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE))
Simon Glasse0c0eff2023-01-07 14:07:18 -070037 fit: fit {
Alex Beefff7f5e2023-07-18 16:57:11 +020038#ifdef CONFIG_ARM64
Simon Glasse0c0eff2023-01-07 14:07:18 -070039 description = "FIT image for U-Boot with bl31 (TF-A)";
Alex Beefff7f5e2023-07-18 16:57:11 +020040#else
41 description = "FIT image with OP-TEE";
42#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -070043 #address-cells = <1>;
44 fit,fdt-list = "of-list";
Quentin Schulz05713d52022-09-02 15:10:52 +020045 filename = "u-boot.itb";
Simon Glasse0c0eff2023-01-07 14:07:18 -070046 fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
Jonas Karlman5ad03fc2023-01-21 19:01:39 +000047 fit,align = <512>;
Simon Glasse0c0eff2023-01-07 14:07:18 -070048 offset = <CONFIG_SPL_PAD_TO>;
49 images {
50 u-boot {
Alex Beefff7f5e2023-07-18 16:57:11 +020051 description = "U-Boot";
Simon Glasse0c0eff2023-01-07 14:07:18 -070052 type = "standalone";
53 os = "U-Boot";
Alex Beefff7f5e2023-07-18 16:57:11 +020054#ifdef CONFIG_ARM64
Simon Glasse0c0eff2023-01-07 14:07:18 -070055 arch = "arm64";
Alex Beefff7f5e2023-07-18 16:57:11 +020056#else
57 arch = "arm";
58#endif
Manoj Sai439bd732023-09-18 00:56:27 +053059#if defined(CONFIG_SPL_GZIP)
60 compression = "gzip";
61#else
Simon Glasse0c0eff2023-01-07 14:07:18 -070062 compression = "none";
Manoj Sai439bd732023-09-18 00:56:27 +053063#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -070064 load = <CONFIG_TEXT_BASE>;
65 entry = <CONFIG_TEXT_BASE>;
66 u-boot-nodtb {
Manoj Sai439bd732023-09-18 00:56:27 +053067#if defined(CONFIG_SPL_GZIP)
68 compress = "gzip";
69#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -070070 };
Jonas Karlman99e3a2c2023-01-21 19:01:59 +000071#ifdef CONFIG_SPL_FIT_SIGNATURE
72 hash {
73 algo = "sha256";
74 };
75#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -070076 };
77
Alex Beefff7f5e2023-07-18 16:57:11 +020078#ifdef CONFIG_ARM64
Simon Glasse0c0eff2023-01-07 14:07:18 -070079 @atf-SEQ {
80 fit,operation = "split-elf";
81 description = "ARM Trusted Firmware";
82 type = "firmware";
83 arch = "arm64";
84 os = "arm-trusted-firmware";
85 compression = "none";
86 fit,load;
87 fit,entry;
88 fit,data;
89
90 atf-bl31 {
91 };
Jonas Karlman99e3a2c2023-01-21 19:01:59 +000092#ifdef CONFIG_SPL_FIT_SIGNATURE
93 hash {
94 algo = "sha256";
95 };
96#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -070097 };
98 @tee-SEQ {
99 fit,operation = "split-elf";
100 description = "TEE";
101 type = "tee";
102 arch = "arm64";
103 os = "tee";
104 compression = "none";
105 fit,load;
106 fit,entry;
107 fit,data;
108
109 tee-os {
110 optional;
111 };
Jonas Karlman99e3a2c2023-01-21 19:01:59 +0000112#ifdef CONFIG_SPL_FIT_SIGNATURE
113 hash {
114 algo = "sha256";
115 };
116#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -0700117 };
Alex Beefff7f5e2023-07-18 16:57:11 +0200118#else
119 op-tee {
120 description = "OP-TEE";
121 type = "tee";
122 arch = "arm";
123 os = "tee";
124 compression = "none";
125 load = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
126 entry = <(CFG_SYS_SDRAM_BASE + 0x8400000)>;
127
128 tee-os {
129 };
130#ifdef CONFIG_SPL_FIT_SIGNATURE
131 hash {
132 algo = "sha256";
133 };
134#endif
135 };
136#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -0700137
138 @fdt-SEQ {
139 description = "fdt-NAME";
140 compression = "none";
141 type = "flat_dt";
Jonas Karlman99e3a2c2023-01-21 19:01:59 +0000142#ifdef CONFIG_SPL_FIT_SIGNATURE
143 hash {
144 algo = "sha256";
145 };
146#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -0700147 };
148 };
149
150 configurations {
151 default = "@config-DEFAULT-SEQ";
152 @config-SEQ {
153 description = "NAME.dtb";
154 fdt = "fdt-SEQ";
Alex Beefff7f5e2023-07-18 16:57:11 +0200155#ifdef CONFIG_ARM64
Jonas Karlman7e215ad2023-01-21 19:02:26 +0000156 fit,firmware = "atf-1", "u-boot";
Alex Beefff7f5e2023-07-18 16:57:11 +0200157#else
158 fit,firmware = "op-tee", "u-boot";
159#endif
Simon Glasse0c0eff2023-01-07 14:07:18 -0700160 fit,loadables;
161 };
162 };
163 };
Quentin Schulz05713d52022-09-02 15:10:52 +0200164#else
Jagan Teki79030a42020-01-10 00:16:21 +0530165 u-boot-img {
166 offset = <CONFIG_SPL_PAD_TO>;
167 };
Simon Glasse0c0eff2023-01-07 14:07:18 -0700168#endif
Jagan Teki79030a42020-01-10 00:16:21 +0530169 };
Quentin Schulze1faa532022-09-02 15:10:55 +0200170
171#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
172 simple-bin-spi {
173 filename = "u-boot-rockchip-spi.bin";
174 pad-byte = <0xff>;
175
176 mkimage {
177 filename = "idbloader-spi.img";
178 args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
Quentin Schulze1faa532022-09-02 15:10:55 +0200179 multiple-data-files;
180
Jonas Karlman4773e9d2023-02-25 19:01:34 +0000181#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
182 rockchip-tpl {
183 };
184#elif defined(CONFIG_TPL)
Quentin Schulze1faa532022-09-02 15:10:55 +0200185 u-boot-tpl {
186 };
187#endif
188 u-boot-spl {
189 };
190 };
191
Alex Beefff7f5e2023-07-18 16:57:11 +0200192#if defined(CONFIG_ARM64) || defined(CONFIG_SPL_OPTEE_IMAGE)
Simon Glasse0c0eff2023-01-07 14:07:18 -0700193 fit {
194 type = "blob";
Quentin Schulze1faa532022-09-02 15:10:55 +0200195 filename = "u-boot.itb";
196#else
197 u-boot-img {
198#endif
199 /* Sync with u-boot,spl-payload-offset if present */
200 offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
201 };
202 };
Simon Glasse0c0eff2023-01-07 14:07:18 -0700203#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
Jagan Teki79030a42020-01-10 00:16:21 +0530204};
Simon Glasse0c0eff2023-01-07 14:07:18 -0700205#endif /* CONFIG_SPL */