diff mbox series

[v1,5/7] verdin-imx8mm: switch to use binman to pack images

Message ID 20210820205230.1369683-6-marcel@ziswiler.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series board: toradex: verdin-imx8mm: target refresh | expand

Commit Message

Marcel Ziswiler Aug. 20, 2021, 8:52 p.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Use binman to pack images.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 arch/arm/dts/imx8mm-verdin-u-boot.dtsi   | 122 ++++++++++++++++++++++-
 arch/arm/mach-imx/imx8m/Kconfig          |   1 +
 board/toradex/verdin-imx8mm/imximage.cfg |  11 +-
 configs/verdin-imx8mm_defconfig          |   2 +-
 doc/board/toradex/verdin-imx8mm.rst      |  54 +++++-----
 5 files changed, 155 insertions(+), 35 deletions(-)

Comments

Heiko Thiery Aug. 23, 2021, 6:37 a.m. UTC | #1
Hi Marcel,

Am Fr., 20. Aug. 2021 um 22:52 Uhr schrieb Marcel Ziswiler
<marcel@ziswiler.com>:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Use binman to pack images.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> ---
>
>  arch/arm/dts/imx8mm-verdin-u-boot.dtsi   | 122 ++++++++++++++++++++++-
>  arch/arm/mach-imx/imx8m/Kconfig          |   1 +
>  board/toradex/verdin-imx8mm/imximage.cfg |  11 +-
>  configs/verdin-imx8mm_defconfig          |   2 +-
>  doc/board/toradex/verdin-imx8mm.rst      |  54 +++++-----
>  5 files changed, 155 insertions(+), 35 deletions(-)
>
> diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> index a97626fa0c1..ba4c8d0436c 100644
> --- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> @@ -1,11 +1,15 @@
>  // SPDX-License-Identifier: GPL-2.0+ OR MIT
>  /*
> - * Copyright 2020 Toradex
> + * Copyright 2021 Toradex
>   */
>
>  #include "imx8mm-u-boot.dtsi"
>
>  / {
> +       binman: binman {
> +               multiple-images;
> +       };
> +
>         firmware {
>                 optee {
>                         compatible = "linaro,optee-tz";
> @@ -91,3 +95,119 @@
>  &wdog1 {
>         u-boot,dm-spl;
>  };
> +
> +&binman {
> +        u-boot-spl-ddr {
> +               align = <4>;
> +               align-size = <4>;
> +               filename = "u-boot-spl-ddr.bin";
> +               pad-byte = <0xff>;
> +
> +               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 {

Maybe you can add a "filename = spl.bin" property here. So it is more
clear that this is the output file. This should be the one you refer
to in your "board/toradex/verdin-imx8mm/imximage.cfg".

> +               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";
> +                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
> +                       #address-cells = <1>;
> +
> +                       images {
> +                               uboot {
> +                                       arch = "arm64";
> +                                       compression = "none";
> +                                       description = "U-Boot (64-bit)";
> +                                       load = <CONFIG_SYS_TEXT_BASE>;
> +                                       type = "standalone";
> +
> +                                       uboot_blob: blob-ext {
> +                                               filename = "u-boot-nodtb.bin";
> +                                       };
> +                               };
> +
> +                               atf {
> +                                       arch = "arm64";
> +                                       compression = "none";
> +                                       description = "ARM Trusted Firmware";
> +                                       entry = <0x920000>;
> +                                       load = <0x920000>;
> +                                       type = "firmware";
> +
> +                                       atf_blob: blob-ext {
> +                                               filename = "bl31.bin";
> +                                       };
> +                               };
> +
> +                               fdt {
> +                                       compression = "none";
> +                                       description = "NAME";
> +                                       type = "flat_dt";
> +
> +                                       uboot_fdt_blob: blob-ext {
> +                                               filename = "u-boot.dtb";
> +                                       };
> +                               };
> +                       };
> +
> +                       configurations {
> +                               default = "conf";
> +
> +                               conf {
> +                                       description = "NAME";
> +                                       fdt = "fdt";
> +                                       firmware = "uboot";
> +                                       loadables = "atf";
> +                               };
> +                       };
> +               };
> +       };
> +
> +       imx-boot {
> +               filename = "flash.bin";
> +               pad-byte = <0x00>;
> +
> +               spl: blob-ext@1 {
> +                       filename = "spl.bin";
> +                       offset = <0x0>;
> +               };
> +
> +               uboot: blob-ext@2 {
> +                       filename = "u-boot.itb";
> +                       offset = <0x5fc00>;
> +               };
> +       };
> +};
> diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> index a2ba30cf332..3eccc6b4d4f 100644
> --- a/arch/arm/mach-imx/imx8m/Kconfig
> +++ b/arch/arm/mach-imx/imx8m/Kconfig
> @@ -106,6 +106,7 @@ config TARGET_PICO_IMX8MQ
>
>  config TARGET_VERDIN_IMX8MM
>         bool "Support Toradex Verdin iMX8M Mini module"
> +       select BINMAN
>         select IMX8MM
>         select SUPPORT_SPL
>         select IMX8M_LPDDR4
> diff --git a/board/toradex/verdin-imx8mm/imximage.cfg b/board/toradex/verdin-imx8mm/imximage.cfg
> index b8b25ff4201..9bd60e39fb5 100644
> --- a/board/toradex/verdin-imx8mm/imximage.cfg
> +++ b/board/toradex/verdin-imx8mm/imximage.cfg
> @@ -1,16 +1,9 @@
>  /* SPDX-License-Identifier: GPL-2.0+ */
>  /*
> - * Copyright 2020 Toradex
> + * Copyright 2021 Toradex
>   */
>
>  #define __ASSEMBLY__
>
> -FIT
>  BOOT_FROM      emmc_fastboot
> -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
> -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
> -
> -DDR_FW lpddr4_pmu_train_1d_imem.bin
> -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> -DDR_FW lpddr4_pmu_train_2d_imem.bin
> -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> +LOADER         mkimage.spl.mkimage     0x7E1000

I think you should use "spl.bin" here and not the
"mkimage.spl.mkimage". As far as I understand the mkimage files are
only binman temporary files.
Marcel Ziswiler Aug. 23, 2021, 7 a.m. UTC | #2
Hi Heiko

On Mon, 2021-08-23 at 08:37 +0200, Heiko Thiery wrote:
> Hi Marcel,
> 
> Am Fr., 20. Aug. 2021 um 22:52 Uhr schrieb Marcel Ziswiler
> <marcel@ziswiler.com>:
> > 
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > Use binman to pack images.
> > 
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > ---
> > 
> >  arch/arm/dts/imx8mm-verdin-u-boot.dtsi   | 122 ++++++++++++++++++++++-
> >  arch/arm/mach-imx/imx8m/Kconfig          |   1 +
> >  board/toradex/verdin-imx8mm/imximage.cfg |  11 +-
> >  configs/verdin-imx8mm_defconfig          |   2 +-
> >  doc/board/toradex/verdin-imx8mm.rst      |  54 +++++-----
> >  5 files changed, 155 insertions(+), 35 deletions(-)
> > 
> > diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> > index a97626fa0c1..ba4c8d0436c 100644
> > --- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> > +++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
> > @@ -1,11 +1,15 @@
> >  // SPDX-License-Identifier: GPL-2.0+ OR MIT
> >  /*
> > - * Copyright 2020 Toradex
> > + * Copyright 2021 Toradex
> >   */
> > 
> >  #include "imx8mm-u-boot.dtsi"
> > 
> >  / {
> > +       binman: binman {
> > +               multiple-images;
> > +       };
> > +
> >         firmware {
> >                 optee {
> >                         compatible = "linaro,optee-tz";
> > @@ -91,3 +95,119 @@
> >  &wdog1 {
> >         u-boot,dm-spl;
> >  };
> > +
> > +&binman {
> > +        u-boot-spl-ddr {
> > +               align = <4>;
> > +               align-size = <4>;
> > +               filename = "u-boot-spl-ddr.bin";
> > +               pad-byte = <0xff>;
> > +
> > +               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 {
> 
> Maybe you can add a "filename = spl.bin" property here. So it is more
> clear that this is the output file. This should be the one you refer
> to in your "board/toradex/verdin-imx8mm/imximage.cfg".

Yeah, I had this but then decided against it again as others also seem to just rely on binman's default naming
scheme. But I agree it will make it kinda more clear. So let me add it again.

> > +               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";
> > +                       fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
> > +                       #address-cells = <1>;
> > +
> > +                       images {
> > +                               uboot {
> > +                                       arch = "arm64";
> > +                                       compression = "none";
> > +                                       description = "U-Boot (64-bit)";
> > +                                       load = <CONFIG_SYS_TEXT_BASE>;
> > +                                       type = "standalone";
> > +
> > +                                       uboot_blob: blob-ext {
> > +                                               filename = "u-boot-nodtb.bin";
> > +                                       };
> > +                               };
> > +
> > +                               atf {
> > +                                       arch = "arm64";
> > +                                       compression = "none";
> > +                                       description = "ARM Trusted Firmware";
> > +                                       entry = <0x920000>;
> > +                                       load = <0x920000>;
> > +                                       type = "firmware";
> > +
> > +                                       atf_blob: blob-ext {
> > +                                               filename = "bl31.bin";
> > +                                       };
> > +                               };
> > +
> > +                               fdt {
> > +                                       compression = "none";
> > +                                       description = "NAME";
> > +                                       type = "flat_dt";
> > +
> > +                                       uboot_fdt_blob: blob-ext {
> > +                                               filename = "u-boot.dtb";
> > +                                       };
> > +                               };
> > +                       };
> > +
> > +                       configurations {
> > +                               default = "conf";
> > +
> > +                               conf {
> > +                                       description = "NAME";
> > +                                       fdt = "fdt";
> > +                                       firmware = "uboot";
> > +                                       loadables = "atf";
> > +                               };
> > +                       };
> > +               };
> > +       };
> > +
> > +       imx-boot {
> > +               filename = "flash.bin";
> > +               pad-byte = <0x00>;
> > +
> > +               spl: blob-ext@1 {
> > +                       filename = "spl.bin";
> > +                       offset = <0x0>;
> > +               };
> > +
> > +               uboot: blob-ext@2 {
> > +                       filename = "u-boot.itb";
> > +                       offset = <0x5fc00>;
> > +               };
> > +       };
> > +};
> > diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
> > index a2ba30cf332..3eccc6b4d4f 100644
> > --- a/arch/arm/mach-imx/imx8m/Kconfig
> > +++ b/arch/arm/mach-imx/imx8m/Kconfig
> > @@ -106,6 +106,7 @@ config TARGET_PICO_IMX8MQ
> > 
> >  config TARGET_VERDIN_IMX8MM
> >         bool "Support Toradex Verdin iMX8M Mini module"
> > +       select BINMAN
> >         select IMX8MM
> >         select SUPPORT_SPL
> >         select IMX8M_LPDDR4
> > diff --git a/board/toradex/verdin-imx8mm/imximage.cfg b/board/toradex/verdin-imx8mm/imximage.cfg
> > index b8b25ff4201..9bd60e39fb5 100644
> > --- a/board/toradex/verdin-imx8mm/imximage.cfg
> > +++ b/board/toradex/verdin-imx8mm/imximage.cfg
> > @@ -1,16 +1,9 @@
> >  /* SPDX-License-Identifier: GPL-2.0+ */
> >  /*
> > - * Copyright 2020 Toradex
> > + * Copyright 2021 Toradex
> >   */
> > 
> >  #define __ASSEMBLY__
> > 
> > -FIT
> >  BOOT_FROM      emmc_fastboot
> > -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
> > -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
> > -
> > -DDR_FW lpddr4_pmu_train_1d_imem.bin
> > -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> > -DDR_FW lpddr4_pmu_train_2d_imem.bin
> > -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> > +LOADER         mkimage.spl.mkimage     0x7E1000
> 
> I think you should use "spl.bin" here and not the
> "mkimage.spl.mkimage". As far as I understand the mkimage files are
> only binman temporary files.

Oh, OK. I just did what everybody else did. But your suggestion kinda makes sense. Let me try this. Thanks!

Cheers

Marcel
Marcel Ziswiler Aug. 23, 2021, 10:02 a.m. UTC | #3
Hi Heiko

On Mon, 2021-08-23 at 08:37 +0200, Heiko Thiery wrote:

> ...
> > diff --git a/board/toradex/verdin-imx8mm/imximage.cfg b/board/toradex/verdin-imx8mm/imximage.cfg
> > index b8b25ff4201..9bd60e39fb5 100644
> > --- a/board/toradex/verdin-imx8mm/imximage.cfg
> > +++ b/board/toradex/verdin-imx8mm/imximage.cfg
> > @@ -1,16 +1,9 @@
> >  /* SPDX-License-Identifier: GPL-2.0+ */
> >  /*
> > - * Copyright 2020 Toradex
> > + * Copyright 2021 Toradex
> >   */
> > 
> >  #define __ASSEMBLY__
> > 
> > -FIT
> >  BOOT_FROM      emmc_fastboot
> > -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
> > -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
> > -
> > -DDR_FW lpddr4_pmu_train_1d_imem.bin
> > -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> > -DDR_FW lpddr4_pmu_train_2d_imem.bin
> > -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> > +LOADER         mkimage.spl.mkimage     0x7E1000
> 
> I think you should use "spl.bin" here and not the
> "mkimage.spl.mkimage". As far as I understand the mkimage files are
> only binman temporary files.

Unfortunately, that does not seem to work:

binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000
./mkimage-out.spl.mkimage': spl.bin: Can't open: No such file or directory

Thinking about it, I guess, it is a chicken/egg problem. As it is that step of binman which actually creates
spl.bin from this mkimage.spl.mkimage intermediate artifact, not?

Cheers

Marcel
Heiko Thiery Aug. 23, 2021, 10:43 a.m. UTC | #4
Hi Marcel,

Am Mo., 23. Aug. 2021 um 12:02 Uhr schrieb Marcel Ziswiler
<marcel.ziswiler@toradex.com>:
>
> Hi Heiko
>
> On Mon, 2021-08-23 at 08:37 +0200, Heiko Thiery wrote:
>
> > ...
> > > diff --git a/board/toradex/verdin-imx8mm/imximage.cfg b/board/toradex/verdin-imx8mm/imximage.cfg
> > > index b8b25ff4201..9bd60e39fb5 100644
> > > --- a/board/toradex/verdin-imx8mm/imximage.cfg
> > > +++ b/board/toradex/verdin-imx8mm/imximage.cfg
> > > @@ -1,16 +1,9 @@
> > >  /* SPDX-License-Identifier: GPL-2.0+ */
> > >  /*
> > > - * Copyright 2020 Toradex
> > > + * Copyright 2021 Toradex
> > >   */
> > >
> > >  #define __ASSEMBLY__
> > >
> > > -FIT
> > >  BOOT_FROM      emmc_fastboot
> > > -LOADER         spl/u-boot-spl-ddr.bin  0x7E1000
> > > -SECOND_LOADER  u-boot.itb              0x40200000 0x60000
> > > -
> > > -DDR_FW lpddr4_pmu_train_1d_imem.bin
> > > -DDR_FW lpddr4_pmu_train_1d_dmem.bin
> > > -DDR_FW lpddr4_pmu_train_2d_imem.bin
> > > -DDR_FW lpddr4_pmu_train_2d_dmem.bin
> > > +LOADER         mkimage.spl.mkimage     0x7E1000
> >
> > I think you should use "spl.bin" here and not the
> > "mkimage.spl.mkimage". As far as I understand the mkimage files are
> > only binman temporary files.
>
> Unfortunately, that does not seem to work:
>
> binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000
> ./mkimage-out.spl.mkimage': spl.bin: Can't open: No such file or directory
>
> Thinking about it, I guess, it is a chicken/egg problem. As it is that step of binman which actually creates
> spl.bin from this mkimage.spl.mkimage intermediate artifact, not?

Sorry for the confusion. It was my fault to say spl.bin is required in
the imximage.cfg. The right file should be "u-boot-spl-ddr.bin". This
is the input for the mkimage. Isn't it?
diff mbox series

Patch

diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
index a97626fa0c1..ba4c8d0436c 100644
--- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi
@@ -1,11 +1,15 @@ 
 // SPDX-License-Identifier: GPL-2.0+ OR MIT
 /*
- * Copyright 2020 Toradex
+ * Copyright 2021 Toradex
  */
 
 #include "imx8mm-u-boot.dtsi"
 
 / {
+	binman: binman {
+		multiple-images;
+	};
+
 	firmware {
 		optee {
 			compatible = "linaro,optee-tz";
@@ -91,3 +95,119 @@ 
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&binman {
+	 u-boot-spl-ddr {
+		align = <4>;
+		align-size = <4>;
+		filename = "u-boot-spl-ddr.bin";
+		pad-byte = <0xff>;
+
+		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 {
+		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";
+			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
+			#address-cells = <1>;
+
+			images {
+				uboot {
+					arch = "arm64";
+					compression = "none";
+					description = "U-Boot (64-bit)";
+					load = <CONFIG_SYS_TEXT_BASE>;
+					type = "standalone";
+
+					uboot_blob: blob-ext {
+						filename = "u-boot-nodtb.bin";
+					};
+				};
+
+				atf {
+					arch = "arm64";
+					compression = "none";
+					description = "ARM Trusted Firmware";
+					entry = <0x920000>;
+					load = <0x920000>;
+					type = "firmware";
+
+					atf_blob: blob-ext {
+						filename = "bl31.bin";
+					};
+				};
+
+				fdt {
+					compression = "none";
+					description = "NAME";
+					type = "flat_dt";
+
+					uboot_fdt_blob: blob-ext {
+						filename = "u-boot.dtb";
+					};
+				};
+			};
+
+			configurations {
+				default = "conf";
+
+				conf {
+					description = "NAME";
+					fdt = "fdt";
+					firmware = "uboot";
+					loadables = "atf";
+				};
+			};
+		};
+	};
+
+	imx-boot {
+		filename = "flash.bin";
+		pad-byte = <0x00>;
+
+		spl: blob-ext@1 {
+			filename = "spl.bin";
+			offset = <0x0>;
+		};
+
+		uboot: blob-ext@2 {
+			filename = "u-boot.itb";
+			offset = <0x5fc00>;
+		};
+	};
+};
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index a2ba30cf332..3eccc6b4d4f 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -106,6 +106,7 @@  config TARGET_PICO_IMX8MQ
 
 config TARGET_VERDIN_IMX8MM
 	bool "Support Toradex Verdin iMX8M Mini module"
+	select BINMAN
 	select IMX8MM
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
diff --git a/board/toradex/verdin-imx8mm/imximage.cfg b/board/toradex/verdin-imx8mm/imximage.cfg
index b8b25ff4201..9bd60e39fb5 100644
--- a/board/toradex/verdin-imx8mm/imximage.cfg
+++ b/board/toradex/verdin-imx8mm/imximage.cfg
@@ -1,16 +1,9 @@ 
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2020 Toradex
+ * Copyright 2021 Toradex
  */
 
 #define __ASSEMBLY__
 
-FIT
 BOOT_FROM	emmc_fastboot
-LOADER		spl/u-boot-spl-ddr.bin	0x7E1000
-SECOND_LOADER	u-boot.itb		0x40200000 0x60000
-
-DDR_FW lpddr4_pmu_train_1d_imem.bin
-DDR_FW lpddr4_pmu_train_1d_dmem.bin
-DDR_FW lpddr4_pmu_train_2d_imem.bin
-DDR_FW lpddr4_pmu_train_2d_dmem.bin
+LOADER		mkimage.spl.mkimage	0x7E1000
diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index 624f1b99096..b323ceb19af 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -24,7 +24,7 @@  CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
+# CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/verdin-imx8mm/imximage.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set
diff --git a/doc/board/toradex/verdin-imx8mm.rst b/doc/board/toradex/verdin-imx8mm.rst
index b9f7dc39c96..538ac30dc12 100644
--- a/doc/board/toradex/verdin-imx8mm.rst
+++ b/doc/board/toradex/verdin-imx8mm.rst
@@ -34,10 +34,10 @@  Get the DDR Firmware
 .. code-block:: bash
 
     $ cd ..
-    $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin
-    $ chmod +x firmware-imx-8.4.1.bin
-    $ ./firmware-imx-8.4.1.bin
-    $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./
+    $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.1.bin
+    $ chmod +x firmware-imx-8.10.1.bin
+    $ ./firmware-imx-8.10.1.bin
+    $ cp firmware-imx-8.10.1/firmware/ddr/synopsys/lpddr4*.bin ./
 
 Build U-Boot
 ------------
@@ -46,7 +46,7 @@  Build U-Boot
     $ export CROSS_COMPILE=aarch64-linux-gnu-
     $ export ATF_LOAD_ADDR=0x920000
     $ make verdin-imx8mm_defconfig
-    $ make flash.bin
+    $ make
 
 Flash to eMMC
 -------------
@@ -77,22 +77,28 @@  Boot sequence is:
 Output:
 
 .. code-block:: bash
-
-    U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
-    Normal Boot
-    Trying to boot from MMC1
-
-    U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
-
-    CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
-    Reset cause: POR
-    DRAM:  2 GiB
-    MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
-    Loading Environment from MMC... OK
-    In:    serial
-    Out:   serial
-    Err:   serial
-    Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial:
-    Net:   eth0: ethernet@30be0000
-    Hit any key to stop autoboot:  0
-    Verdin iMX8MM #
+U-Boot SPL 2021.10-rc2-00021-gfb148bbd529 (Aug 20 2021 - 22:11:20 +0200)
+Normal Boot
+WDT:   Started with servicing (60s timeout)
+Trying to boot from MMC1
+NOTICE:  BL31: v2.2(release):rel_imx_5.4.70_2.3.2_rc1-5-g835a8f67b
+NOTICE:  BL31: Built : 18:02:12, Aug 16 2021
+
+
+U-Boot 2021.10-rc2-00021-gfb148bbd529 (Aug 20 2021 - 22:11:20 +0200)
+
+imx_wdt watchdog@30280000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
+CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
+Reset cause: POR
+DRAM:  2 GiB
+WDT:   Started with servicing (60s timeout)
+MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
+Loading Environment from MMC... OK
+In:    serial
+Out:   serial
+Err:   serial
+Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.1A, Serial# 06760554
+Carrier: Toradex Dahlia V1.1A, Serial# 10763237
+Net:   eth0: ethernet@30be0000
+Hit any key to stop autoboot:  0
+Verdin iMX8MM #