]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mach-imx: Add i.MX 8ULP binman support
authorGary Bisson <bisson.gary@gmail.com>
Mon, 5 Aug 2024 21:25:10 +0000 (23:25 +0200)
committerFabio Estevam <festevam@denx.de>
Tue, 13 Aug 2024 11:28:24 +0000 (08:28 -0300)
- Re-use i.MX 93 Makefile target as similar boot process
- Create imx8ulp-u-boot.dtsi for binman image architecture
- Create both SPL and U-Boot containers configuration

Key differences between the 93 and 8ULP SPL container are:
- No LPDDR training library needed for 8ULP
- 8ULP requires a uPower binary (RISC-V core) for power management
- 8ULP also requires a M33 binary to work properly

Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/dts/imx8ulp-u-boot.dtsi [new file with mode: 0644]
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/imx8ulp/container.cfg [new file with mode: 0644]
arch/arm/mach-imx/imx8ulp/imximage.cfg [new file with mode: 0644]

diff --git a/arch/arm/dts/imx8ulp-u-boot.dtsi b/arch/arm/dts/imx8ulp-u-boot.dtsi
new file mode 100644 (file)
index 0000000..30baaef
--- /dev/null
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#ifdef CONFIG_BINMAN
+/ {
+       binman: binman {
+               multiple-images;
+       };
+};
+
+&binman {
+       u-boot-spl-ddr {
+               align = <4>;
+               align-size = <4>;
+               filename = "u-boot-spl-ddr.bin";
+               pad-byte = <0xff>;
+
+               u-boot-spl {
+                       align-end = <4>;
+                       filename = "u-boot-spl.bin";
+               };
+       };
+
+       spl {
+               filename = "spl.bin";
+
+               mkimage {
+                       args = "-n spl/u-boot-spl.cfgout -T imx8image -e 0x22020000";
+
+                       blob {
+                               filename = "u-boot-spl-ddr.bin";
+                       };
+               };
+       };
+
+       u-boot-container {
+               filename = "u-boot-container.bin";
+
+               mkimage {
+                       args = "-n u-boot-container.cfgout -T imx8image -e 0x0";
+
+                       blob {
+                               filename = "u-boot.bin";
+                       };
+               };
+       };
+
+       imx-boot {
+               filename = "flash.bin";
+               pad-byte = <0x00>;
+
+               spl: blob-ext@1 {
+                       filename = "spl.bin";
+                       offset = <0x0>;
+                       align-size = <0x400>;
+                       align = <0x400>;
+               };
+
+               uboot: blob-ext@2 {
+                       filename = "u-boot-container.bin";
+               };
+       };
+};
+#endif
index ef0caed3f7f3584cb36c590b9af0a0eab485a27c..b311d176d64d4eace8553dd284b61c42069accef 100644 (file)
@@ -129,7 +129,7 @@ DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o u-boot-dtb.cfgout $(srctre
 else ifeq ($(CONFIG_ARCH_IMX8M), y)
 IMAGE_TYPE := imx8mimage
 DEPFILE_EXISTS := 0
-else ifeq ($(CONFIG_ARCH_IMX9), y)
+else ifeq ($(CONFIG_ARCH_IMX9)$(CONFIG_ARCH_IMX8ULP), y)
 IMAGE_TYPE := imx8image
 DEPFILE_EXISTS := 0
 else
@@ -215,7 +215,7 @@ flash.bin: spl/u-boot-spl.bin FORCE
 endif
 endif
 
-ifeq ($(CONFIG_ARCH_IMX9), y)
+ifeq ($(CONFIG_ARCH_IMX9)$(CONFIG_ARCH_IMX8ULP), y)
 
 quiet_cmd_imx9_check = CHECK    $@
 cmd_imx9_check = $(srctree)/tools/imx9_image.sh $@
diff --git a/arch/arm/mach-imx/imx8ulp/container.cfg b/arch/arm/mach-imx/imx8ulp/container.cfg
new file mode 100644 (file)
index 0000000..029b791
--- /dev/null
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+BOOT_FROM SD 0x400
+SOC_TYPE ULP
+CONTAINER
+IMAGE A35 bl31.bin 0x20040000
+IMAGE A35 u-boot.bin CONFIG_TEXT_BASE
diff --git a/arch/arm/mach-imx/imx8ulp/imximage.cfg b/arch/arm/mach-imx/imx8ulp/imximage.cfg
new file mode 100644 (file)
index 0000000..a55359f
--- /dev/null
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+BOOT_FROM SD 0x400
+SOC_TYPE ULP
+APPEND mx8ulpa2-ahab-container.img
+CONTAINER
+IMAGE PWR upower.bin
+IMAGE M40 m33_image.bin 0x1ffc2000
+IMAGE A35 u-boot-spl-ddr.bin 0x22020000