
On Thu, Aug 26, 2021 at 5:14 AM Marcel Ziswiler marcel@ziswiler.com wrote:
From: Marcel Ziswiler marcel.ziswiler@toradex.com
With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Introduce a new common imx8mm-binman.dtsi which covers the common part of that configuration.
Signed-off-by: Marcel Ziswiler marcel.ziswiler@toradex.com
arch/arm/dts/imx8mm-binman.dtsi | 136 ++++++++++++++++++ arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 126 ++-------------- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 124 +--------------- .../dts/imx8mm-kontron-n801x-s-u-boot.dtsi | 123 +--------------- arch/arm/dts/imx8mm-venice-u-boot.dtsi | 120 +--------------- arch/arm/dts/imx8mm-verdin-u-boot.dtsi | 123 +--------------- 6 files changed, 156 insertions(+), 596 deletions(-) create mode 100644 arch/arm/dts/imx8mm-binman.dtsi
diff --git a/arch/arm/dts/imx8mm-binman.dtsi b/arch/arm/dts/imx8mm-binman.dtsi new file mode 100644 index 00000000000..2d98c1ef577 --- /dev/null +++ b/arch/arm/dts/imx8mm-binman.dtsi @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: GPL-2.0+ +/*
- Copyright 2021 Toradex
- */
+/ {
binman: binman {
multiple-images;
};
+};
+&binman {
u-boot-spl-ddr {
filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>;
align-size = <4>;
align = <4>;
u-boot-spl {
align-end = <4>;
};
blob_1: blob-ext@1 {
filename = "lpddr4_pmu_train_1d_imem.bin";
size = <0x8000>;
};
blob_2: blob-ext@2 {
filename = "lpddr4_pmu_train_1d_dmem.bin";
size = <0x4000>;
};
blob_3: blob-ext@3 {
filename = "lpddr4_pmu_train_2d_imem.bin";
size = <0x8000>;
};
blob_4: blob-ext@4 {
filename = "lpddr4_pmu_train_2d_dmem.bin";
size = <0x4000>;
};
};
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
blob {
filename = "u-boot-spl-ddr.bin";
};
};
};
itb {
filename = "u-boot.itb";
fit {
description = "Configuration to load ATF before U-Boot";
#address-cells = <1>;
fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
images {
uboot {
description = "U-Boot (64-bit)";
type = "standalone";
arch = "arm64";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
uboot_blob: blob-ext {
filename = "u-boot-nodtb.bin";
};
};
atf {
description = "ARM Trusted Firmware";
type = "firmware";
arch = "arm64";
compression = "none";
load = <0x920000>;
entry = <0x920000>;
atf_blob: blob-ext {
filename = "bl31.bin";
};
};
binman_fip: fip {
description = "Trusted Firmware FIP";
type = "firmware";
arch = "arm64";
compression = "none";
load = <0x40310000>;
};
fdt {
description = "NAME";
type = "flat_dt";
compression = "none";
uboot_fdt_blob: blob-ext {
filename = "u-boot.dtb";
};
};
};
configurations {
default = "conf";
binman_configuration: conf {
description = "NAME";
firmware = "uboot";
loadables = "atf";
fdt = "fdt";
};
};
};
};
imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
spl: blob-ext@1 {
offset = <0x0>;
filename = "spl.bin";
};
binman_uboot: blob-ext@2 {
offset = <0x57c00>;
filename = "u-boot.itb";
};
};
+};
<snip>
diff --git a/arch/arm/dts/imx8mm-venice-u-boot.dtsi b/arch/arm/dts/imx8mm-venice-u-boot.dtsi index e0fa9ff4bfc..1bef06da562 100644 --- a/arch/arm/dts/imx8mm-venice-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-venice-u-boot.dtsi @@ -3,13 +3,10 @@
- Copyright 2021 Gateworks Corporation
*/
+#include "imx8mm-binman.dtsi" #include "imx8mm-u-boot.dtsi"
/ {
binman: binman {
multiple-images;
};
wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;
@@ -72,118 +69,3 @@ &wdog1 { u-boot,dm-spl; };
-&binman {
u-boot-spl-ddr {
filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>;
align-size = <4>;
align = <4>;
u-boot-spl {
align-end = <4>;
};
blob_1: blob-ext@1 {
filename = "lpddr4_pmu_train_1d_imem.bin";
size = <0x8000>;
};
blob_2: blob-ext@2 {
filename = "lpddr4_pmu_train_1d_dmem.bin";
size = <0x4000>;
};
blob_3: blob-ext@3 {
filename = "lpddr4_pmu_train_2d_imem.bin";
size = <0x8000>;
};
blob_4: blob-ext@4 {
filename = "lpddr4_pmu_train_2d_dmem.bin";
size = <0x4000>;
};
};
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
blob {
filename = "u-boot-spl-ddr.bin";
};
};
};
itb {
filename = "u-boot.itb";
fit {
description = "Configuration to load ATF before U-Boot";
#address-cells = <1>;
fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
fit,fdt-list = "of-list";
images {
uboot {
description = "U-Boot (64-bit)";
type = "standalone";
arch = "arm64";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
uboot_blob: blob-ext {
filename = "u-boot-nodtb.bin";
};
};
atf {
description = "ARM Trusted Firmware";
type = "firmware";
arch = "arm64";
compression = "none";
load = <0x920000>;
entry = <0x920000>;
atf_blob: blob-ext {
filename = "bl31.bin";
};
};
@fdt-SEQ {
description = "NAME";
type = "flat_dt";
compression = "none";
};
};
configurations {
default = "@config-DEFAULT-SEQ";
@config-SEQ {
description = "NAME";
firmware = "uboot";
loadables = "atf";
fdt = "fdt-SEQ";
};
};
};
};
Marcel,
This would break imx8mm-venice.
The of-list, @fdt-SEQ and @config-SEQ are required to support automatic generation of fdt and config nodes when you have multiple device-trees. See tools/binman/entries.rst for details.
Currently, imx8mm-venice is the only board that uses multiple dtbs in CONFIG_OF_LIST so this would be the only board broken by your patch. I'm curious if just using the of-list, @fdt-SEQ and @config-SEQ as above works fine for boards with a single dtb? Otherwise I suppose boards like mine can include your common "imx8mm-binman.dtsi" but will have to leave the &binman node override.
Best regards,
Tim