arm64: dts: imx8mm: add common -binman.dtsi and further clean-up
Subsystems (2)
cover arm64: dts: imx8mm: add common -binman.dtsi and further clean-up
From: Marcel Ziswiler <[email protected]>
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.
The initial patch fixes an issue with intermediate binary naming for the imx8mm-cl-iot-gate. And subsequent patches further clean up that dtsi.
This series is based on Peng's binman conversion of late [1], my Verdin iMX8M Mini target refresh [2], Fabio's generating a single bootable flash.bin again for imx8mm-evk [3], Tim's switching imx8mm_venice to using binman to pack images [4] and Frieder's support for Kontron Electronics i.MX6UL/ULL and i.MX8MM SoMs [5].
This series has been run-time tested on Verdin iMX8M Mini. The other targets were only compile tested.
Please note that for now, I left out the following intricacies of imx8mm-venice-u-boot.dtsi. Not quite sure what exactly those are used for.
fit,fdt-list = "of-list";
...
@fdt-SEQ {
...
default = "@config-DEFAULT-SEQ";
...
@config-SEQ {
...
fdt = "fdt-SEQ";[1] https://marc.info/?l=u-boot&m=162908367004699
[2] https://marc.info/?l=u-boot&m=162990457410422
[3] https://marc.info/?l=u-boot&m=162972343709264
[4] https://marc.info/?l=u-boot&m=162983187605276
[5] https://marc.info/?l=u-boot&m=162972880612450
Changes in v1:
- This was suggested by Simon on my earlier patch set upon which we decided to first break this up into a common binman dtsi and then subsequently do such further improvements.
Marcel Ziswiler (5):
imx8mm-cl-iot-gate: fix imximage intermediate binary naming
arm64: dts: imx8mm: add common -binman.dtsi
arm64: dts: imx8mm-binman.dtsi: alphabetically re-order properties
arm64: dts: imx8mm-binman.dtsi: explicitly add spl filename
arm64: dts: imx8mm-binman.dtsi: improve odd blob-ext naming
arch/arm/dts/imx8mm-binman.dtsi | 146 ++++++++++++++++++ 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 +-------------- .../imximage-8mm-lpddr4.cfg | 2 +- 7 files changed, 167 insertions(+), 597 deletions(-) create mode 100644 arch/arm/dts/imx8mm-binman.dtsi
Signature · 1 line
2.26.2
RFC PATCH 1/5 imx8mm-cl-iot-gate: fix imximage intermediate binary naming
From: Marcel Ziswiler <[email protected]>
This fixes the following build time issue:
...
BINMAN all
binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n
spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 ./mkimage-out.spl.mkimage': mkimage.flash.mkimage: Can't open: No such file or directory
make: *** [Makefile:1094: all] Error 1
---
board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg +1 -1
@@ -6,4 +6,4 @@ #define __ASSEMBLY__ BOOT_FROM sd -LOADER mkimage.flash.mkimage 0x7E1000 +LOADER u-boot-spl-ddr.bin 0x7e1000
Signature · 1 line
2.26.2
RFC PATCH 2/5 arm64: dts: imx8mm: add common -binman.dtsi
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
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.
---
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
arch/arm/dts/imx8mm-binman.dtsi new file +136 -0
@@ -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"; + }; + }; +};
arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +14 -112
140 lines not on this page · raw message
arch/arm/dts/imx8mm-evk-u-boot.dtsi +1 -123
136 lines not on this page · raw message
arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi +1 -122
138 lines not on this page · raw message
arch/arm/dts/imx8mm-venice-u-boot.dtsi +1 -119
132 lines not on this page · raw message
arch/arm/dts/imx8mm-verdin-u-boot.dtsi +3 -120
136 lines not on this page · raw message
Signature · 1 line
2.26.2
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Quoted 163 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
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.dtsiwhich covers the common part of that configuration.Signed-off-by Marcel Ziswiler <[email protected]>---
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.dtsiarch/arm/dts/imx8mm-binman.dtsi new file +136
-0@@ -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>
Quoted 113 lines
arch/arm/dts/imx8mm-venice-u-boot.dtsi +1
-94@@ -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"; -
arch/arm/dts/imx8mm-venice-u-boot.dtsi line 174
Quoted 10 lines
arch/arm/dts/imx8mm-venice-u-boot.dtsi +0
-10- @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
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Hi Tim
Quoted 4 lines · Tim Harvey
...
Marcel,This would break imx8mm-venice.
Sure, that's why I made it an RFC. I was just missing some context.
Quoted 3 lines
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.rstfor details.
Thanks for that pointer, that explains a lot.
Quoted 6 lines
Currently, imx8mm-venice is the only board that uses multiple dtbs in
CONFIG_OF_LISTso 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.
Yes, let me investigate further and find a suitable solution. Expect a v2 with that shortly.
Quoted 3 lines
Best regards,
Tim
Cheers
Marcel
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
In reply to Tim HarveyHi Tim
Quoted 5 lines · Tim Harvey
...
Marcel,This would break imx8mm-venice.
Quoted 8 lines
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.rstfor details.Currently, imx8mm-venice is the only board that uses multiple dtbs in
CONFIG_OF_LISTso 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?
Yes, I verified that now and will be sending a v2 with that shortly. Thanks!
Quoted 7 lines
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
Cheers
Marcel
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
In reply to Marcel ZiswilerHello Marcel,
Am Donnerstag, den 26.08.2021, 14:14 +0200 schrieb Marcel Ziswiler:
arch/arm/dts/imx8mm-binman.dtsi
Quoted 31 lines
From: Marcel Ziswiler <[email protected]>
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 commonimx8mm-binman.dtsiwhich covers the common part of that configuration.Signed-off-by Marcel Ziswiler <[email protected]>---
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.dtsiarch/arm/dts/imx8mm- renamed from arch/arm/dts/imx8mm-binman.dtsi +0
-0
binman.dtsi
new file mode 100644
index 00000000000..2d98c1ef577arch/arm/dts/imx8mm-binman.dtsi new file +0
-0
is it really necessary to create a new binman include? I have added the nodes for imx8mp directly to the imx8mp-u-boot.dtsi. I guess you did this because not all boards are converted yet. But I have tried this when I moved binman to the common include for imx8mp. As the phycore- imx8mp was also not converted at that point. It did not hurt having the binman nodes included. At least back then.
I just not like to see that the file structure diverges. If there is a good reason I'd rather also move the binman nodes for imx8mp to a imx8mp-binman.dtsi.
Regards,
Teresa
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Hi Teresa
Quoted 28 lines · Teresa Remmet
Hello Marcel,
Am Donnerstag, den 26.08.2021, 14:14 +0200 schrieb Marcel Ziswiler:
Quoted 25 lines
From: Marcel Ziswiler <[email protected]>
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 commonimx8mm-binman.dtsiwhich covers the common part of that configuration.Signed-off-by Marcel Ziswiler <[email protected]>---
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
Quoted 8 lines
arch/arm/dts/imx8mm-binman.dtsi
Quoted 6 lines
arch/arm/dts/imx8mm- renamed from arch/arm/dts/imx8mm-binman.dtsi +0
-0
binman.dtsi
new file mode 100644
index 00000000000..2d98c1ef577arch/arm/dts/imx8mm-binman.dtsi new file +0
-0is it really necessary to create a new binman include?
No, I guess not. That's just what we loosely discussed. But this is also exactly why I only posted it as an RFC to get such feedback.
Quoted 6 lines
I have added the
nodes for imx8mp directly to theimx8mp-u-boot.dtsi. I guess you did this because not all boards are converted yet. But I have tried this when I moved binman to the common include for imx8mp. As the phycore- imx8mp was also not converted at that point. It did not hurt having the binman nodes included. At least back then.
Yes, maybe we can indeed just put it all into the same imx8mp-u-boot.dtsi. If nobody objects to that idea I can try it that way for a v2.
Quoted 3 lines
I just not like to see that the file structure diverges. If there is a good reason I'd rather also move the binman nodes for imx8mp to a
imx8mp-binman.dtsi.
No, I guess either way will work. Let's hope we get some more feedback on what the others prefer. Thanks!
Quoted 2 lines
Regards,
Teresa
Cheers
Marcel
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Quoted 55 lines · Marcel Ziswiler
Hi Teresa
Quoted 28 lines · Teresa Remmet
Hello Marcel,
Am Donnerstag, den 26.08.2021, 14:14 +0200 schrieb Marcel Ziswiler:
Quoted 25 lines
From: Marcel Ziswiler <[email protected]>
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 commonimx8mm-binman.dtsiwhich covers the common part of that configuration.Signed-off-by Marcel Ziswiler <[email protected]>---
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.dtsiQuoted 8 lines
arch/arm/dts/imx8mm-binman.dtsi
Quoted 6 lines
arch/arm/dts/imx8mm- renamed from arch/arm/dts/imx8mm-binman.dtsi +0
-0
binman.dtsi
new file mode 100644
index 00000000000..2d98c1ef577arch/arm/dts/imx8mm-binman.dtsi new file +0
-0is it really necessary to create a new binman include?
No, I guess not. That's just what we loosely discussed. But this is also exactly why I only posted it as an RFC to get such feedback.
Quoted 6 lines
I have added the
nodes for imx8mp directly to theimx8mp-u-boot.dtsi. I guess you did this because not all boards are converted yet. But I have tried this when I moved binman to the common include for imx8mp. As the phycore- imx8mp was also not converted at that point. It did not hurt having the binman nodes included. At least back then.Yes, maybe we can indeed just put it all into the same
imx8mp-u-boot.dtsi. If nobody objects to that idea I can try it that way for a v2.
Quoted 6 lines
Quoted 3 lines
I just not like to see that the file structure diverges. If there is a good reason I'd rather also move the binman nodes for imx8mp to a
imx8mp-binman.dtsi.No, I guess either way will work. Let's hope we get some more feedback on what the others prefer. Thanks!
I'm not sure if I understand correctly but if the suggestion is to create a dtsi that is shared between the imx8mm and imx8mp I don't think that would be a good idea as there are differences in addresses and such. In fact, there's a difference in DDR training firmware between ddr3 and lpddr4 so trying to even combine them into an imx8mm-u-boot.dtsi doesn't even make sense to me. If anything maybe it should be a imx8mm-binman-lpddr4-u-boot.dtsi or something like that? Perhaps ifdef's could handle these differences allowing you to combine ddr types and SoC's?
Tim
Re: [RFC PATCH v1 2/5] arm64: dts: imx8mm: add common -binman.dtsi
Hi Tim
Quoted 28 lines · Tim Harvey
...
Quoted 20 lines
Quoted 3 lines
Quoted 1 line
+++
b/arch/arm/dts/imx8mm-binman.dtsiis it really necessary to create a new binman include?
No, I guess not. That's just what we loosely discussed. But this is also exactly why I only posted it as an RFC
to get such feedback.Quoted 6 lines
I have added the
nodes for imx8mp directly to theimx8mp-u-boot.dtsi. I guess you did this because not all boards are converted yet. But I have tried this when I moved binman to the common include for imx8mp. As the phycore- imx8mp was also not converted at that point. It did not hurt having the binman nodes included. At least back then.Yes, maybe we can indeed just put it all into the same
imx8mp-u-boot.dtsi. If nobody objects to that idea I can
try it that way for a v2.Quoted 6 lines
Quoted 3 lines
I just not like to see that the file structure diverges. If there is a good reason I'd rather also move the binman nodes for imx8mp to a
imx8mp-binman.dtsi.No, I guess either way will work. Let's hope we get some more feedback on what the others prefer. Thanks!
Quoted 7 lines
I'm not sure if I understand correctly but if the suggestion is to create a dtsi that is shared between the imx8mm and imx8mp I don't think that would be a good idea as there are differences in addresses and such. In fact, there's a difference in DDR training firmware between ddr3 and lpddr4 so trying to even combine them into an
imx8mm-u-boot.dtsidoesn't even make sense to me. If anything maybe it should be aimx8mm-binman-lpddr4-u-boot.dtsior something like that?
No, I don't think it is our intention to combine anything from imx8mm and imx8mp at this point. As far as I understood, rather than introducing a new imx8mm-binman.dtsi the suggestion is to put that into the existing imx8mm-u-boot.dtsi as well similar to how Teresa did that for phycore-imx8mp and the imx8mp-u-boot.dtsi.
Quoted 2 lines
Perhaps ifdef's could handle these differences allowing you to combine ddr types and SoC's?
No, I don't really think that would improve anything over just having separate imx8mm-u-boot.dtsi and imx8mp-u- boot.dtsi files. On the other hand, I also don't see that anything would stop us from still going down that route of further combining imx8mm and imx8mp stuff in the future should we really want to.
Quoted 1 line
Tim
Cheers
Marcel
RFC PATCH 3/5 arm64: dts: imx8mm-binman.dtsi: alphabetically re-order properties
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Alphabetically re-order properties.
---
arch/arm/dts/imx8mm-binman.dtsi | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
arch/arm/dts/imx8mm-binman.dtsi +15 -15
@@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +// SPDX-License-Identifier: GPL-2.0+ OR MIT /* * Copyright 2021 Toradex */
@@ -11,10 +11,10 @@ &binman { u-boot-spl-ddr { + align = <4>; + align-size = <4>; filename = "u-boot-spl-ddr.bin"; pad-byte = <0xff>; - align-size = <4>; - align = <4>; u-boot-spl { align-end = <4>;
@@ -58,16 +58,16 @@ fit { description = "Configuration to load ATF before U-Boot"; - #address-cells = <1>; fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>; + #address-cells = <1>; images { uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; 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";
@@ -75,12 +75,12 @@ }; atf { - description = "ARM Trusted Firmware"; - type = "firmware"; arch = "arm64"; compression = "none"; - load = <0x920000>; + description = "ARM Trusted Firmware"; entry = <0x920000>; + load = <0x920000>; + type = "firmware"; atf_blob: blob-ext { filename = "bl31.bin";
@@ -88,17 +88,17 @@ }; binman_fip: fip { - description = "Trusted Firmware FIP"; - type = "firmware"; arch = "arm64"; compression = "none"; + description = "Trusted Firmware FIP"; load = <0x40310000>; + type = "firmware"; }; fdt { + compression = "none"; description = "NAME"; type = "flat_dt"; - compression = "none"; uboot_fdt_blob: blob-ext { filename = "u-boot.dtb";
@@ -111,9 +111,9 @@ binman_configuration: conf { description = "NAME"; + fdt = "fdt"; firmware = "uboot"; loadables = "atf"; - fdt = "fdt"; }; }; };
@@ -124,13 +124,13 @@ pad-byte = <0x00>; spl: blob-ext@1 { - offset = <0x0>; filename = "spl.bin"; + offset = <0x0>; }; binman_uboot: blob-ext@2 { - offset = <0x57c00>; filename = "u-boot.itb"; + offset = <0x57c00>; }; }; };
Signature · 1 line
2.26.2
RFC PATCH 4/5 arm64: dts: imx8mm-binman.dtsi: explicitly add spl filename
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Explicitly add SPL aka u-boot-spl.bin filename.
---
arch/arm/dts/imx8mm-binman.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/imx8mm-binman.dtsi +1 -0
@@ -17,6 +17,7 @@ pad-byte = <0xff>; u-boot-spl { + filename = "u-boot-spl.bin"; align-end = <4>; };
Signature · 1 line
2.26.2
RFC PATCH 5/5 arm64: dts: imx8mm-binman.dtsi: improve odd blob-ext naming
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Rather than using odd implicit blob-ext naming, explicitly specify the type to be of blob-ext and therefore also simplify the node naming.
---
Changes in v1:
- This was suggested by Simon on my earlier patch set upon which we decided to first break this up into a common binman dtsi and then subsequently do such further improvements.
arch/arm/dts/imx8mm-binman.dtsi | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
arch/arm/dts/imx8mm-binman.dtsi +18 -9
@@ -21,24 +21,28 @@ align-end = <4>; }; - blob_1: blob-ext@1 { + 1d-imem { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_2: blob-ext@2 { + 1d_dmem { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; - blob_3: blob-ext@3 { + 2d_imem { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; + type = "blob-ext"; }; - blob_4: blob-ext@4 { + 2d_dmem { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; + type = "blob-ext"; }; };
@@ -70,8 +74,9 @@ load = <CONFIG_SYS_TEXT_BASE>; type = "standalone"; - uboot_blob: blob-ext { + uboot_blob { filename = "u-boot-nodtb.bin"; + type = "blob-ext"; }; };
@@ -83,8 +88,9 @@ load = <0x920000>; type = "firmware"; - atf_blob: blob-ext { + atf_blob { filename = "bl31.bin"; + type = "blob-ext"; }; };
@@ -101,8 +107,9 @@ description = "NAME"; type = "flat_dt"; - uboot_fdt_blob: blob-ext { + uboot_fdt_blob { filename = "u-boot.dtb"; + type = "blob-ext"; }; }; };
@@ -124,14 +131,16 @@ filename = "flash.bin"; pad-byte = <0x00>; - spl: blob-ext@1 { + spl { filename = "spl.bin"; offset = <0x0>; + type = "blob-ext"; }; - binman_uboot: blob-ext@2 { + binman_uboot: uboot { filename = "u-boot.itb"; offset = <0x57c00>; + type = "blob-ext"; }; }; };
Signature · 1 line
2.26.2
Quoted 25 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
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.dtsiwhich covers the common part of that configuration.The initial patch fixes an issue with intermediate binary naming for the imx8mm-cl-iot-gate. And subsequent patches further clean up that dtsi.
This series is based on Peng's binman conversion of late [1], my Verdin iMX8M Mini target refresh [2], Fabio's generating a single bootable flash.bin again for imx8mm-evk [3], Tim's switching
imx8mm_veniceto using binman to pack images [4] and Frieder's support for Kontron Electronics i.MX6UL/ULL and i.MX8MM SoMs [5].This series has been run-time tested on Verdin iMX8M Mini. The other targets were only compile tested.
Please note that for now, I left out the following intricacies of
imx8mm-venice-u-boot.dtsi. Not quite sure what exactly those are used for.
Quoted 10 lines
fit,fdt-list = "of-list";
...
@fdt-SEQ {
...
default = "@config-DEFAULT-SEQ";
...
@config-SEQ {
...
fdt = "fdt-SEQ";Marcell,
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 imx8mm board that uses CONFIG_OF_LIST to support multiple dtbs.
Tim
Fabio Estevam
reviewerHi Marcel,
Quoted 18 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
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.dtsiwhich covers the common part of that configuration.The initial patch fixes an issue with intermediate binary naming for the imx8mm-cl-iot-gate. And subsequent patches further clean up that dtsi.
This series is based on Peng's binman conversion of late [1], my Verdin iMX8M Mini target refresh [2], Fabio's generating a single bootable flash.bin again for imx8mm-evk [3], Tim's switching
imx8mm_veniceto using binman to pack images [4] and Frieder's support for Kontron Electronics i.MX6UL/ULL and i.MX8MM SoMs [5].
Quoted 6 lines
This series has been run-time tested on Verdin iMX8M Mini. The other targets were only compile tested.
Please note that for now, I left out the following intricacies of
imx8mm-venice-u-boot.dtsi. Not quite sure what exactly those are used for.
The series looks good.
We just need to find a way to not break imx8mm-venice.
Thanks
Quoted 21 lines · Fabio Estevam
Hi Marcel,
Quoted 18 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
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.dtsiwhich covers the common part of that configuration.The initial patch fixes an issue with intermediate binary naming for the imx8mm-cl-iot-gate. And subsequent patches further clean up that dtsi.
This series is based on Peng's binman conversion of late [1], my Verdin iMX8M Mini target refresh [2], Fabio's generating a single bootable flash.bin again for imx8mm-evk [3], Tim's switching
imx8mm_veniceto using binman to pack images [4] and Frieder's support for Kontron Electronics i.MX6UL/ULL and i.MX8MM SoMs [5].
Quoted 8 lines
Quoted 6 lines
This series has been run-time tested on Verdin iMX8M Mini. The other targets were only compile tested.
Please note that for now, I left out the following intricacies of
imx8mm-venice-u-boot.dtsi. Not quite sure what exactly those are used for.The series looks good.
Thanks!
Quoted 1 line
We just need to find a way to not break imx8mm-venice.
Yep, yep. I cleaned that up now and will send a v2 shortly.
BTW: Now with 2021.10 released I hope somebody will pick up all my in-flight patch sets soon (;-p).
Quoted 1 line
Thanks