From a89c8f2111bc647b697b776a40227673cfc713e3 Mon Sep 17 00:00:00 2001 From: Heiko Thiery Date: Thu, 6 Jan 2022 11:49:41 +0100 Subject: binman: add support for creating dummy files for external blobs While converting to binman for an imx8mq board, it has been found that building in the u-boot CI fails. This is because an imx8mq requires an external binary (signed_hdmi_imx8m.bin). If this file cannot be found mkimage fails. To be able to build this board in the u-boot CI a binman option (--fake-ext-blobs) is introduced that can be switched on via the u-boot makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are created. Signed-off-by: Heiko Thiery Reviewed-by: Simon Glass --- Makefile | 1 + tools/binman/cmdline.py | 2 ++ tools/binman/control.py | 26 +++++++++++++++++++------- tools/binman/entry.py | 23 +++++++++++++++++++++++ tools/binman/etype/blob.py | 18 ++++++++++++++++++ tools/binman/etype/blob_ext.py | 8 ++++++++ tools/binman/etype/mkimage.py | 20 ++++++++++++++++++++ tools/binman/etype/section.py | 20 ++++++++++++++++++++ tools/binman/ftest.py | 15 ++++++++++++++- tools/binman/test/203_fake_blob.dts | 14 ++++++++++++++ 10 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 tools/binman/test/203_fake_blob.dts diff --git a/Makefile b/Makefile index ae9bfab91ac..63d286a4c15 100644 --- a/Makefile +++ b/Makefile @@ -1315,6 +1315,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ -a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \ -a spl-dtb=$(CONFIG_SPL_OF_REAL) \ -a tpl-dtb=$(CONFIG_TPL_OF_REAL) \ + $(if $(BINMAN_FAKE_EXT_BLOBS),--fake-ext-blobs) \ $(BINMAN_$(@F)) OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py index e73ff780956..700e5a29a53 100644 --- a/tools/binman/cmdline.py +++ b/tools/binman/cmdline.py @@ -52,6 +52,8 @@ controlled by a description in the board device tree.''' help='Configuration file (.dtb) to use') build_parser.add_argument('--fake-dtb', action='store_true', help='Use fake device tree contents (for testing only)') + build_parser.add_argument('--fake-ext-blobs', action='store_true', + help='Create fake ext blobs with dummy content (for testing only)') build_parser.add_argument('-i', '--image', type=str, action='append', help='Image filename to build (if not specified, build all)') build_parser.add_argument('-I', '--indir', action='append', diff --git a/tools/binman/control.py b/tools/binman/control.py index 304fc70f56f..47aac207b46 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -479,7 +479,8 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded): def ProcessImage(image, update_fdt, write_map, get_contents=True, - allow_resize=True, allow_missing=False): + allow_resize=True, allow_missing=False, + allow_fake_blobs=False): """Perform all steps for this image, including checking and # writing it. This means that errors found with a later image will be reported after @@ -495,12 +496,15 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, allow_resize: True to allow entries to change size (this does a re-pack of the entries), False to raise an exception allow_missing: Allow blob_ext objects to be missing + allow_fake_blobs: Allow blob_ext objects to be faked with dummy files Returns: - True if one or more external blobs are missing, False if all are present + True if one or more external blobs are missing or faked, + False if all are present """ if get_contents: image.SetAllowMissing(allow_missing) + image.SetAllowFakeBlob(allow_fake_blobs) image.GetEntryContents() image.GetEntryOffsets() @@ -549,7 +553,13 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, tout.Warning("Image '%s' is missing external blobs and is non-functional: %s" % (image.name, ' '.join([e.name for e in missing_list]))) _ShowHelpForMissingBlobs(missing_list) - return bool(missing_list) + faked_list = [] + image.CheckFakedBlobs(faked_list) + if faked_list: + tout.Warning("Image '%s:%s' has faked external blobs and is non-functional: %s" % + (image.name, image.image_name, + ' '.join([e.GetDefaultFilename() for e in faked_list]))) + return bool(missing_list) or bool(faked_list) def Binman(args): @@ -636,13 +646,15 @@ def Binman(args): images = PrepareImagesAndDtbs(dtb_fname, args.image, args.update_fdt, use_expanded) + if args.test_section_timeout: # Set the first image to timeout, used in testThreadTimeout() images[list(images.keys())[0]].test_section_timeout = True - missing = False + invalid = False for image in images.values(): - missing |= ProcessImage(image, args.update_fdt, args.map, - allow_missing=args.allow_missing) + invalid |= ProcessImage(image, args.update_fdt, args.map, + allow_missing=args.allow_missing, + allow_fake_blobs=args.fake_ext_blobs) # Write the updated FDTs to our output files for dtb_item in state.GetAllFdts(): @@ -652,7 +664,7 @@ def Binman(args): data = state.GetFdtForEtype('u-boot-dtb').GetContents() elf.UpdateFile(*elf_params, data) - if missing: + if invalid: tout.Warning("\nSome images are invalid") # Use this to debug the time take to pack the image diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 70222718ea9..401476fe760 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -70,6 +70,8 @@ class Entry(object): missing: True if this entry is missing its contents allow_missing: Allow children of this entry to be missing (used by subclasses such as Entry_section) + allow_fake: Allow creating a dummy fake file if the blob file is not + available. This is mainly used for testing. external: True if this entry contains an external binary blob """ def __init__(self, section, etype, node, name_prefix=''): @@ -98,8 +100,10 @@ class Entry(object): self._expand_size = False self.compress = 'none' self.missing = False + self.faked = False self.external = False self.allow_missing = False + self.allow_fake = False @staticmethod def Lookup(node_path, etype, expanded): @@ -898,6 +902,14 @@ features to produce new behaviours. # This is meaningless for anything other than sections pass + def SetAllowFakeBlob(self, allow_fake): + """Set whether a section allows to create a fake blob + + Args: + allow_fake: True if allowed, False if not allowed + """ + pass + def CheckMissing(self, missing_list): """Check if any entries in this section have missing external blobs @@ -909,6 +921,17 @@ features to produce new behaviours. if self.missing: missing_list.append(self) + def CheckFakedBlobs(self, faked_blobs_list): + """Check if any entries in this section have faked external blobs + + If there are faked blobs, the entries are added to the list + + Args: + fake_blobs_list: List of Entry objects to be added to + """ + # This is meaningless for anything other than blobs + pass + def GetAllowMissing(self): """Get whether a section allows missing external blobs diff --git a/tools/binman/etype/blob.py b/tools/binman/etype/blob.py index fae86ca3ec0..6e63d777eb0 100644 --- a/tools/binman/etype/blob.py +++ b/tools/binman/etype/blob.py @@ -5,6 +5,8 @@ # Entry-type module for blobs, which are binary objects read from files # +import pathlib + from binman.entry import Entry from binman import state from dtoc import fdt_util @@ -36,6 +38,11 @@ class Entry_blob(Entry): self._filename = fdt_util.GetString(self._node, 'filename', self.etype) def ObtainContents(self): + if self.allow_fake and not pathlib.Path(self._filename).is_file(): + with open(self._filename, "wb") as out: + out.truncate(1024) + self.faked = True + self._filename = self.GetDefaultFilename() self._pathname = tools.GetInputFilename(self._filename, self.external and self.section.GetAllowMissing()) @@ -75,3 +82,14 @@ class Entry_blob(Entry): def ProcessContents(self): # The blob may have changed due to WriteSymbols() return self.ProcessContentsUpdate(self.data) + + def CheckFakedBlobs(self, faked_blobs_list): + """Check if any entries in this section have faked external blobs + + If there are faked blobs, the entries are added to the list + + Args: + fake_blobs_list: List of Entry objects to be added to + """ + if self.faked: + faked_blobs_list.append(self) diff --git a/tools/binman/etype/blob_ext.py b/tools/binman/etype/blob_ext.py index d6b0ca17c3f..fba6271de2b 100644 --- a/tools/binman/etype/blob_ext.py +++ b/tools/binman/etype/blob_ext.py @@ -26,3 +26,11 @@ class Entry_blob_ext(Entry_blob): def __init__(self, section, etype, node): Entry_blob.__init__(self, section, etype, node) self.external = True + + def SetAllowFakeBlob(self, allow_fake): + """Set whether the entry allows to create a fake blob + + Args: + allow_fake_blob: True if allowed, False if not allowed + """ + self.allow_fake = allow_fake diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index e49977522e3..80fdce0b144 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -61,3 +61,23 @@ class Entry_mkimage(Entry): entry = Entry.Create(self, node) entry.ReadNode() self._mkimage_entries[entry.name] = entry + + def SetAllowFakeBlob(self, allow_fake): + """Set whether the sub nodes allows to create a fake blob + + Args: + allow_fake: True if allowed, False if not allowed + """ + for entry in self._mkimage_entries.values(): + entry.SetAllowFakeBlob(allow_fake) + + def CheckFakedBlobs(self, faked_blobs_list): + """Check if any entries in this section have faked external blobs + + If there are faked blobs, the entries are added to the list + + Args: + faked_blobs_list: List of Entry objects to be added to + """ + for entry in self._mkimage_entries.values(): + entry.CheckFakedBlobs(faked_blobs_list) diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index e2949fc9163..4e423855d91 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -689,6 +689,15 @@ class Entry_section(Entry): for entry in self._entries.values(): entry.SetAllowMissing(allow_missing) + def SetAllowFakeBlob(self, allow_fake): + """Set whether a section allows to create a fake blob + + Args: + allow_fake_blob: True if allowed, False if not allowed + """ + for entry in self._entries.values(): + entry.SetAllowFakeBlob(allow_fake) + def CheckMissing(self, missing_list): """Check if any entries in this section have missing external blobs @@ -700,6 +709,17 @@ class Entry_section(Entry): for entry in self._entries.values(): entry.CheckMissing(missing_list) + def CheckFakedBlobs(self, faked_blobs_list): + """Check if any entries in this section have faked external blobs + + If there are faked blobs, the entries are added to the list + + Args: + fake_blobs_list: List of Entry objects to be added to + """ + for entry in self._entries.values(): + entry.CheckFakedBlobs(faked_blobs_list) + def _CollectEntries(self, entries, entries_by_name, add_entry): """Collect all the entries in an section diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 6be003786e8..2a98d810288 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -308,7 +308,7 @@ class TestFunctional(unittest.TestCase): def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False, entry_args=None, images=None, use_real_dtb=False, use_expanded=False, verbosity=None, allow_missing=False, - extra_indirs=None, threads=None, + allow_fake_blobs=False, extra_indirs=None, threads=None, test_section_timeout=False, update_fdt_in_elf=None): """Run binman with a given test file @@ -331,6 +331,7 @@ class TestFunctional(unittest.TestCase): verbosity: Verbosity level to use (0-3, None=don't set it) allow_missing: Set the '--allow-missing' flag so that missing external binaries just produce a warning instead of an error + allow_fake_blobs: Set the '--fake-ext-blobs' flag extra_indirs: Extra input directories to add using -I threads: Number of threads to use (None for default, 0 for single-threaded) @@ -369,6 +370,8 @@ class TestFunctional(unittest.TestCase): args.append('-a%s=%s' % (arg, value)) if allow_missing: args.append('-M') + if allow_fake_blobs: + args.append('--fake-ext-blobs') if update_fdt_in_elf: args += ['--update-fdt-in-elf', update_fdt_in_elf] if images: @@ -4661,6 +4664,16 @@ class TestFunctional(unittest.TestCase): str(e.exception), "Not enough space in '.*u_boot_binman_embed_sm' for data length.*") + def testFakeBlob(self): + """Test handling of faking an external blob""" + with test_util.capture_sys_output() as (stdout, stderr): + self._DoTestFile('203_fake_blob.dts', allow_missing=True, + allow_fake_blobs=True) + err = stderr.getvalue() + self.assertRegex(err, + "Image '.*' has faked external blobs and is non-functional: .*") + os.remove('binman_faking_test_blob') + if __name__ == "__main__": unittest.main() diff --git a/tools/binman/test/203_fake_blob.dts b/tools/binman/test/203_fake_blob.dts new file mode 100644 index 00000000000..22cf67f4f83 --- /dev/null +++ b/tools/binman/test/203_fake_blob.dts @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + blob-ext { + filename = "binman_faking_test_blob"; + }; + }; +}; -- cgit v1.3.1 From 80efad13425a081e186764bcb9ccd77fcc98a456 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 22 Oct 2021 23:43:40 +0200 Subject: imx8mm_beacon: Switch to binman for generating image To eliminate a warning when using custom imx tools for generating a binary, use binman to generate flash.bin. Signed-off-by: Adam Ford Signed-off-by: Marcel Ziswiler Reviewed-by: Simon Glass --- arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi | 122 ++++++++++++++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 1 + board/beacon/imx8mm/Kconfig | 2 +- board/beacon/imx8mm/README | 6 +- board/beacon/imx8mm/imximage-8mm-lpddr4.cfg | 9 ++ configs/imx8mm_beacon_defconfig | 2 +- 6 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 board/beacon/imx8mm/imximage-8mm-lpddr4.cfg diff --git a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi index 73ddfdade6a..3c034a85e35 100644 --- a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi @@ -6,6 +6,10 @@ #include "imx8mm-u-boot.dtsi" / { + binman: binman { + multiple-images; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -100,3 +104,121 @@ &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 = ; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = ; + + 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@1 { + offset = <0x0>; + filename = "spl.bin"; + }; + + uboot: blob-ext@2 { + offset = <0x57c00>; + filename = "u-boot.itb"; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 276b8bd9742..a2822f8c28f 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -117,6 +117,7 @@ config TARGET_VERDIN_IMX8MM config TARGET_IMX8MM_BEACON bool "imx8mm Beacon Embedded devkit" + select BINMAN select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 diff --git a/board/beacon/imx8mm/Kconfig b/board/beacon/imx8mm/Kconfig index 58799c1a655..63f064e8cb8 100644 --- a/board/beacon/imx8mm/Kconfig +++ b/board/beacon/imx8mm/Kconfig @@ -10,7 +10,7 @@ config SYS_CONFIG_NAME default "imx8mm_beacon" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg" + default "board/beacon/imx8mm/imximage-8mm-lpddr4.cfg" source "board/freescale/common/Kconfig" diff --git a/board/beacon/imx8mm/README b/board/beacon/imx8mm/README index dce176fa0b2..03d9412f0d6 100644 --- a/board/beacon/imx8mm/README +++ b/board/beacon/imx8mm/README @@ -12,8 +12,8 @@ Get and Build the ARM Trusted firmware Note: $(srctree) is U-Boot source directory $ git clone https://source.codeaurora.org/external/imx/imx-atf -$ git checkout imx_4.19.35_1.0.0 -$ make PLAT=imx8mm bl31 ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- +$ git checkout imx_5.4.70_2.3.0 +$ make PLAT=imx8mm bl31 CROSS_COMPILE=aarch64-linux-gnu- $ cp build/imx8mm/release/bl31.bin $(srctree) Get the DDR firmware @@ -26,7 +26,7 @@ $ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree) Build U-Boot ============ $ make imx8mm_beacon_defconfig -$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 +$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- Burn U-Boot to microSD Card =========================== diff --git a/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg new file mode 100644 index 00000000000..90573be5fd9 --- /dev/null +++ b/board/beacon/imx8mm/imximage-8mm-lpddr4.cfg @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +BOOT_FROM sd +LOADER u-boot-spl-ddr.bin 0x7E1000 diff --git a/configs/imx8mm_beacon_defconfig b/configs/imx8mm_beacon_defconfig index de005433e2d..9aea5bf1817 100644 --- a/configs/imx8mm_beacon_defconfig +++ b/configs/imx8mm_beacon_defconfig @@ -21,7 +21,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_DEFAULT_FDT_FILE="imx8mm-beacon-kit.dtb" CONFIG_SPL_BOARD_INIT=y -- cgit v1.3.1 From 2baacc75a532dadfe8694252fb2f6d8dc3fa3983 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 10 Sep 2021 15:19:22 -0500 Subject: imx8mn_beacon: Fix booting hang and switch to binman Somewhere along the line, the board stopped being able to boot. Rather than just fixing the issue, let's fix the issue and migrate to binman to eliminate a warning when using custom imx tools for generating the binary. Signed-off-by: Adam Ford Reviewed-by: Peng Fan Reviewed-by: Fabio Estevam --- arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 130 ++++++++++++++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 1 + board/beacon/imx8mn/Kconfig | 2 +- board/beacon/imx8mn/imximage-8mn-lpddr4.cfg | 10 +++ configs/imx8mn_beacon_defconfig | 8 +- 5 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 board/beacon/imx8mn/imximage-8mn-lpddr4.cfg diff --git a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi index bbc64a28199..69fd69c8d02 100644 --- a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi @@ -4,6 +4,10 @@ */ / { + binman: binman { + multiple-images; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -40,6 +44,9 @@ &clk { u-boot,dm-spl; u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; }; &gpio1 { @@ -99,6 +106,10 @@ u-boot,off-on-delay-us = <20000>; }; +&uart2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; sd-uhs-sdr104; @@ -120,3 +131,122 @@ &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 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 = ; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = ; + + 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/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index a2822f8c28f..0d27912bea8 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -124,6 +124,7 @@ config TARGET_IMX8MM_BEACON config TARGET_IMX8MN_BEACON bool "imx8mn Beacon Embedded devkit" + select BINMAN select IMX8MN select SUPPORT_SPL select IMX8M_LPDDR4 diff --git a/board/beacon/imx8mn/Kconfig b/board/beacon/imx8mn/Kconfig index 65d2923918d..fb301397b1a 100644 --- a/board/beacon/imx8mn/Kconfig +++ b/board/beacon/imx8mn/Kconfig @@ -16,7 +16,7 @@ config IMX8MN_BEACON_2GB_LPDDR bool "Enable 2GB LPDDR" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage-8mn-lpddr4.cfg" + default "board/beacon/imx8mn/imximage-8mn-lpddr4.cfg" source "board/freescale/common/Kconfig" diff --git a/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg new file mode 100644 index 00000000000..7286b264944 --- /dev/null +++ b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +ROM_VERSION v2 +BOOT_FROM sd +LOADER u-boot-spl-ddr.bin 0x912000 diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_beacon_defconfig index 52c7a7e9717..1d2a825e19a 100644 --- a/configs/imx8mn_beacon_defconfig +++ b/configs/imx8mn_beacon_defconfig @@ -25,7 +25,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_DEFAULT_FDT_FILE="imx8mn-beacon-kit.dtb" CONFIG_ARCH_MISC_INIT=y @@ -34,6 +34,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=y CONFIG_SPL_SEPARATE_BSS=y CONFIG_SPL_I2C=y CONFIG_SPL_POWER=y +CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="u-boot=> " # CONFIG_BOOTM_NETBSD is not set @@ -60,7 +61,6 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent interrupts" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y @@ -103,6 +103,7 @@ CONFIG_PHY_GIGE=y CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y CONFIG_DM_PMIC=y # CONFIG_SPL_PMIC_CHILDREN is not set @@ -119,7 +120,9 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_NXP_FSPI=y CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set @@ -131,3 +134,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SDP_LOADADDR=0x0 CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_IMX_WATCHDOG=y -- cgit v1.3.1 From 83ba8c539d67443b5314442b68abe3ad0ca23586 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 7 Jan 2022 14:39:04 -0600 Subject: imx8mn_beacon_2g: Switch to binman The standard 1GB Nano was converted to binman, but the 2G version was neglected. Convert it to binman as well. Reviewed-by: Fabio Estevam Signed-off-by: Adam Ford --- configs/imx8mn_beacon_2g_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/imx8mn_beacon_2g_defconfig b/configs/imx8mn_beacon_2g_defconfig index 5f116b77214..80e0bbb015d 100644 --- a/configs/imx8mn_beacon_2g_defconfig +++ b/configs/imx8mn_beacon_2g_defconfig @@ -26,7 +26,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_DEFAULT_FDT_FILE="imx8mn-beacon-kit.dtb" CONFIG_ARCH_MISC_INIT=y -- cgit v1.3.1 From c1ecd03d90c72e4352ef9e3ad3c9ebb07305196a Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 22 Oct 2021 10:42:16 +0800 Subject: imx: imx8mq_evk: switch to binman Switch to use binman to pack images Signed-off-by: Peng Fan --- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 2 + arch/arm/dts/imx8mq-u-boot.dtsi | 122 ++++++++++++++++++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 1 + board/freescale/imx8mq_evk/Kconfig | 2 +- board/freescale/imx8mq_evk/imximage.cfg | 11 +++ configs/imx8mq_evk_defconfig | 2 +- 6 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/imx8mq-u-boot.dtsi create mode 100644 board/freescale/imx8mq_evk/imximage.cfg diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-u-boot.dtsi index 2cfc12b7e0a..6f9c81462ea 100644 --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) +#include "imx8mq-u-boot.dtsi" + &usdhc1 { mmc-hs400-1_8v; }; diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi new file mode 100644 index 00000000000..2c10e9b6452 --- /dev/null +++ b/arch/arm/dts/imx8mq-u-boot.dtsi @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 NXP + */ + +/ { + 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>; + }; + }; + + signed_hdmi { + filename = "signed_hdmi.bin"; + + blob_5: blob-ext@5 { + filename = "signed_hdmi_imx8m.bin"; + }; + }; + + flash { + 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 = ; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = ; + + uboot_blob: blob-ext { + filename = "u-boot-nodtb.bin"; + }; + }; + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + load = <0x910000>; + entry = <0x910000>; + + 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"; + }; + }; + }; + }; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 0d27912bea8..0ea01d28dde 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -36,6 +36,7 @@ config TARGET_IMX8MQ_CM config TARGET_IMX8MQ_EVK bool "imx8mq_evk" + select BINMAN select IMX8MQ select IMX8M_LPDDR4 diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig index c4d20ad7c7d..a7c49744b33 100644 --- a/board/freescale/imx8mq_evk/Kconfig +++ b/board/freescale/imx8mq_evk/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "imx8mq_evk" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage.cfg" + default "board/freescale/imx8mq_evk/imximage.cfg" endif diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg new file mode 100644 index 00000000000..74f12b30d2a --- /dev/null +++ b/board/freescale/imx8mq_evk/imximage.cfg @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +FIT +BOOT_FROM sd +SIGNED_HDMI signed_hdmi.bin +LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig index 92aae70d4a4..f82ce632811 100644 --- a/configs/imx8mq_evk_defconfig +++ b/configs/imx8mq_evk_defconfig @@ -24,7 +24,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y -- cgit v1.3.1 From f7f70ea216068a5dbc6e646a0ff1aa3215bb6f0f Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 22 Oct 2021 10:42:17 +0800 Subject: imx: imx8mq_phanbell: switch to binman Switch to binman to pack images Signed-off-by: Peng Fan Reviewed-by: Patrick Wildt --- arch/arm/dts/imx8mq-phanbell-u-boot.dtsi | 2 ++ arch/arm/mach-imx/imx8m/Kconfig | 7 ++++--- board/google/imx8mq_phanbell/Kconfig | 2 +- board/google/imx8mq_phanbell/imximage.cfg | 11 +++++++++++ configs/imx8mq_phanbell_defconfig | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 board/google/imx8mq_phanbell/imximage.cfg diff --git a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi index 4712cf6a445..a65a942ee7a 100644 --- a/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-phanbell-u-boot.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) +#include "imx8mq-u-boot.dtsi" + ®_usdhc2_vmmc { u-boot,off-on-delay-us = <20000>; }; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 0ea01d28dde..54e62e7f84b 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -41,9 +41,10 @@ config TARGET_IMX8MQ_EVK select IMX8M_LPDDR4 config TARGET_IMX8MQ_PHANBELL - bool "imx8mq_phanbell" - select IMX8MQ - select IMX8M_LPDDR4 + bool "imx8mq_phanbell" + select BINMAN + select IMX8MQ + select IMX8M_LPDDR4 config TARGET_IMX8MM_EVK bool "imx8mm LPDDR4 EVK board" diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig index 54cfb999527..e59b03cb178 100644 --- a/board/google/imx8mq_phanbell/Kconfig +++ b/board/google/imx8mq_phanbell/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "imx8mq_phanbell" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage.cfg" + default "board/google/imx8mq_phanbell/imximage.cfg" endif diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg new file mode 100644 index 00000000000..74f12b30d2a --- /dev/null +++ b/board/google/imx8mq_phanbell/imximage.cfg @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +FIT +BOOT_FROM sd +SIGNED_HDMI signed_hdmi.bin +LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig index 72ff17f93e4..da6a06c13ab 100644 --- a/configs/imx8mq_phanbell_defconfig +++ b/configs/imx8mq_phanbell_defconfig @@ -24,7 +24,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_SD_BOOT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_BOARD_INIT=y -- cgit v1.3.1 From ddc890bc7e41ccca32f89a5b47eed70a2319d476 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 22 Oct 2021 10:42:18 +0800 Subject: imx: pico-imx8mq: switch to use binman Switch to use binman to pack images Signed-off-by: Peng Fan Reviewed-by: Patrick Wildt --- arch/arm/dts/imx8mq-pico-pi.dts | 1 + arch/arm/mach-imx/imx8m/Kconfig | 1 + board/technexion/pico-imx8mq/Kconfig | 2 +- board/technexion/pico-imx8mq/imximage.cfg | 11 +++++++++++ configs/pico-imx8mq_defconfig | 2 +- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 board/technexion/pico-imx8mq/imximage.cfg diff --git a/arch/arm/dts/imx8mq-pico-pi.dts b/arch/arm/dts/imx8mq-pico-pi.dts index d2af18ad0e1..8ed6e9166b9 100644 --- a/arch/arm/dts/imx8mq-pico-pi.dts +++ b/arch/arm/dts/imx8mq-pico-pi.dts @@ -9,6 +9,7 @@ /dts-v1/; #include "imx8mq.dtsi" +#include "imx8mq-u-boot.dtsi" / { model = "TechNexion PICO-PI-8M"; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 54e62e7f84b..d630a73f13b 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -107,6 +107,7 @@ config TARGET_IMX8MP_EVK config TARGET_PICO_IMX8MQ bool "Support Technexion Pico iMX8MQ" + select BINMAN select IMX8MQ select IMX8M_LPDDR4 diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig index 628b0511490..97655517d8a 100644 --- a/board/technexion/pico-imx8mq/Kconfig +++ b/board/technexion/pico-imx8mq/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "pico-imx8mq" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage.cfg" + default "board/technexion/pico-imx8mq/imximage.cfg" endif diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg new file mode 100644 index 00000000000..74f12b30d2a --- /dev/null +++ b/board/technexion/pico-imx8mq/imximage.cfg @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#define __ASSEMBLY__ + +FIT +BOOT_FROM sd +SIGNED_HDMI signed_hdmi.bin +LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig index 419537090f5..e1bed3430a7 100644 --- a/configs/pico-imx8mq_defconfig +++ b/configs/pico-imx8mq_defconfig @@ -23,7 +23,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y -- cgit v1.3.1 From ea6ad1a42a770fa0cd18b1d2490bcd5a072c4f8b Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 22 Oct 2021 10:42:19 +0800 Subject: imx: imx8mq use common imximage.cfg After all these board switch to binman, we could use common imximage.cfg Signed-off-by: Peng Fan Reviewed-by: Patrick Wildt --- arch/arm/mach-imx/imx8m/imximage.cfg | 12 +++--------- board/freescale/imx8mq_evk/Kconfig | 2 +- board/freescale/imx8mq_evk/imximage.cfg | 11 ----------- board/google/imx8mq_phanbell/Kconfig | 2 +- board/google/imx8mq_phanbell/imximage.cfg | 11 ----------- board/technexion/pico-imx8mq/Kconfig | 2 +- board/technexion/pico-imx8mq/imximage.cfg | 11 ----------- 7 files changed, 6 insertions(+), 45 deletions(-) delete mode 100644 board/freescale/imx8mq_evk/imximage.cfg delete mode 100644 board/google/imx8mq_phanbell/imximage.cfg delete mode 100644 board/technexion/pico-imx8mq/imximage.cfg diff --git a/arch/arm/mach-imx/imx8m/imximage.cfg b/arch/arm/mach-imx/imx8m/imximage.cfg index 714b24273bf..9c6eaf0a6db 100644 --- a/arch/arm/mach-imx/imx8m/imximage.cfg +++ b/arch/arm/mach-imx/imx8m/imximage.cfg @@ -1,17 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2018 NXP + * Copyright 2018-2021 NXP */ #define __ASSEMBLY__ FIT BOOT_FROM sd -SIGNED_HDMI signed_hdmi_imx8m.bin -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 +SIGNED_HDMI signed_hdmi.bin +LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/board/freescale/imx8mq_evk/Kconfig b/board/freescale/imx8mq_evk/Kconfig index a7c49744b33..c4d20ad7c7d 100644 --- a/board/freescale/imx8mq_evk/Kconfig +++ b/board/freescale/imx8mq_evk/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "imx8mq_evk" config IMX_CONFIG - default "board/freescale/imx8mq_evk/imximage.cfg" + default "arch/arm/mach-imx/imx8m/imximage.cfg" endif diff --git a/board/freescale/imx8mq_evk/imximage.cfg b/board/freescale/imx8mq_evk/imximage.cfg deleted file mode 100644 index 74f12b30d2a..00000000000 --- a/board/freescale/imx8mq_evk/imximage.cfg +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2021 NXP - */ - -#define __ASSEMBLY__ - -FIT -BOOT_FROM sd -SIGNED_HDMI signed_hdmi.bin -LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/board/google/imx8mq_phanbell/Kconfig b/board/google/imx8mq_phanbell/Kconfig index e59b03cb178..54cfb999527 100644 --- a/board/google/imx8mq_phanbell/Kconfig +++ b/board/google/imx8mq_phanbell/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "imx8mq_phanbell" config IMX_CONFIG - default "board/google/imx8mq_phanbell/imximage.cfg" + default "arch/arm/mach-imx/imx8m/imximage.cfg" endif diff --git a/board/google/imx8mq_phanbell/imximage.cfg b/board/google/imx8mq_phanbell/imximage.cfg deleted file mode 100644 index 74f12b30d2a..00000000000 --- a/board/google/imx8mq_phanbell/imximage.cfg +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2021 NXP - */ - -#define __ASSEMBLY__ - -FIT -BOOT_FROM sd -SIGNED_HDMI signed_hdmi.bin -LOADER mkimage.flash.mkimage 0x7e1000 diff --git a/board/technexion/pico-imx8mq/Kconfig b/board/technexion/pico-imx8mq/Kconfig index 97655517d8a..628b0511490 100644 --- a/board/technexion/pico-imx8mq/Kconfig +++ b/board/technexion/pico-imx8mq/Kconfig @@ -10,6 +10,6 @@ config SYS_CONFIG_NAME default "pico-imx8mq" config IMX_CONFIG - default "board/technexion/pico-imx8mq/imximage.cfg" + default "arch/arm/mach-imx/imx8m/imximage.cfg" endif diff --git a/board/technexion/pico-imx8mq/imximage.cfg b/board/technexion/pico-imx8mq/imximage.cfg deleted file mode 100644 index 74f12b30d2a..00000000000 --- a/board/technexion/pico-imx8mq/imximage.cfg +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2021 NXP - */ - -#define __ASSEMBLY__ - -FIT -BOOT_FROM sd -SIGNED_HDMI signed_hdmi.bin -LOADER mkimage.flash.mkimage 0x7e1000 -- cgit v1.3.1 From 70e59a0d17b4e14f68fb2ff04c4490d133ed5ca8 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 22 Oct 2021 10:42:20 +0800 Subject: doc: imx8mq_evk: update doc after using binman Update doc after using binman to pack images Signed-off-by: Peng Fan --- doc/board/nxp/imx8mq_evk.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/board/nxp/imx8mq_evk.rst b/doc/board/nxp/imx8mq_evk.rst index c269fdebe30..92eeda79aa1 100644 --- a/doc/board/nxp/imx8mq_evk.rst +++ b/doc/board/nxp/imx8mq_evk.rst @@ -43,13 +43,14 @@ Build U-Boot $ export CROSS_COMPILE=aarch64-poky-linux- $ make imx8mq_evk_defconfig - $ make flash.bin + $ make Burn the flash.bin to MicroSD card offset 33KB: .. code-block:: bash $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc + $sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=notrunc Boot ---- -- cgit v1.3.1 From 01bc128a119176f26bf275fb48b011883c1dc3fd Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:10 +0200 Subject: imx8mm-cl-iot-gate: fix imximage intermediate binary naming 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 Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg b/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg index b89092a5590..4071219fbf4 100644 --- a/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg +++ b/board/compulab/imx8mm-cl-iot-gate/imximage-8mm-lpddr4.cfg @@ -6,4 +6,4 @@ #define __ASSEMBLY__ BOOT_FROM sd -LOADER mkimage.flash.mkimage 0x7E1000 +LOADER u-boot-spl-ddr.bin 0x7e1000 -- cgit v1.3.1 From 2dc3ac57726b97008f3bdf710ca60bd6af6a2311 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:11 +0200 Subject: arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-order Alphabetically re-order nodes and properties. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 202 +++++++++++----------- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 202 +++++++++++----------- 2 files changed, 202 insertions(+), 202 deletions(-) diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi index 12065935e49..67ce70d0bdf 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi @@ -8,18 +8,18 @@ multiple-images; }; - wdt-reboot { - compatible = "wdt-reboot"; - wdt = <&wdog1>; - u-boot,dm-spl; - }; - firmware { optee { compatible = "linaro,optee-tz"; method = "smc"; }; }; + + wdt-reboot { + compatible = "wdt-reboot"; + u-boot,dm-spl; + wdt = <&wdog1>; + }; }; &{/soc@0} { @@ -27,17 +27,12 @@ u-boot,dm-spl; }; -&clk { +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { u-boot,dm-spl; - u-boot,dm-pre-reloc; - /delete-property/ assigned-clocks; - /delete-property/ assigned-clock-parents; - /delete-property/ assigned-clock-rates; }; -&osc_24m { +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} { u-boot,dm-spl; - u-boot,dm-pre-reloc; }; &aips1 { @@ -53,94 +48,6 @@ u-boot,dm-spl; }; -&iomuxc { - u-boot,dm-spl; -}; - -&pinctrl_uart3 { - u-boot,dm-spl; -}; - -&pinctrl_usdhc2_gpio { - u-boot,dm-spl; -}; - -&pinctrl_usdhc2 { - u-boot,dm-spl; -}; - -&pinctrl_usdhc3 { - u-boot,dm-spl; -}; - -&gpio1 { - u-boot,dm-spl; -}; - -&gpio2 { - u-boot,dm-spl; -}; - -&gpio3 { - u-boot,dm-spl; -}; - -&gpio4 { - u-boot,dm-spl; -}; - -&gpio5 { - u-boot,dm-spl; -}; - -&uart3 { - u-boot,dm-spl; -}; - -&usdhc1 { - u-boot,dm-spl; -}; - -&usdhc2 { - u-boot,dm-spl; -}; - -&usdhc3 { - u-boot,dm-spl; -}; - -&i2c1 { - u-boot,dm-spl; -}; - -&i2c2 { - u-boot,dm-spl; -}; - -&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { - u-boot,dm-spl; -}; - -&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} { - u-boot,dm-spl; -}; - -&pinctrl_i2c2 { - u-boot,dm-spl; -}; - -&pinctrl_pmic { - u-boot,dm-spl; -}; - -&fec1 { - phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -}; - -&wdog1 { - u-boot,dm-spl; -}; - &binman { u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin"; @@ -253,3 +160,96 @@ }; }; }; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; +}; + +&fec1 { + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; +}; + +&gpio1 { + u-boot,dm-spl; +}; + +&gpio2 { + u-boot,dm-spl; +}; + +&gpio3 { + u-boot,dm-spl; +}; + +&gpio4 { + u-boot,dm-spl; +}; + +&gpio5 { + u-boot,dm-spl; +}; + +&i2c1 { + u-boot,dm-spl; +}; + +&i2c2 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&pinctrl_i2c2 { + u-boot,dm-spl; +}; + +&pinctrl_pmic { + u-boot,dm-spl; +}; + +&pinctrl_uart3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2_gpio { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +}; + +&uart3 { + u-boot,dm-spl; +}; + +&usdhc1 { + u-boot,dm-spl; +}; + +&usdhc2 { + u-boot,dm-spl; +}; + +&usdhc3 { + u-boot,dm-spl; +}; + +&wdog1 { + u-boot,dm-spl; +}; 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 00927c15744..fe45a35d751 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi @@ -8,18 +8,18 @@ multiple-images; }; - wdt-reboot { - compatible = "wdt-reboot"; - wdt = <&wdog1>; - u-boot,dm-spl; - }; - firmware { optee { compatible = "linaro,optee-tz"; method = "smc"; }; }; + + wdt-reboot { + compatible = "wdt-reboot"; + u-boot,dm-spl; + wdt = <&wdog1>; + }; }; &{/soc@0} { @@ -27,17 +27,12 @@ u-boot,dm-spl; }; -&clk { +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { u-boot,dm-spl; - u-boot,dm-pre-reloc; - /delete-property/ assigned-clocks; - /delete-property/ assigned-clock-parents; - /delete-property/ assigned-clock-rates; }; -&osc_24m { +&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} { u-boot,dm-spl; - u-boot,dm-pre-reloc; }; &aips1 { @@ -53,94 +48,6 @@ u-boot,dm-spl; }; -&iomuxc { - u-boot,dm-spl; -}; - -&pinctrl_uart3 { - u-boot,dm-spl; -}; - -&pinctrl_usdhc2_gpio { - u-boot,dm-spl; -}; - -&pinctrl_usdhc2 { - u-boot,dm-spl; -}; - -&pinctrl_usdhc3 { - u-boot,dm-spl; -}; - -&gpio1 { - u-boot,dm-spl; -}; - -&gpio2 { - u-boot,dm-spl; -}; - -&gpio3 { - u-boot,dm-spl; -}; - -&gpio4 { - u-boot,dm-spl; -}; - -&gpio5 { - u-boot,dm-spl; -}; - -&uart3 { - u-boot,dm-spl; -}; - -&usdhc1 { - u-boot,dm-spl; -}; - -&usdhc2 { - u-boot,dm-spl; -}; - -&usdhc3 { - u-boot,dm-spl; -}; - -&i2c1 { - u-boot,dm-spl; -}; - -&i2c2 { - u-boot,dm-spl; -}; - -&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { - u-boot,dm-spl; -}; - -&{/soc@0/bus@30800000/i2c@30a30000/pmic@4b/regulators} { - u-boot,dm-spl; -}; - -&pinctrl_i2c2 { - u-boot,dm-spl; -}; - -&pinctrl_pmic { - u-boot,dm-spl; -}; - -&fec1 { - phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -}; - -&wdog1 { - u-boot,dm-spl; -}; - &binman { u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin"; @@ -241,3 +148,96 @@ }; }; }; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; +}; + +&fec1 { + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; +}; + +&gpio1 { + u-boot,dm-spl; +}; + +&gpio2 { + u-boot,dm-spl; +}; + +&gpio3 { + u-boot,dm-spl; +}; + +&gpio4 { + u-boot,dm-spl; +}; + +&gpio5 { + u-boot,dm-spl; +}; + +&i2c1 { + u-boot,dm-spl; +}; + +&i2c2 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&pinctrl_i2c2 { + u-boot,dm-spl; +}; + +&pinctrl_pmic { + u-boot,dm-spl; +}; + +&pinctrl_uart3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc2_gpio { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +}; + +&uart3 { + u-boot,dm-spl; +}; + +&usdhc1 { + u-boot,dm-spl; +}; + +&usdhc2 { + u-boot,dm-spl; +}; + +&usdhc3 { + u-boot,dm-spl; +}; + +&wdog1 { + u-boot,dm-spl; +}; -- cgit v1.3.1 From e9c63ab0e307a01e2ec3b1588f27b8f45f048dee Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:12 +0200 Subject: arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsi Use common imx8mm-u-boot.dtsi. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 37 ++--------------------- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 37 ++--------------------- 2 files changed, 4 insertions(+), 70 deletions(-) diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi index 67ce70d0bdf..bc8a138e6c0 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 NXP */ +#include "imx8mm-u-boot.dtsi" + / { binman: binman { multiple-images; @@ -22,11 +24,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - &{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { u-boot,dm-spl; }; @@ -35,19 +32,6 @@ u-boot,dm-spl; }; -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - &binman { u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin"; @@ -161,14 +145,6 @@ }; }; -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; - /delete-property/ assigned-clocks; - /delete-property/ assigned-clock-parents; - /delete-property/ assigned-clock-rates; -}; - &fec1 { phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; }; @@ -201,15 +177,6 @@ u-boot,dm-spl; }; -&iomuxc { - u-boot,dm-spl; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - &pinctrl_i2c2 { u-boot,dm-spl; }; 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 fe45a35d751..cf3cc191d5a 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi @@ -3,6 +3,8 @@ * Copyright 2019 NXP */ +#include "imx8mm-u-boot.dtsi" + / { binman: binman { multiple-images; @@ -22,11 +24,6 @@ }; }; -&{/soc@0} { - u-boot,dm-pre-reloc; - u-boot,dm-spl; -}; - &{/soc@0/bus@30800000/i2c@30a30000/pmic@4b} { u-boot,dm-spl; }; @@ -35,19 +32,6 @@ u-boot,dm-spl; }; -&aips1 { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - -&aips2 { - u-boot,dm-spl; -}; - -&aips3 { - u-boot,dm-spl; -}; - &binman { u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin"; @@ -149,14 +133,6 @@ }; }; -&clk { - u-boot,dm-spl; - u-boot,dm-pre-reloc; - /delete-property/ assigned-clocks; - /delete-property/ assigned-clock-parents; - /delete-property/ assigned-clock-rates; -}; - &fec1 { phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; }; @@ -189,15 +165,6 @@ u-boot,dm-spl; }; -&iomuxc { - u-boot,dm-spl; -}; - -&osc_24m { - u-boot,dm-spl; - u-boot,dm-pre-reloc; -}; - &pinctrl_i2c2 { u-boot,dm-spl; }; -- cgit v1.3.1 From 7cf5597b84aa86b07f89fd818a2efdcef6461281 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:13 +0200 Subject: arm64: dts: imx8mm: use common binman configuration 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. Move the comon part of that configuration to the common imx8mm-u-boot.dtsi include file. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi | 122 -------------------- arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi | 124 ++------------------ arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 105 ----------------- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 123 -------------------- arch/arm/dts/imx8mm-u-boot.dtsi | 133 ++++++++++++++++++++++ arch/arm/dts/imx8mm-verdin-u-boot.dtsi | 122 +------------------- 6 files changed, 147 insertions(+), 582 deletions(-) diff --git a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi index 3c034a85e35..73ddfdade6a 100644 --- a/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi @@ -6,10 +6,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -104,121 +100,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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x57c00>; - filename = "u-boot.itb"; - }; - }; -}; diff --git a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi index bc8a138e6c0..5cbc70faaaf 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-optee-u-boot.dtsi @@ -6,10 +6,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - firmware { optee { compatible = "linaro,optee-tz"; @@ -32,117 +28,21 @@ 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>; - }; +&binman_fip { + arch = "arm64"; + compression = "none"; + description = "Trusted Firmware FIP"; + load = <0x40310000>; + type = "firmware"; - blob_4: blob-ext@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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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 = "bl2.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"; }; &fec1 { 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 cf3cc191d5a..433b02cceee 100644 --- a/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi @@ -6,10 +6,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - firmware { optee { compatible = "linaro,optee-tz"; @@ -32,107 +28,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@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>; - }; - }; - - flash { - 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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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"; - }; - }; - }; - }; -}; - &fec1 { phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; }; diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi index 3c75415e8fb..6b459831e74 100644 --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi @@ -6,10 +6,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -116,122 +112,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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x57c00>; - filename = "u-boot.itb"; - }; - }; -}; diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index f833d9df59b..5020255fa0f 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -3,6 +3,12 @@ * Copyright (C) 2020 Jagan Teki */ +/ { + binman: binman { + multiple-images; + }; +}; + &{/soc@0} { u-boot,dm-pre-reloc; u-boot,dm-spl; @@ -21,6 +27,133 @@ 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 = ; + fit,fdt-list = "of-list"; + + images { + uboot { + description = "U-Boot (64-bit)"; + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = ; + + 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-SEQ { + description = "NAME"; + type = "flat_dt"; + compression = "none"; + + uboot_fdt_blob: blob-ext { + filename = "u-boot.dtb"; + }; + }; + }; + + configurations { + default = "@config-DEFAULT-SEQ"; + + binman_configuration: @config-SEQ { + description = "NAME"; + firmware = "uboot"; + loadables = "atf"; + fdt = "fdt-SEQ"; + }; + }; + }; + }; + + 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"; + }; + }; +}; + &clk { u-boot,dm-spl; u-boot,dm-pre-reloc; diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi index 9fb4d8aa8c2..976399ad602 100644 --- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi @@ -6,10 +6,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - firmware { optee { compatible = "linaro,optee-tz"; @@ -100,120 +96,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@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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x5fc00>; - filename = "u-boot.itb"; - }; - }; +&binman_uboot { + offset = <0x5fc00>; }; -- cgit v1.3.1 From f08c3fee5712b273aa5d04827e456549a359dceb Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:14 +0200 Subject: arm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order properties Alphabetically re-order properties. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-u-boot.dtsi | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index 5020255fa0f..770282d2b98 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -15,8 +15,8 @@ }; &aips1 { - u-boot,dm-spl; u-boot,dm-pre-reloc; + u-boot,dm-spl; }; &aips2 { @@ -29,10 +29,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>; @@ -76,17 +76,17 @@ fit { description = "Configuration to load ATF before U-Boot"; - #address-cells = <1>; fit,external-offset = ; fit,fdt-list = "of-list"; + #address-cells = <1>; images { uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; arch = "arm64"; compression = "none"; + description = "U-Boot (64-bit)"; load = ; + type = "standalone"; uboot_blob: blob-ext { filename = "u-boot-nodtb.bin"; @@ -94,12 +94,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"; @@ -107,17 +107,17 @@ }; binman_fip: fip { - description = "Trusted Firmware FIP"; - type = "firmware"; arch = "arm64"; compression = "none"; + description = "Trusted Firmware FIP"; load = <0x40310000>; + type = "firmware"; }; @fdt-SEQ { + compression = "none"; description = "NAME"; type = "flat_dt"; - compression = "none"; uboot_fdt_blob: blob-ext { filename = "u-boot.dtb"; @@ -130,9 +130,9 @@ binman_configuration: @config-SEQ { description = "NAME"; + fdt = "fdt-SEQ"; firmware = "uboot"; loadables = "atf"; - fdt = "fdt-SEQ"; }; }; }; @@ -143,20 +143,20 @@ 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>; }; }; }; &clk { - u-boot,dm-spl; u-boot,dm-pre-reloc; + u-boot,dm-spl; /delete-property/ assigned-clocks; /delete-property/ assigned-clock-parents; /delete-property/ assigned-clock-rates; @@ -167,6 +167,6 @@ }; &osc_24m { - u-boot,dm-spl; u-boot,dm-pre-reloc; + u-boot,dm-spl; }; -- cgit v1.3.1 From 86b7f2069c5ab441be4b8eb09089bfd668003b39 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:15 +0200 Subject: arm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filename Explicitly add SPL aka u-boot-spl.bin filename. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index 770282d2b98..8feb0f2592a 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -36,6 +36,7 @@ u-boot-spl { align-end = <4>; + filename = "u-boot-spl.bin"; }; blob_1: blob-ext@1 { -- cgit v1.3.1 From f17fb6cae4ddaa539f2a49851b112f2d547bbada Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 23 Oct 2021 01:15:16 +0200 Subject: arm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext naming Rather than using odd implicit blob-ext naming, explicitly specify the type to be of blob-ext and therefore also simplify the node naming. Signed-off-by: Marcel Ziswiler Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-u-boot.dtsi | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index 8feb0f2592a..7882fe73167 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -39,24 +39,28 @@ filename = "u-boot-spl.bin"; }; - 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"; }; }; @@ -89,8 +93,9 @@ load = ; type = "standalone"; - uboot_blob: blob-ext { + uboot_blob { filename = "u-boot-nodtb.bin"; + type = "blob-ext"; }; }; @@ -102,8 +107,9 @@ load = <0x920000>; type = "firmware"; - atf_blob: blob-ext { + atf_blob { filename = "bl31.bin"; + type = "blob-ext"; }; }; @@ -120,8 +126,9 @@ description = "NAME"; type = "flat_dt"; - uboot_fdt_blob: blob-ext { + uboot_fdt_blob { filename = "u-boot.dtb"; + type = "blob-ext"; }; }; }; @@ -143,14 +150,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"; }; }; }; -- cgit v1.3.1 From 7d926c9544c21e4ce899b31a265edbed551d2b92 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Fri, 7 Jan 2022 12:41:35 -0800 Subject: imx8mm_venice: switch to use binman to pack images Use binman to pack images. Note that imx8mm_venice supports several boards via multiple DTB's thus in the fit node we must use: - fit,fdt-list = "of-list" - fdt-SEQ - config-SEQ Signed-off-by: Tim Harvey Reviewed-by: Marcel Ziswiler Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/imx8m/Kconfig | 1 + board/gateworks/venice/Kconfig | 3 +-- board/gateworks/venice/README | 2 +- board/gateworks/venice/imximage-8mm-lpddr4.cfg | 9 +++++++++ configs/imx8mm_venice_defconfig | 4 ++-- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 board/gateworks/venice/imximage-8mm-lpddr4.cfg diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index d630a73f13b..d6a869068a3 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -73,6 +73,7 @@ config TARGET_IMX8MM_ICORE_MX8MM config TARGET_IMX8MM_VENICE bool "Support Gateworks Venice iMX8M Mini module" + select BINMAN select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 diff --git a/board/gateworks/venice/Kconfig b/board/gateworks/venice/Kconfig index 639bf35d205..687b94f24dd 100644 --- a/board/gateworks/venice/Kconfig +++ b/board/gateworks/venice/Kconfig @@ -10,6 +10,5 @@ config SYS_CONFIG_NAME default "imx8mm_venice" config IMX_CONFIG - default "arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg" - + default "board/gateworks/venice/imximage-8mm-lpddr4.cfg" endif diff --git a/board/gateworks/venice/README b/board/gateworks/venice/README index 6a0ab1ef10a..773cc09e872 100644 --- a/board/gateworks/venice/README +++ b/board/gateworks/venice/README @@ -25,7 +25,7 @@ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin . Build U-Boot ============ $ make imx8mm_venice_defconfig -$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 +$ make CROSS_COMPILE=aarch64-linux-gnu- Update eMMC =========== diff --git a/board/gateworks/venice/imximage-8mm-lpddr4.cfg b/board/gateworks/venice/imximage-8mm-lpddr4.cfg new file mode 100644 index 00000000000..ccaa765cb7d --- /dev/null +++ b/board/gateworks/venice/imximage-8mm-lpddr4.cfg @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 Gateworks Corporation + */ + +#define __ASSEMBLY__ + +BOOT_FROM sd +LOADER u-boot-spl-ddr.bin 0x7E1000 diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig index c4c75d2a38e..6f522880d70 100644 --- a/configs/imx8mm_venice_defconfig +++ b/configs/imx8mm_venice_defconfig @@ -25,7 +25,7 @@ CONFIG_SYS_LOAD_ADDR=0x40480000 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_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y # CONFIG_USE_BOOTCOMMAND is not set @@ -56,7 +56,7 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_LIST="imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902" +CONFIG_OF_LIST="imx8mm-venice imx8mm-venice-gw71xx-0x imx8mm-venice-gw72xx-0x imx8mm-venice-gw73xx-0x imx8mm-venice-gw7901 imx8mm-venice-gw7902" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -- cgit v1.3.1 From 83514ca08b166386e3b9ba16f1bbd1372874ab5b Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 7 Jan 2022 15:16:11 -0600 Subject: board: phytec: imx8mm-phycore: Remove duplicate binman node The binman node is part of the imx8mm-u-boot.dtsi file which is duplicated in phycore-imx8mm-u-boot.dtsi and causes a build error. Remove the duplicate. Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration") Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam --- arch/arm/dts/phycore-imx8mm-u-boot.dtsi | 122 -------------------------------- 1 file changed, 122 deletions(-) diff --git a/arch/arm/dts/phycore-imx8mm-u-boot.dtsi b/arch/arm/dts/phycore-imx8mm-u-boot.dtsi index f842e02c771..7c2dfb4a273 100644 --- a/arch/arm/dts/phycore-imx8mm-u-boot.dtsi +++ b/arch/arm/dts/phycore-imx8mm-u-boot.dtsi @@ -7,10 +7,6 @@ #include "imx8mm-u-boot.dtsi" / { - binman: binman { - multiple-images; - }; - wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -73,121 +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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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@1 { - filename = "spl.bin"; - offset = <0x0>; - }; - - uboot: blob-ext@2 { - filename = "u-boot.itb"; - offset = <0x57c00>; - }; - }; -}; -- cgit v1.3.1 From c225601c60de7757a51ac099a39eee5935dbc37d Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 7 Jan 2022 15:16:12 -0600 Subject: imx: imx8mm: imx8mm-kontron-n801x-s: Fix binman error The binman node is part of the imx8mm-u-boot.dtsi file which is duplicated in imx8mm-kontron-n801x-s-u-boot.dtsi and causes a build error. Remove the duplicate. Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration") Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam --- arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi | 146 ------------------------ 1 file changed, 146 deletions(-) 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 5e368a61bc9..22d18e6f1cf 100644 --- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi @@ -11,10 +11,6 @@ usb1 = &usbotg2; }; - binman: binman { - multiple-images; - }; - wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>; @@ -130,145 +126,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 = ; - - images { - uboot { - description = "U-Boot (64-bit)"; - type = "standalone"; - arch = "arm64"; - compression = "none"; - load = ; - - 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@1 { - offset = <0x0>; - filename = "spl.bin"; - }; - - uboot: blob-ext@2 { - offset = <0x57c00>; - filename = "u-boot.itb"; - }; - }; - - u-boot-update { - filename = "firmware-update.itb"; - - fit { - description = "Configuration for firmware update file"; - - images { - flash-bin { - description = "U-Boot flash image"; - type = "firmware"; - os = "u-boot"; - arch = "arm"; - compress = "none"; - load = <0>; /* unused */ - - blob { - filename = "flash.bin"; - }; - - }; - }; - }; - }; -}; -- cgit v1.3.1