[PATCH 1/2] ARM: imx: imx8mn-evk: generate a single bootable flash.bin

To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com --- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 3db46d4cbc..d1427941eb 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -58,7 +58,9 @@ };
- flash { + spl { + filename = "spl.bin"; + mkimage { args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
@@ -125,4 +127,19 @@ }; }; }; + + imx-boot { + filename = "flash.bin"; + pad-byte = <0x00>; + + spl: blob-ext@1 { + offset = <0x0>; + filename = "spl.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x58000>; + filename = "u-boot.itb"; + }; + }; };

To have only one place to describe the binman images us the imx8mn-u-boot.dtsi. To have support for different DDR firmwares this nodes are included dependent on the used DDR config option.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com --- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 125 +----------------- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 120 +---------------- arch/arm/dts/imx8mn-u-boot.dtsi | 156 +++++++++++++++++++++++ 3 files changed, 159 insertions(+), 242 deletions(-) create mode 100644 arch/arm/dts/imx8mn-u-boot.dtsi
diff --git a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi index 2e39790766..ce06e7d797 100644 --- a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi @@ -3,11 +3,9 @@ * Copyright 2019 NXP */
-/ { - binman: binman { - multiple-images; - }; +#include "imx8mn-u-boot.dtsi"
+/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -123,122 +121,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 = "ddr4_imem_1d_201810.bin"; - size = <0x8000>; - }; - - blob_2: blob-ext@2 { - filename = "ddr4_dmem_1d_201810.bin"; - size = <0x4000>; - }; - - blob_3: blob-ext@3 { - filename = "ddr4_imem_2d_201810.bin"; - size = <0x8000>; - }; - - blob_4: blob-ext@4 { - filename = "ddr4_dmem_2d_201810.bin"; - size = <0x4000>; - }; - }; - - - spl { - filename = "spl.bin"; - - mkimage { - args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000"; - - 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 = <0x960000>; - entry = <0x960000>; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x58000>; - filename = "u-boot.itb"; - }; - }; -}; diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index d1427941eb..339c3dd681 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -3,6 +3,7 @@ * Copyright 2019 NXP */
+#include "imx8mn-u-boot.dtsi" #include "imx8mn-ddr4-evk-u-boot.dtsi"
&i2c1 { @@ -24,122 +25,3 @@ &pinctrl_pmic { 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 0x912000"; - - 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 = <0x960000>; - entry = <0x960000>; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x58000>; - filename = "u-boot.itb"; - }; - }; -}; diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi new file mode 100644 index 0000000000..7b591085a0 --- /dev/null +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2019 NXP + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { + u_boot_spl_ddr: u-boot-spl-ddr { + filename = "u-boot-spl-ddr.bin"; + pad-byte = <0xff>; + align-size = <4>; + align = <4>; + + u-boot-spl { + align-end = <4>; + }; + }; + + spl { + filename = "spl.bin"; + + mkimage { + args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000"; + + 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 = <0x960000>; + entry = <0x960000>; + + 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@1 { + offset = <0x0>; + filename = "spl.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x58000>; + filename = "u-boot.itb"; + }; + }; +}; + +#ifdef CONFIG_IMX8M_DDR4 +&u_boot_spl_ddr { + blob_1: blob-ext@1 { + filename = "ddr4_imem_1d_201810.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "ddr4_dmem_1d_201810.bin"; + size = <0x4000>; + }; + + blob_3: blob-ext@3 { + filename = "ddr4_imem_2d_201810.bin"; + size = <0x8000>; + }; + + blob_4: blob-ext@4 { + filename = "ddr4_dmem_2d_201810.bin"; + size = <0x4000>; + }; +}; +#elif CONFIG_IMX8M_LPDDR4 +&u_boot_spl_ddr { + 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>; + }; +}; +#else + #error "no valid ddr config selected" +#endif

On Thu, Feb 24, 2022 at 6:47 AM Heiko Thiery heiko.thiery@gmail.com wrote:
To have only one place to describe the binman images us the imx8mn-u-boot.dtsi. To have support for different DDR firmwares this nodes are included dependent on the used DDR config option.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
Reviewed-by: Fabio Estevam festevam@gmail.com

Subject: [PATCH 2/2] ARM: imx: imx8mn-evk: use one common u-boot.dtsi for the evk boards
To have only one place to describe the binman images us the imx8mn-u-boot.dtsi. To have support for different DDR firmwares this nodes are included dependent on the used DDR config option.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
Good cleanup. Reviewed-by: Peng Fan peng.fan@nxp.com
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 125 +----------------- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 120 +---------------- arch/arm/dts/imx8mn-u-boot.dtsi | 156 +++++++++++++++++++++++ 3 files changed, 159 insertions(+), 242 deletions(-) create mode 100644 arch/arm/dts/imx8mn-u-boot.dtsi
diff --git a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi index 2e39790766..ce06e7d797 100644 --- a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi @@ -3,11 +3,9 @@
- Copyright 2019 NXP
*/
-/ {
- binman: binman {
multiple-images;
- };
+#include "imx8mn-u-boot.dtsi"
+/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -123,122 +121,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 = "ddr4_imem_1d_201810.bin";
size = <0x8000>;
};
blob_2: blob-ext@2 {
filename = "ddr4_dmem_1d_201810.bin";
size = <0x4000>;
};
blob_3: blob-ext@3 {
filename = "ddr4_imem_2d_201810.bin";
size = <0x8000>;
};
blob_4: blob-ext@4 {
filename = "ddr4_dmem_2d_201810.bin";
size = <0x4000>;
};
- };
- spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
- };
-}; diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index d1427941eb..339c3dd681 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -3,6 +3,7 @@
- Copyright 2019 NXP
*/
+#include "imx8mn-u-boot.dtsi" #include "imx8mn-ddr4-evk-u-boot.dtsi"
&i2c1 { @@ -24,122 +25,3 @@ &pinctrl_pmic { 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 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
- };
-}; diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi new file mode 100644 index 0000000000..7b591085a0 --- /dev/null +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0+ +/*
- Copyright 2019 NXP
- */
+/ {
- binman: binman {
multiple-images;
- };
+};
+&binman {
u_boot_spl_ddr: u-boot-spl-ddr {
filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>;
align-size = <4>;
align = <4>;
u-boot-spl {
align-end = <4>;
};
- };
- spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
- };
+};
+#ifdef CONFIG_IMX8M_DDR4 +&u_boot_spl_ddr {
- blob_1: blob-ext@1 {
filename = "ddr4_imem_1d_201810.bin";
size = <0x8000>;
- };
- blob_2: blob-ext@2 {
filename = "ddr4_dmem_1d_201810.bin";
size = <0x4000>;
- };
- blob_3: blob-ext@3 {
filename = "ddr4_imem_2d_201810.bin";
size = <0x8000>;
- };
- blob_4: blob-ext@4 {
filename = "ddr4_dmem_2d_201810.bin";
size = <0x4000>;
- };
+}; +#elif CONFIG_IMX8M_LPDDR4 +&u_boot_spl_ddr {
- 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>;
- };
+}; +#else
- #error "no valid ddr config selected"
+#endif
2.30.2

On Thu, Feb 24, 2022 at 1:47 AM Heiko Thiery heiko.thiery@gmail.com wrote:
To have only one place to describe the binman images us the imx8mn-u-boot.dtsi. To have support for different DDR firmwares this nodes are included dependent on the used DDR config option.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 125 +----------------- arch/arm/dts/imx8mn-evk-u-boot.dtsi | 120 +---------------- arch/arm/dts/imx8mn-u-boot.dtsi | 156 +++++++++++++++++++++++ 3 files changed, 159 insertions(+), 242 deletions(-) create mode 100644 arch/arm/dts/imx8mn-u-boot.dtsi
diff --git a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi index 2e39790766..ce06e7d797 100644 --- a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi @@ -3,11 +3,9 @@
- Copyright 2019 NXP
*/
-/ {
binman: binman {
multiple-images;
};
+#include "imx8mn-u-boot.dtsi"
+/ { wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -123,122 +121,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 = "ddr4_imem_1d_201810.bin";
size = <0x8000>;
};
blob_2: blob-ext@2 {
filename = "ddr4_dmem_1d_201810.bin";
size = <0x4000>;
};
blob_3: blob-ext@3 {
filename = "ddr4_imem_2d_201810.bin";
size = <0x8000>;
};
blob_4: blob-ext@4 {
filename = "ddr4_dmem_2d_201810.bin";
size = <0x4000>;
};
};
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
};
-}; diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index d1427941eb..339c3dd681 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -3,6 +3,7 @@
- Copyright 2019 NXP
*/
+#include "imx8mn-u-boot.dtsi" #include "imx8mn-ddr4-evk-u-boot.dtsi"
&i2c1 { @@ -24,122 +25,3 @@ &pinctrl_pmic { 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 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
};
-}; diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi new file mode 100644 index 0000000000..7b591085a0 --- /dev/null +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0+ +/*
- Copyright 2019 NXP
- */
+/ {
binman: binman {
multiple-images;
};
+};
+&binman {
u_boot_spl_ddr: u-boot-spl-ddr {
filename = "u-boot-spl-ddr.bin";
pad-byte = <0xff>;
align-size = <4>;
align = <4>;
u-boot-spl {
align-end = <4>;
};
};
spl {
filename = "spl.bin";
mkimage {
args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
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 = <0x960000>;
entry = <0x960000>;
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";
};
};
};
};
Heiko,
Thanks for doing this.
If we can add multi-fdt support by adding 'fit,fdt-list = "of-list"' and @fdt-SEQ this would work for the recently merged imx8mn-venice-gw7902 support as well.
I could do that as a follow-up if needed.
Best Regards,
Tim

Hi Tim and all,
[...]
Heiko,
Thanks for doing this.
If we can add multi-fdt support by adding 'fit,fdt-list = "of-list"' and @fdt-SEQ this would work for the recently merged imx8mn-venice-gw7902 support as well.
Maybe it would be a good idea to have one binman file for all imx8 boards? Currently every imx8 platform has its own stuff in the corresponding imx8{mn,mq,mn,mm}-u-boot.dtsi although the image creation is always the same. I think about something like imx8-image-u-boot.dtsi or imx8-binman-u-boot.dtsi that holds one common image generation definition. But I saw that there are some boards that have e.g. fip/optee nodes and currently I do not know if we can include that in a common way.
I could do that as a follow-up if needed.
Best Regards,
Tim

Hi Heiko,
On Thu, Feb 24, 2022 at 6:46 AM Heiko Thiery heiko.thiery@gmail.com wrote:
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
Thanks for doing this.
Reviewed-by: Fabio Estevam festevam@gmail.com

Subject: [PATCH 1/2] ARM: imx: imx8mn-evk: generate a single bootable flash.bin
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
Reviewed-by: Peng Fan peng.fan@nxp.com
arch/arm/dts/imx8mn-evk-u-boot.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 3db46d4cbc..d1427941eb 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -58,7 +58,9 @@ };
- flash {
- spl {
filename = "spl.bin";
- mkimage { args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x912000";
@@ -125,4 +127,19 @@ }; }; };
- imx-boot {
filename = "flash.bin";
pad-byte = <0x00>;
spl: blob-ext@1 {
offset = <0x0>;
filename = "spl.bin";
};
uboot: blob-ext@2 {
offset = <0x58000>;
filename = "u-boot.itb";
};
- };
};
2.30.2

On 2/24/22 10:46, Heiko Thiery wrote:
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
arch/arm/dts/imx8mn-evk-u-boot.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 3db46d4cbc..d1427941eb 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -58,7 +58,9 @@ };
Isn't there imx8mn-u-boot.dtsi you can include instead ? There is one for 8mp and 8mm .

Hi Marek,
Am Do., 24. Feb. 2022 um 15:13 Uhr schrieb Marek Vasut marex@denx.de:
On 2/24/22 10:46, Heiko Thiery wrote:
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
arch/arm/dts/imx8mn-evk-u-boot.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 3db46d4cbc..d1427941eb 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -58,7 +58,9 @@ };
Isn't there imx8mn-u-boot.dtsi you can include instead ? There is one for 8mp and 8mm .
This is what I've done in the second patch. The first one only enables the complete flash.bin for this board and the second one creates a common imx8mn-u-boot.dtsi.

On 2/24/22 16:08, Heiko Thiery wrote:
Hi Marek,
Am Do., 24. Feb. 2022 um 15:13 Uhr schrieb Marek Vasut marex@denx.de:
On 2/24/22 10:46, Heiko Thiery wrote:
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards.
Signed-off-by: Heiko Thiery heiko.thiery@gmail.com
arch/arm/dts/imx8mn-evk-u-boot.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index 3db46d4cbc..d1427941eb 100644 --- a/arch/arm/dts/imx8mn-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-evk-u-boot.dtsi @@ -58,7 +58,9 @@ };
Isn't there imx8mn-u-boot.dtsi you can include instead ? There is one for 8mp and 8mm .
This is what I've done in the second patch. The first one only enables the complete flash.bin for this board and the second one creates a common imx8mn-u-boot.dtsi.
Ah, OK.
participants (5)
-
Fabio Estevam
-
Heiko Thiery
-
Marek Vasut
-
Peng Fan (OSS)
-
Tim Harvey