[RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Marcel Ziswiler
marcel at ziswiler.com
Thu Aug 26 14:14:06 CEST 2021
From: Marcel Ziswiler <marcel.ziswiler at 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 at 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 at 1 {
+ filename = "lpddr4_pmu_train_1d_imem.bin";
+ size = <0x8000>;
+ };
+
+ blob_2: blob-ext at 2 {
+ filename = "lpddr4_pmu_train_1d_dmem.bin";
+ size = <0x4000>;
+ };
+
+ blob_3: blob-ext at 3 {
+ filename = "lpddr4_pmu_train_2d_imem.bin";
+ size = <0x8000>;
+ };
+
+ blob_4: blob-ext at 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 at 1 {
+ offset = <0x0>;
+ filename = "spl.bin";
+ };
+
+ binman_uboot: blob-ext at 2 {
+ offset = <0x57c00>;
+ filename = "u-boot.itb";
+ };
+ };
+};
diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
index 3226a244a97..7235763c561 100644
--- a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi
@@ -3,11 +3,9 @@
* Copyright 2019 NXP
*/
-/ {
- binman: binman {
- multiple-images;
- };
+#include "imx8mm-binman.dtsi"
+/ {
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -141,115 +139,19 @@
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 at 1 {
- filename = "lpddr4_pmu_train_1d_imem.bin";
- size = <0x8000>;
- };
+&binman_fip {
+ description = "Trusted Firmware FIP";
+ type = "firmware";
+ arch = "arm64";
+ compression = "none";
+ load = <0x40310000>;
- blob_2: blob-ext at 2 {
- filename = "lpddr4_pmu_train_1d_dmem.bin";
- size = <0x4000>;
- };
-
- blob_3: blob-ext at 3 {
- filename = "lpddr4_pmu_train_2d_imem.bin";
- size = <0x8000>;
- };
-
- blob_4: blob-ext at 4 {
- filename = "lpddr4_pmu_train_2d_dmem.bin";
- size = <0x4000>;
- };
- };
-
- flash {
- mkimage {
- args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
-
- blob {
- filename = "u-boot-spl-ddr.bin";
- };
- };
+ fip_blob {
+ filename = "fip.bin";
+ type = "blob-ext";
};
+};
- 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";
- };
- };
-
- fip {
- description = "Trusted Firmware FIP";
- type = "firmware";
- arch = "arm64";
- compression = "none";
- load = <0x40310000>;
-
- fip_blob: blob-ext{
- filename = "fip.bin";
- };
- };
-
- fdt {
- description = "NAME";
- type = "flat_dt";
- compression = "none";
-
- uboot_fdt_blob: blob-ext {
- filename = "u-boot.dtb";
- };
- };
- };
-
- configurations {
- default = "conf";
-
- conf {
- description = "NAME";
- firmware = "uboot";
- loadables = "atf", "fip";
- fdt = "fdt";
- };
- };
- };
- };
+&binman_configuration {
+ loadables = "atf", "fip";
};
diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
index 3c75415e8fb..6b0d70aa9de 100644
--- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi
@@ -3,13 +3,10 @@
* Copyright 2019 NXP
*/
+#include "imx8mm-binman.dtsi"
#include "imx8mm-u-boot.dtsi"
/ {
- binman: binman {
- multiple-images;
- };
-
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -116,122 +113,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 at 1 {
- filename = "lpddr4_pmu_train_1d_imem.bin";
- size = <0x8000>;
- };
-
- blob_2: blob-ext at 2 {
- filename = "lpddr4_pmu_train_1d_dmem.bin";
- size = <0x4000>;
- };
-
- blob_3: blob-ext at 3 {
- filename = "lpddr4_pmu_train_2d_imem.bin";
- size = <0x8000>;
- };
-
- blob_4: blob-ext at 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";
- };
- };
-
- fdt {
- description = "NAME";
- type = "flat_dt";
- compression = "none";
-
- uboot_fdt_blob: blob-ext {
- filename = "u-boot.dtb";
- };
- };
- };
-
- configurations {
- default = "conf";
-
- conf {
- description = "NAME";
- firmware = "uboot";
- loadables = "atf";
- fdt = "fdt";
- };
- };
- };
- };
-
- imx-boot {
- filename = "flash.bin";
- pad-byte = <0x00>;
-
- spl: blob-ext at 1 {
- offset = <0x0>;
- filename = "spl.bin";
- };
-
- uboot: blob-ext at 2 {
- offset = <0x57c00>;
- filename = "u-boot.itb";
- };
- };
-};
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
index 6f90f4c738c..aa06acbe064 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
@@ -3,6 +3,7 @@
* Copyright (C) 2019 Kontron Electronics GmbH
*/
+#include "imx8mm-binman.dtsi"
#include "imx8mm-u-boot.dtsi"
/ {
@@ -11,10 +12,6 @@
usb1 = &usbotg2;
};
- binman: binman {
- multiple-images;
- };
-
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog1>;
@@ -133,121 +130,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 at 1 {
- filename = "lpddr4_pmu_train_1d_imem.bin";
- size = <0x8000>;
- };
-
- blob_2: blob-ext at 2 {
- filename = "lpddr4_pmu_train_1d_dmem.bin";
- size = <0x4000>;
- };
-
- blob_3: blob-ext at 3 {
- filename = "lpddr4_pmu_train_2d_imem.bin";
- size = <0x8000>;
- };
-
- blob_4: blob-ext at 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";
- };
- };
-
- fdt {
- description = "NAME";
- type = "flat_dt";
- compression = "none";
-
- uboot_fdt_blob: blob-ext {
- filename = "u-boot.dtb";
- };
- };
- };
-
- configurations {
- default = "conf";
-
- conf {
- description = "NAME";
- firmware = "uboot";
- loadables = "atf";
- fdt = "fdt";
- };
- };
- };
- };
-
- imx-boot {
- filename = "flash.bin";
- pad-byte = <0x00>;
-
- spl: blob-ext at 1 {
- offset = <0x0>;
- filename = "spl.bin";
- };
-
- uboot: blob-ext at 2 {
- offset = <0x57c00>;
- filename = "u-boot.itb";
- };
- };
-};
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 at 1 {
- filename = "lpddr4_pmu_train_1d_imem.bin";
- size = <0x8000>;
- };
-
- blob_2: blob-ext at 2 {
- filename = "lpddr4_pmu_train_1d_dmem.bin";
- size = <0x4000>;
- };
-
- blob_3: blob-ext at 3 {
- filename = "lpddr4_pmu_train_2d_imem.bin";
- size = <0x8000>;
- };
-
- blob_4: blob-ext at 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";
- };
- };
- };
- };
-
- imx-boot {
- filename = "flash.bin";
- pad-byte = <0x00>;
-
- spl: blob-ext at 1 {
- filename = "spl.bin";
- offset = <0x0>;
- };
-
- uboot: blob-ext at 2 {
- filename = "u-boot.itb";
- offset = <0x57c00>;
- };
- };
-};
diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
index 6962bb40b6e..5f7636f4450 100644
--- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
@@ -3,13 +3,10 @@
* Copyright 2021 Toradex
*/
+#include "imx8mm-binman.dtsi"
#include "imx8mm-u-boot.dtsi"
/ {
- binman: binman {
- multiple-images;
- };
-
firmware {
optee {
compatible = "linaro,optee-tz";
@@ -100,120 +97,6 @@
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 at 1 {
- filename = "lpddr4_pmu_train_1d_imem.bin";
- size = <0x8000>;
- };
-
- blob_2: blob-ext at 2 {
- filename = "lpddr4_pmu_train_1d_dmem.bin";
- size = <0x4000>;
- };
-
- blob_3: blob-ext at 3 {
- filename = "lpddr4_pmu_train_2d_imem.bin";
- size = <0x8000>;
- };
-
- blob_4: blob-ext at 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";
- };
- };
-
- fdt {
- description = "NAME";
- type = "flat_dt";
- compression = "none";
-
- uboot_fdt_blob: blob-ext {
- filename = "u-boot.dtb";
- };
- };
- };
-
- configurations {
- default = "conf";
-
- conf {
- description = "NAME";
- firmware = "uboot";
- loadables = "atf";
- fdt = "fdt";
- };
- };
- };
- };
-
- imx-boot {
- filename = "flash.bin";
- pad-byte = <0x00>;
-
- spl: blob-ext at 1 {
- offset = <0x0>;
- filename = "spl.bin";
- };
-
- uboot: blob-ext at 2 {
- offset = <0x5fc00>;
- filename = "u-boot.itb";
- };
- };
+&binman_uboot {
+ offset = <0x5fc00>;
};
--
2.26.2
More information about the U-Boot
mailing list