blob: 2878b80926c4af62cbf0575566c7afcf207ba683 [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
Simon Glass4de36172023-01-07 14:07:18 -070036#if defined(CONFIG_SPL_FIT) && defined(CONFIG_ARM64)
37 fit: fit {
38 description = "FIT image for U-Boot with bl31 (TF-A)";
39 #address-cells = <1>;
40 fit,fdt-list = "of-list";
Quentin Schulzd9ffa5e2022-09-02 15:10:52 +020041 filename = "u-boot.itb";
Simon Glass4de36172023-01-07 14:07:18 -070042 fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
Jonas Karlman42d201a2023-01-21 19:01:39 +000043 fit,align = <512>;
Simon Glass4de36172023-01-07 14:07:18 -070044 offset = <CONFIG_SPL_PAD_TO>;
45 images {
46 u-boot {
47 description = "U-Boot (64-bit)";
48 type = "standalone";
49 os = "U-Boot";
50 arch = "arm64";
51 compression = "none";
52 load = <CONFIG_TEXT_BASE>;
53 entry = <CONFIG_TEXT_BASE>;
54 u-boot-nodtb {
55 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000056#ifdef CONFIG_SPL_FIT_SIGNATURE
57 hash {
58 algo = "sha256";
59 };
60#endif
Simon Glass4de36172023-01-07 14:07:18 -070061 };
62
63 @atf-SEQ {
64 fit,operation = "split-elf";
65 description = "ARM Trusted Firmware";
66 type = "firmware";
67 arch = "arm64";
68 os = "arm-trusted-firmware";
69 compression = "none";
70 fit,load;
71 fit,entry;
72 fit,data;
73
74 atf-bl31 {
75 };
Jonas Karlmand20ecb82023-01-21 19:01:59 +000076#ifdef CONFIG_SPL_FIT_SIGNATURE
77 hash {
78 algo = "sha256";
79 };
80#endif
Simon Glass4de36172023-01-07 14:07:18 -070081 };
82 @tee-SEQ {
83 fit,operation = "split-elf";
84 description = "TEE";
85 type = "tee";
86 arch = "arm64";
87 os = "tee";
88 compression = "none";
89 fit,load;
90 fit,entry;
91 fit,data;
92
93 tee-os {
94 optional;
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
103 @fdt-SEQ {
104 description = "fdt-NAME";
105 compression = "none";
106 type = "flat_dt";
Jonas Karlmand20ecb82023-01-21 19:01:59 +0000107#ifdef CONFIG_SPL_FIT_SIGNATURE
108 hash {
109 algo = "sha256";
110 };
111#endif
Simon Glass4de36172023-01-07 14:07:18 -0700112 };
113 };
114
115 configurations {
116 default = "@config-DEFAULT-SEQ";
117 @config-SEQ {
118 description = "NAME.dtb";
119 fdt = "fdt-SEQ";
Jonas Karlman60ee1922023-01-21 19:02:26 +0000120 fit,firmware = "atf-1", "u-boot";
Simon Glass4de36172023-01-07 14:07:18 -0700121 fit,loadables;
122 };
123 };
124 };
Quentin Schulzd9ffa5e2022-09-02 15:10:52 +0200125#else
Jagan Tekib22da752020-01-10 00:16:21 +0530126 u-boot-img {
127 offset = <CONFIG_SPL_PAD_TO>;
128 };
Simon Glass4de36172023-01-07 14:07:18 -0700129#endif
Jagan Tekib22da752020-01-10 00:16:21 +0530130 };
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200131
132#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
133 simple-bin-spi {
134 filename = "u-boot-rockchip-spi.bin";
135 pad-byte = <0xff>;
136
137 mkimage {
138 filename = "idbloader-spi.img";
139 args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200140 multiple-data-files;
141
Jonas Karlman38ad6c92023-02-25 19:01:34 +0000142#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
143 rockchip-tpl {
144 };
145#elif defined(CONFIG_TPL)
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200146 u-boot-tpl {
147 };
148#endif
149 u-boot-spl {
150 };
151 };
152
153#ifdef CONFIG_ARM64
Simon Glass4de36172023-01-07 14:07:18 -0700154 fit {
155 type = "blob";
Quentin Schulz9c5217d2022-09-02 15:10:55 +0200156 filename = "u-boot.itb";
157#else
158 u-boot-img {
159#endif
160 /* Sync with u-boot,spl-payload-offset if present */
161 offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>;
162 };
163 };
Simon Glass4de36172023-01-07 14:07:18 -0700164#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
Jagan Tekib22da752020-01-10 00:16:21 +0530165};
Simon Glass4de36172023-01-07 14:07:18 -0700166#endif /* CONFIG_SPL */