remoteproc: Add support for i.MX8M[M/N/P/Q] and i.MX93
Subsystems (7)
cover remoteproc: Add support for i.MX8M[M/N/P/Q] and i.MX93
This patch series introduces remoteproc support for NXP i.MX8M and i.MX93 platforms. Most of the i.MX-specific logic is ported from the Linux kernel to ensure compatibility and maintainability.
The existing bootaux command in U-Boot only supports loading raw binary images. However, this approach fails when the remote processor firmware contains sections that must be loaded into both TCM and DDR. To address this limitation, need to use remoteproc framework ELF loader, enabling proper loading of segmented firmware images.
Patch Summary:
Patches 1–2: Import memcpy_io and memset_io from the Linux kernel and enable
them in the remoteproc subsystem.
Patches 3–11: Add platform-specific remoteproc support for i.MX8M and i.MX93. Patch 6: Temporarily adds Cortex-M nodes to x-u-boot.dtsi since they are not
yet available in the upstream Linux device tree. These nodes can be removed once they are merged upstream.
NXP internal R-b tags are kept, because the patches are directly cherry-picked from NXP LTS tree.
---
Peng Fan (11):
lib: Import iomem_copy from Linux Kernel
remoteproc: Extend device_to_virt with a is_iomem parameter
remoteproc: Add imx_rproc driver to support NXP i.MX8MP/N
remoteproc: imx_rproc: Support i.MX8MQ/M
remoteproc: imx_rproc: Add support for i.MX93 CM33
arm: dts: imx8m: Add remoteproc node
imx8mp: Enable remoteproc for i.MX8MP EVK
imx8mm: Enable remoteproc for i.MX8MM EVK
imx8mn: Enable remoteproc for i.MX8MN EVK
imx8mq: Enable remoteproc for i.MX8MQ EVK
imx93: Enable remoteproc for i.MX93-EVK/QSB/FRDM
MAINTAINERS | 1 + arch/arm/dts/imx8mm-u-boot.dtsi | 4 + arch/arm/dts/imx8mn-u-boot.dtsi | 4 + arch/arm/dts/imx8mp-u-boot.dtsi | 4 + arch/arm/dts/imx8mq-u-boot.dtsi | 4 + arch/arm/mach-imx/imx8m/Kconfig | 20 ++ arch/arm/mach-imx/imx9/Kconfig | 12 ++ drivers/remoteproc/Kconfig | 7 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 370 ++++++++++++++++++++++++++++++++++ drivers/remoteproc/imx_rproc.h | 56 +++++ drivers/remoteproc/renesas_apmu.c | 3 +- drivers/remoteproc/rproc-elf-loader.c | 93 ++++++--- drivers/remoteproc/sandbox_testproc.c | 3 +- drivers/remoteproc/stm32_copro.c | 3 +- drivers/remoteproc/ti_k3_dsp_rproc.c | 2 +- drivers/remoteproc/ti_k3_r5f_rproc.c | 2 +- include/asm-generic/io.h | 37 ++++ include/remoteproc.h | 3 +- lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++ 21 files changed, 731 insertions(+), 35 deletions(-)
---
base-commit: 48f21e66e360552c75d70a50421d0e0ed1f59e90
change-id: 20251012-imx-rproc-383db752c3f7
Best regards,
Signature · 1 line
Peng Fan <[email protected]>
PATCH 1/11 lib: Import iomem_copy from Linux Kernel
From: Peng Fan <[email protected]>
memcpy_{from,to}io and memset_io is needed for i.MX8M to write TCM area. So import the APIs from Linux Kernel 6.17.
--- include/asm-generic/io.h | 37 +++++++++++++ lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+)
include/asm-generic/io.h +37 -0
@@ -3,6 +3,7 @@* Generic I/O functions. * * Copyright (c) 2016 Imagination Technologies Ltd. +* Copyright 2025 NXP */ #ifndef __ASM_GENERIC_IO_H__
@@ -453,5 +454,41 @@ static inline void iowrite64_rep(volatile void __iomem *addr,#endif #endif /* CONFIG_64BIT */ +#ifndef memset_io +/** +* memset_io - Set a range of I/O memory to a constant value +* @addr: The beginning of the I/O-memory range to set +* @val: The value to set the memory to +* @count: The number of bytes to set +* +* Set a range of I/O memory to a given value. +*/ +void memset_io (volatile void __iomem *addr,int val,size_t count); +#endif + +#ifndef memcpy_fromio +/** +* memcpy_fromio - Copy a block of data from I/O memory +* @dst: The (RAM) destination for the copy +* @src: The (I/O memory) source for the data +* @count: The number of bytes to copy +* +* Copy a block of data from I/O memory. +*/ +void memcpy_fromio (void *dst,const volatile void __iomem *src,size_t count); +#endif + +#ifndef memcpy_toio +/** +* memcpy_toio - Copy a block of data into I/O memory +* @dst: The (I/O memory) destination for the copy +* @src: The (RAM) source for the data +* @count: The number of bytes to copy +* +* Copy a block of data to I/O memory. +*/ +void memcpy_toio (volatile void __iomem *dst,const void *src,size_t count); +#endif +#endif /* !__ASSEMBLY__ */ #endif /* __ASM_GENERIC_IO_H__ */
lib/Makefile +1 -0
@@ -123,6 +123,7 @@ obj-y += ctype.o obj-y += div64.o obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdtdec.o fdtdec_common.o obj-y += hang.o +obj-y += iomem_copy.o obj-y += linux_compat.o obj-y += linux_string.o obj-$(CONFIG_$(PHASE_)LMB) += lmb.o
lib/iomem_copy.c new file +136 -0
136 lines not on this page · raw message
Signature · 1 line
2.35.3
Re: [PATCH 01/11] lib: Import iomem_copy from Linux Kernel
Quoted 27 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
memcpy_{from,to}io and
memset_iois needed for i.MX8M to write TCM area. So import the APIs from Linux Kernel 6.17.Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- include/asm-generic/io.h | 37 +++++++++++++ lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++3 files changed, 174 insertions(+)include/asm-generic/io.h +1
-0@@ -3,6 +3,7 @@* Generic I/O functions. * * Copyright (c) 2016 Imagination Technologies Ltd. +* Copyright 2025 NXP */ #ifndef __ASM_GENERIC_IO_H__
include/asm-generic/io.h static inline void iowrite64_rep(volatile void __iomem *addr, · line 457
Quoted 4 lines
include/asm-generic/io.h +1
-0@@ -453,5 +454,41 @@ static inline void iowrite64_rep(volatile void __iomem *addr,#endif #endif /* CONFIG_64BIT */ +#ifndef memset_io
If you are on arm, then
arch/arm/include/asm/io.h defines these io functions, for ARM64 and non-ARM64 platform,
In your SOC, how this works.
Quoted 14 lines
include/asm-generic/io.h +13
-0+/** +* memset_io - Set a range of I/O memory to a constant value +* @addr: The beginning of the I/O-memory range to set +* @val: The value to set the memory to +* @count: The number of bytes to set +* +* Set a range of I/O memory to a given value. +*/ +void memset_io (volatile void __iomem *addr,int val,size_t count); +#endif + +#ifndef memcpy_fromio +/**
Re: [PATCH 01/11] lib: Import iomem_copy from Linux Kernel
Quoted 34 lines · Udit
Quoted 26 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
memcpy_{from,to}io and
memset_iois needed for i.MX8M to write TCM area. So import the APIs from Linux Kernel 6.17.Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- include/asm-generic/io.h | 37 +++++++++++++ lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++3 files changed, 174 insertions(+)include/asm-generic/io.h +1
-0@@ -3,6 +3,7 @@* Generic I/O functions. * * Copyright (c) 2016 Imagination Technologies Ltd. +* Copyright 2025 NXP */ #ifndef __ASM_GENERIC_IO_H__include/asm-generic/io.h static inline void iowrite64_rep(volatile void __iomem *addr, · line 456
Quoted 3 lines
include/asm-generic/io.h +1
-0@@ -453,5 +454,41 @@ static inline void iowrite64_rep(volatile void __iomem *addr,#endif #endif /* CONFIG_64BIT */ +#ifndef memset_ioIf you are on arm, then
Quoted 4 lines
arch/arm/include/asm/io.hdefines these io functions, for ARM64 and non-ARM64 platform,In your SOC, how this works.
Thanks for pointing this out, I thought these helpers were not defined, so I import this file from Linux. So on my platform, the arm64 io helpers are used, the functions in this file are not used because there is "#ifndef xx".
But anyway, for non-ARM/ARM64 platforms, this file is still useful.
I could drop this if you prefer. Or keep this for other ARCH.
Thanks
Peng
Quoted 16 lines
Quoted 15 lines
include/asm-generic/io.h +13
-0+/** +* memset_io - Set a range of I/O memory to a constant value +* @addr: The beginning of the I/O-memory range to set +* @val: The value to set the memory to +* @count: The number of bytes to set +* +* Set a range of I/O memory to a given value. +*/ +void memset_io (volatile void __iomem *addr,int val,size_t count); +#endif + +#ifndef memcpy_fromio +/**
Re: [PATCH 01/11] lib: Import iomem_copy from Linux Kernel
Hi Peng.
Quoted 36 lines · Peng Fan
Quoted 31 lines · Udit
Quoted 25 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
memcpy_{from,to}io and
memset_iois needed for i.MX8M to write TCM area. So import the APIs from Linux Kernel 6.17.Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- include/asm-generic/io.h | 37 +++++++++++++ lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+)include/asm-generic/io.h +1
-0@@ -3,6 +3,7 @@* Generic I/O functions. * * Copyright (c) 2016 Imagination Technologies Ltd. +* Copyright 2025 NXP */ #ifndef __ASM_GENERIC_IO_H__include/asm-generic/io.h static inline void iowrite64_rep(volatile void __iomem *addr, · line 456
Quoted 3 lines
include/asm-generic/io.h +1
-0@@ -453,5 +454,41 @@ static inline void iowrite64_rep(volatile void __iomem *addr,#endif #endif /* CONFIG_64BIT */ +#ifndef memset_ioIf you are on arm, then
Quoted 4 lines
arch/arm/include/asm/io.hdefines these io functions, for ARM64 and non-ARM64 platform,In your SOC, how this works.
Quoted 8 lines
Thanks for pointing this out, I thought these helpers were not defined, so I import this file from Linux. So on my platform, the arm64 io helpers are used, the functions in this file are not used because there is "#ifndef xx".
But anyway, for non-ARM/ARM64 platforms, this file is still useful.
I could drop this if you prefer. Or keep this for other ARCH.
if you are test on other ARCH, please keep otherwise, you can drop this.
Quoted 18 lines
Thanks
PengQuoted 14 lines
Quoted 14 lines
include/asm-generic/io.h +13
-0+/** +* memset_io - Set a range of I/O memory to a constant value +* @addr: The beginning of the I/O-memory range to set +* @val: The value to set the memory to +* @count: The number of bytes to set +* +* Set a range of I/O memory to a given value. +*/ +void memset_io (volatile void __iomem *addr,int val,size_t count); +#endif + +#ifndef memcpy_fromio +/**
PATCH 2/11 remoteproc: Extend device_to_virt with a is_iomem parameter
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Some areas needs to be initialized by using memcpy_toio and memset_io. Following Linux Kernel commit: 40df0a91b2a5 ("remoteproc: add is_iomem to da_to_va"), add this to U-Boot.
--- drivers/remoteproc/renesas_apmu.c | 3 +- drivers/remoteproc/rproc-elf-loader.c | 93 ++++++++++++++++++++++++----------- drivers/remoteproc/sandbox_testproc.c | 3 +- drivers/remoteproc/stm32_copro.c | 3 +- drivers/remoteproc/ti_k3_dsp_rproc.c | 2 +- drivers/remoteproc/ti_k3_r5f_rproc.c | 2 +- include/remoteproc.h | 3 +- 7 files changed, 74 insertions(+), 35 deletions(-)
drivers/remoteproc/renesas_apmu.c +2 -1
@@ -170,11 +170,12 @@ static int renesas_apmu_rproc_init(struct udevice *dev)* @dev: corresponding remote processor device * @da: device address * @size: Size of the memory region @da is pointing to +* @is_iomem: optional pointer filled in to indicate if @da is iomapped memory * * Return: converted virtual address */ static void *renesas_apmu_rproc_device_to_virt (struct udevice *dev,ulong da, -ulong size) +ulong size,bool *is_iomem) {/* * The Cortex R52 and A76 share the same address space,
drivers/remoteproc/rproc-elf-loader.c +64 -29
178 lines not on this page · raw message
drivers/remoteproc/sandbox_testproc.c +2 -1
@@ -308,10 +308,11 @@ static int sandbox_testproc_ping(struct udevice *dev)* @dev: device to operate upon * @da: device address * @size: Size of the memory region @da is pointing to +* @is_iomem: optional pointer filled in to indicate if @da is iomapped memory * Return: converted virtual address */ static void *sandbox_testproc_device_to_virt (struct udevice *dev,ulong da, -ulong size) +ulong size,bool *is_iomem) {u64 paddr;
drivers/remoteproc/stm32_copro.c +2 -1
@@ -61,10 +61,11 @@ static int stm32_copro_probe(struct udevice *dev)* @dev: corresponding STM32 remote processor device * @da: device address * @size: Size of the memory region @da is pointing to +* @is_iomem: optional pointer filled in to indicate if @da is iomapped memory * Return: converted virtual address */ static void *stm32_copro_device_to_virt (struct udevice *dev,ulong da, -ulong size) +ulong size,bool *is_iomem) {fdt32_t in_addr =cpu_to_be32 (da), end_addr;u64 paddr;
drivers/remoteproc/ti_k3_dsp_rproc.c +1 -1
@@ -261,7 +261,7 @@ static int k3_dsp_reset(struct udevice *dev)return 0 ; } -static void *k3_dsp_da_to_va (struct udevice *dev,ulong da,ulong len) +static void *k3_dsp_da_to_va (struct udevice *dev,ulong da,ulong len,bool *is_iomem) {struct k3_dsp_privdata *dsp =dev_get_priv (dev);phys_addr_t bus_addr, dev_addr;
drivers/remoteproc/ti_k3_r5f_rproc.c +1 -1
@@ -534,7 +534,7 @@ proc_release:return ret; } -static void *k3_r5f_da_to_va (struct udevice *dev,ulong da,ulong size) +static void *k3_r5f_da_to_va (struct udevice *dev,ulong da,ulong size,bool *is_iomem) {struct k3_r5f_core *core =dev_get_priv (dev);void __iomem *va =NULL ;
include/remoteproc.h +2 -1
@@ -495,9 +495,10 @@ struct dm_rproc_ops {* @dev: Remote proc device * @da: Device address * @size: Size of the memory region @da is pointing to +* @is_iomem: optional pointer filled in to indicate if @da is iomapped memory * @return virtual address. */ -void * (*device_to_virt)(struct udevice *dev,ulong da,ulong size); +void * (*device_to_virt)(struct udevice *dev,ulong da,ulong size,bool *is_iomem);int (*add_res)(struct udevice *dev,struct rproc_mem_entry *mapping); void * (*alloc_mem)(struct udevice *dev, unsigned long len,
Signature · 1 line
2.35.3
PATCH 3/11 remoteproc: Add imx_rproc driver to support NXP i.MX8MP/N
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Support i.MX8MP/N with start/stop/device_to_virt/is_running/load implemented. The device static configuration is mostly reused from Linux Kernel with adapation to U-Boot dm_rproc_ops.
The booting method:
- load mmc 2:2 0x90000000 /lib/firmware/imx8mp_m7_DDR_rpmsg_lite_str_echo_ rtos.elf
- rproc load 0 0x90000000 ${filesize}
- rproc start 0
--- MAINTAINERS | 1 + drivers/remoteproc/Kconfig | 7 ++ drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 233 +++++++++++++++++++++++++++++++++++++++++ drivers/remoteproc/imx_rproc.h | 56 ++++++++++ 5 files changed, 298 insertions(+)
MAINTAINERS +1 -0
@@ -319,6 +319,7 @@ F: board/freescale/common/ F: common/spl/spl_imx_container.c F: doc/imx/ F: drivers/mailbox/imx-mailbox.c +F: drivers/remoteproc/imx* F: drivers/serial/serial_mxc.c F: include/imx_container.h
drivers/remoteproc/Kconfig +7 -0
@@ -33,6 +33,13 @@ config REMOTEPROC_ADI_SC5XX Say 'y' here to add support for loading code onto SHARC cores in an ADSP-SC5xx SoC from Analog Devices +config REMOTEPROC_IMX + bool "Support for NXP i.MX remoteproc" + select REMOTEPROC + depends on DM && MACH_IMX && OF_CONTROL + help + Say 'y' here to add support for i.MX remoteproc. + config REMOTEPROC_RENESAS_APMU bool "Support for Renesas R-Car Gen4 APMU start of CR52 processor" select REMOTEPROC
drivers/remoteproc/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_$(PHASE_)REMOTEPROC) += rproc-uclass.o rproc-elf-loader.o # Remote proc drivers - Please keep this list alphabetically sorted. obj-$(CONFIG_K3_SYSTEM_CONTROLLER) += k3_system_controller.o obj-$(CONFIG_REMOTEPROC_ADI_SC5XX) += adi_sc5xx_rproc.o +obj-$(CONFIG_REMOTEPROC_IMX) += imx_rproc.o obj-$(CONFIG_REMOTEPROC_RENESAS_APMU) += renesas_apmu.o obj-$(CONFIG_REMOTEPROC_SANDBOX) += sandbox_testproc.o obj-$(CONFIG_REMOTEPROC_STM32_COPRO) += stm32_copro.o
drivers/remoteproc/imx_rproc.c new file +233 -0
233 lines not on this page · raw message
drivers/remoteproc/imx_rproc.h new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
2.35.3
PATCH 4/11 remoteproc: imx_rproc: Support i.MX8MQ/M
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
i.MX8MQ/M use MMIO based method to directly configure SRC registers to start/stop M4.
Add mmio ops to start/stop/is_running.
Add i.MX8MQ cfg data, i.MX8MN reuses i.MX8MQ data.
--- drivers/remoteproc/imx_rproc.c | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+)
drivers/remoteproc/imx_rproc.c +107 -0
@@ -9,10 +9,27 @@#include <dm/device_compat.h> #include <linux/arm-smccc.h> #include <linux/types.h> +#include <regmap.h> #include <remoteproc.h> +#include <syscon.h> #include "imx_rproc.h" +#define IMX7D_SRC_SCR 0x0C +#define IMX7D_ENABLE_M4 BIT(3) +#define IMX7D_SW_M4P_RST BIT(2) +#define IMX7D_SW_M4C_RST BIT(1) +#define IMX7D_SW_M4C_NON_SCLR_RST BIT(0) + +#define IMX7D_M4_RST_MASK (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \ + | IMX7D_SW_M4C_RST \ + | IMX7D_SW_M4C_NON_SCLR_RST) + +#define IMX7D_M4_START (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \ + | IMX7D_SW_M4C_RST) +#define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_RST | \ + IMX7D_SW_M4C_NON_SCLR_RST) +#define IMX_RPROC_MEM_MAX 32#define IMX_SIP_RPROC 0xC2000005
@@ -22,6 +39,7 @@struct imx_rproc {const struct imx_rproc_dcfg *dcfg; +struct regmap *regmap; };/* att flags: lower 16 bits specifying core, higher 16 bits for flags */
@@ -38,6 +56,14 @@ static int imx_rproc_arm_smc_start(struct udevice *dev)return res.a0; } +static int imx_rproc_mmio_start (struct udevice *dev) +{ +struct imx_rproc *priv =dev_get_priv (dev); +const struct imx_rproc_dcfg *dcfg = priv->dcfg; + +return regmap_update_bits (priv->regmap, dcfg->src_reg, dcfg->src_mask, dcfg->src_start); +} +static int imx_rproc_start (struct udevice *dev) {struct imx_rproc *priv =dev_get_priv (dev);
@@ -65,6 +91,14 @@ static int imx_rproc_arm_smc_stop(struct udevice *dev)return res.a0; } +static int imx_rproc_mmio_stop (struct udevice *dev) +{ +struct imx_rproc *priv =dev_get_priv (dev); +const struct imx_rproc_dcfg *dcfg = priv->dcfg; + +return regmap_update_bits (priv->regmap, dcfg->src_reg, dcfg->src_mask, dcfg->src_stop); +} +static int imx_rproc_stop (struct udevice *dev) {struct imx_rproc *priv =dev_get_priv (dev);
@@ -92,6 +126,25 @@ static int imx_rproc_arm_smc_is_running(struct udevice *dev)return 1 ; } +static int imx_rproc_mmio_is_running (struct udevice *dev) +{ +struct imx_rproc *priv =dev_get_priv (dev); +const struct imx_rproc_dcfg *dcfg = priv->dcfg; +int ret; +u32 val; + + ret =regmap_read (priv->regmap, dcfg->src_reg, &val); +if (ret) { +dev_err (dev,"Failed to read src\n" ); +return ret; + } + +if ((val & dcfg->src_mask) != dcfg->src_stop) +return 0 ; + +return 1 ; +} +static int imx_rproc_is_running (struct udevice *dev) {struct imx_rproc *priv =dev_get_priv (dev);
@@ -171,6 +224,15 @@ static int imx_rproc_probe(struct udevice *dev) priv->dcfg = dcfg; +if (dcfg->method !=IMX_RPROC_MMIO ) +return 0 ; + + priv->regmap =syscon_regmap_lookup_by_phandle (dev,"syscon" ); +if (IS_ERR (priv->regmap)) { +dev_err (dev,"No syscon: %ld\n" ,PTR_ERR (priv->regmap)); +return PTR_ERR (priv->regmap); + } +return 0 ; }
@@ -217,9 +279,54 @@ static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mn = { .ops = &imx_rproc_ops_arm_smc, }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { +/* dev addr , sys addr , size , flags */ +/* TCML - alias */ + {0x00000000 ,0x007e0000 ,0x00020000 ,ATT_IOMEM }, +/* OCRAM_S */ + {0x00180000 ,0x00180000 ,0x00008000 ,0 }, +/* OCRAM */ + {0x00900000 ,0x00900000 ,0x00020000 ,0 }, +/* OCRAM */ + {0x00920000 ,0x00920000 ,0x00020000 ,0 }, +/* QSPI Code - alias */ + {0x08000000 ,0x08000000 ,0x08000000 ,0 }, +/* DDR (Code) - alias */ + {0x10000000 ,0x40000000 ,0x0FFE0000 ,0 }, +/* TCML/U */ + {0x1FFE0000 ,0x007E0000 ,0x00040000 ,ATT_OWN |ATT_IOMEM }, +/* OCRAM_S */ + {0x20180000 ,0x00180000 ,0x00008000 ,ATT_OWN }, +/* OCRAM */ + {0x20200000 ,0x00900000 ,0x00020000 ,ATT_OWN }, +/* OCRAM */ + {0x20220000 ,0x00920000 ,0x00020000 ,ATT_OWN }, +/* DDR (Data) */ + {0x40000000 ,0x40000000 ,0x80000000 ,0 }, +}; + +static const struct imx_rproc_plat_ops imx_rproc_ops_mmio = { + .start = imx_rproc_mmio_start, + .stop = imx_rproc_mmio_stop, + .is_running = imx_rproc_mmio_is_running, +}; + +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg =IMX7D_SRC_SCR , + .src_mask =IMX7D_M4_RST_MASK , + .src_start =IMX7D_M4_START , + .src_stop =IMX7D_M4_STOP , + .att = imx_rproc_att_imx8mq, + .att_size =ARRAY_SIZE (imx_rproc_att_imx8mq), + .method =IMX_RPROC_MMIO , + .ops = &imx_rproc_ops_mmio, +}; +static const struct udevice_id imx_rproc_ids[] = { + { .compatible ="fsl,imx8mm-cm4" , .data = (ulong)&imx_rproc_cfg_imx8mq }, { .compatible ="fsl,imx8mn-cm7" , .data = (ulong)&imx_rproc_cfg_imx8mn, }, { .compatible ="fsl,imx8mp-cm7" , .data = (ulong)&imx_rproc_cfg_imx8mn, }, + { .compatible ="fsl,imx8mq-cm4" , .data = (ulong)&imx_rproc_cfg_imx8mq }, {} };
Signature · 1 line
2.35.3
PATCH 5/11 remoteproc: imx_rproc: Add support for i.MX93 CM33
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Introduce remote processor configuration for the i.MX93 Cortex-M33 core.
This patch adds:
- Address translation table (ATT) for i.MX93, including TCM (secure and non-secure) and DDR regions.
- A new device configuration structure imx_rproc_cfg_imx93 using SMC method and ARM SMC ops.
- Device tree match entry for "fsl,imx93-cm33"
This enables remoteproc framework to properly initialize and manage the Cortex-M33 core on i.MX93 platforms.
--- drivers/remoteproc/imx_rproc.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
drivers/remoteproc/imx_rproc.c +30 -0
@@ -322,11 +322,41 @@ static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { .ops = &imx_rproc_ops_mmio, }; +static const struct imx_rproc_att imx_rproc_att_imx93[] = { +/* dev addr , sys addr , size , flags */ +/* TCM CODE NON-SECURE */ + {0x0FFC0000 ,0x201C0000 ,0x00040000 ,ATT_OWN |ATT_IOMEM }, + +/* TCM CODE SECURE */ + {0x1FFC0000 ,0x201C0000 ,0x00040000 ,ATT_OWN |ATT_IOMEM }, + +/* TCM SYS NON-SECURE*/ + {0x20000000 ,0x20200000 ,0x00040000 ,ATT_OWN |ATT_IOMEM }, + +/* TCM SYS SECURE*/ + {0x30000000 ,0x20200000 ,0x00040000 ,ATT_OWN |ATT_IOMEM }, + +/* DDR */ + {0x80000000 ,0x80000000 ,0x10000000 ,0 }, + {0x90000000 ,0x80000000 ,0x10000000 ,0 }, + + {0xC0000000 ,0xC0000000 ,0x10000000 ,0 }, + {0xD0000000 ,0xC0000000 ,0x10000000 ,0 }, +}; + +static const struct imx_rproc_dcfg imx_rproc_cfg_imx93 = { + .att = imx_rproc_att_imx93, + .att_size =ARRAY_SIZE (imx_rproc_att_imx93), + .method =IMX_RPROC_SMC , + .ops = &imx_rproc_ops_arm_smc, +}; +static const struct udevice_id imx_rproc_ids[] = { { .compatible ="fsl,imx8mm-cm4" , .data = (ulong)&imx_rproc_cfg_imx8mq }, { .compatible ="fsl,imx8mn-cm7" , .data = (ulong)&imx_rproc_cfg_imx8mn, }, { .compatible ="fsl,imx8mp-cm7" , .data = (ulong)&imx_rproc_cfg_imx8mn, }, { .compatible ="fsl,imx8mq-cm4" , .data = (ulong)&imx_rproc_cfg_imx8mq }, + { .compatible ="fsl,imx93-cm33" , .data = (ulong)&imx_rproc_cfg_imx93 }, {} };
Signature · 1 line
2.35.3
PATCH 6/11 arm: dts: imx8m: Add remoteproc node
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add CM7/4 nodes for i.MX8MQ/M/N/P.
--- arch/arm/dts/imx8mm-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mn-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mp-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mq-u-boot.dtsi | 4 ++++ 4 files changed, 16 insertions(+)
arch/arm/dts/imx8mm-u-boot.dtsi +4 -0
@@ -15,6 +15,10 @@ }; }; #endif + imx8mm-cm4 { + compatible = "fsl,imx8mm-cm4"; + syscon = <&src>; + }; }; #ifdef CONFIG_FSL_CAAM
arch/arm/dts/imx8mn-u-boot.dtsi +4 -0
@@ -16,6 +16,10 @@ }; #endif + imx8mn-cm7 { + compatible = "fsl,imx8mn-cm7"; + }; + wdt-reboot { compatible = "wdt-reboot"; wdt = <&wdog1>;
arch/arm/dts/imx8mp-u-boot.dtsi +4 -0
@@ -16,6 +16,10 @@ }; }; #endif + + imx8mp-cm7 { + compatible = "fsl,imx8mp-cm7"; + }; }; #ifdef CONFIG_FSL_CAAM
arch/arm/dts/imx8mq-u-boot.dtsi +4 -0
@@ -7,6 +7,10 @@ binman: binman { }; + imx8mq-cm4 { + compatible = "fsl,imx8mq-cm4"; + syscon = <&src>; + }; }; &soc {
Signature · 1 line
2.35.3
Re: [PATCH 06/11] arm: dts: imx8m: Add remoteproc node
Quoted 4 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
Add CM7/4 nodes for i.MX8MQ/M/N/P.
Quoted 8 lines
Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- arch/arm/dts/imx8mm-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mn-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mp-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mq-u-boot.dtsi | 4 ++++ 4 files changed, 16 insertions(+)
Why is this in the u-boot.dtsi? We have dts/upstream/Bindings/remoteproc/fsl,imx-rproc.yaml and so your updates here should be compatible with that, yes?
Signature · 1 line
Tom
Re: [PATCH 06/11] arm: dts: imx8m: Add remoteproc node
Hi Tom,
Quoted 14 lines · Tom Rini
Quoted 4 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
Add CM7/4 nodes for i.MX8MQ/M/N/P.
Quoted 8 lines
Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- arch/arm/dts/imx8mm-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mn-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mp-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mq-u-boot.dtsi | 4 ++++ 4 files changed, 16 insertions(+)
Quoted 1 line
Why is this in the
u-boot.dtsi? We have
I am preparing the Linux dts patches and will send out for reviewing. Before those lands into Linux dts, we need that in imx8m*-u-boot.dtsi. After linux side done, we could clean up the imx8m*-u-boot.dtsi
Quoted 2 lines
dts/upstream/Bindings/remoteproc/fsl,imx-rproc.yamland so your updates here should be compatible with that, yes?
Yes. Per the dt-bindings, only compatible is required and that is what this patch added.
Thanks
Peng
Quoted 3 lines
Signature · 2 lines
-- Tom
Re: [PATCH 06/11] arm: dts: imx8m: Add remoteproc node
Quoted 23 lines · Peng Fan
Hi Tom,
Quoted 14 lines · Tom Rini
Quoted 4 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
Add CM7/4 nodes for i.MX8MQ/M/N/P.
Quoted 8 lines
Reviewed-by Ye Li <[email protected]>Signed-off-by Peng Fan <[email protected]>--- arch/arm/dts/imx8mm-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mn-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mp-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mq-u-boot.dtsi | 4 ++++ 4 files changed, 16 insertions(+)Quoted 1 line
Why is this in the
u-boot.dtsi? We haveI am preparing the Linux dts patches and will send out for reviewing. Before those lands into Linux dts, we need that in imx8m*-u-boot.dtsi. After linux side done, we could clean up the imx8m*-u-boot.dtsi
Quoted 5 lines
Quoted 2 lines
dts/upstream/Bindings/remoteproc/fsl,imx-rproc.yamland so your updates here should be compatible with that, yes?Yes. Per the dt-bindings, only compatible is required and that is what this patch added.
OK, thanks.
Signature · 1 line
Tom
PATCH 7/11 imx8mp: Enable remoteproc for i.MX8MP EVK
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select configs to enable remoteproc for NXP i.MX8MP EVK
--- arch/arm/mach-imx/imx8m/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-imx/imx8m/Kconfig +4 -0
@@ -248,6 +248,10 @@ config TARGET_IMX8MP_EVK select FSL_CAAM select ARCH_MISC_INIT select SPL_CRYPTO if SPL + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND
Signature · 1 line
2.35.3
PATCH 8/11 imx8mm: Enable remoteproc for i.MX8MM EVK
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select configs for remoteproc on i.MX8MM EVK boards
--- arch/arm/mach-imx/imx8m/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-imx/imx8m/Kconfig +4 -0
@@ -95,6 +95,10 @@ config TARGET_IMX8MM_EVK select FSL_CAAM select ARCH_MISC_INIT select SPL_CRYPTO if SPL + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND imply OF_UPSTREAM
Signature · 1 line
2.35.3
PATCH 9/11 imx8mn: Enable remoteproc for i.MX8MN EVK
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select configs to enable remoteproc for NXP i.MX8MN EVK boards
--- arch/arm/mach-imx/imx8m/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-imx/imx8m/Kconfig +8 -0
@@ -175,6 +175,10 @@ config TARGET_IMX8MN_EVK select IMX8M_LPDDR4 select FSL_CAAM select SPL_CRYPTO if SPL + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND
@@ -186,6 +190,10 @@ config TARGET_IMX8MN_DDR4_EVK select IMX8M_DDR4 select FSL_CAAM select SPL_CRYPTO if SPL + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND
Signature · 1 line
2.35.3
PATCH 10/11 imx8mq: Enable remoteproc for i.MX8MQ EVK
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select configs to enable remoteproc for i.MX8MQ EVK
--- arch/arm/mach-imx/imx8m/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-imx/imx8m/Kconfig +4 -0
@@ -67,6 +67,10 @@ config TARGET_IMX8MQ_EVK select FSL_CAAM select ARCH_MISC_INIT select SPL_CRYPTO if SPL + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND
Signature · 1 line
2.35.3
PATCH 11/11 imx93: Enable remoteproc for i.MX93-EVK/QSB/FRDM
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Select configs to enable remoteproc for i.MX93-EVK/QSB/FRDM
--- arch/arm/mach-imx/imx9/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-imx/imx9/Kconfig +12 -0
@@ -69,6 +69,10 @@ config TARGET_IMX93_9X9_QSB imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON config TARGET_IMX93_11X11_EVK bool "imx93_11x11_evk"
@@ -77,6 +81,10 @@ config TARGET_IMX93_11X11_EVK imply OF_UPSTREAM imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON config TARGET_IMX93_FRDM bool "imx93_frdm"
@@ -85,6 +93,10 @@ config TARGET_IMX93_FRDM select IMX9_LPDDR4X imply BOOTSTD_FULL imply BOOTSTD_BOOTCOMMAND + select CMD_REMOTEPROC + select REMOTEPROC_IMX + select REGMAP + select SYSCON config TARGET_IMX93_VAR_SOM bool "imx93_var_som"
Signature · 1 line
2.35.3
Quoted 10 lines · Peng Fan (OSS)
This patch series introduces remoteproc support for NXP i.MX8M and i.MX93 platforms. Most of the i.MX-specific logic is ported from the Linux kernel to ensure compatibility and maintainability.
The existing bootaux command in U-Boot only supports loading raw binary images. However, this approach fails when the remote processor firmware contains sections that must be loaded into both TCM and DDR. To address this limitation, need to use remoteproc framework ELF loader, enabling proper loading of segmented firmware images.
Quoted 4 lines
Patch Summary:
Patches 1–2: Import
memcpy_ioandmemset_iofrom the Linux kernel and enable
them in the remoteproc subsystem.
which CPU arch, you are using. I assume this is ARM-64 then I see already defined in
https://elixir.bootlin.com/u-boot/v2025.10/source/arch/arm/include/asm/io.h#L471
Quoted 50 lines
Patches 3–11: Add platform-specific remoteproc support for i.MX8M and i.MX93. Patch 6: Temporarily adds Cortex-M nodes to
x-u-boot.dtsisince they are not
yet available in the upstream Linux device tree. These nodes can be
removed once they are merged upstream.NXP internal R-b tags are kept, because the patches are directly cherry-picked from NXP LTS tree.
Signed-off-by Peng Fan <[email protected]>---
Peng Fan (11):
lib: Importiomem_copyfrom Linux Kernel
remoteproc: Extenddevice_to_virtwith ais_iomemparameter
remoteproc: Addimx_rprocdriver to support NXP i.MX8MP/N
remoteproc:imx_rproc: Support i.MX8MQ/M
remoteproc:imx_rproc: Add support for i.MX93 CM33
arm: dts: imx8m: Add remoteproc node
imx8mp: Enable remoteproc for i.MX8MP EVK
imx8mm: Enable remoteproc for i.MX8MM EVK
imx8mn: Enable remoteproc for i.MX8MN EVK
imx8mq: Enable remoteproc for i.MX8MQ EVK
imx93: Enable remoteproc for i.MX93-EVK/QSB/FRDMMAINTAINERS | 1 + arch/arm/dts/imx8mm-u-boot.dtsi | 4 + arch/arm/dts/imx8mn-u-boot.dtsi | 4 + arch/arm/dts/imx8mp-u-boot.dtsi | 4 + arch/arm/dts/imx8mq-u-boot.dtsi | 4 + arch/arm/mach-imx/imx8m/Kconfig | 20 ++ arch/arm/mach-imx/imx9/Kconfig | 12 ++ drivers/remoteproc/Kconfig | 7 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 370 ++++++++++++++++++++++++++++++++++ drivers/remoteproc/imx_rproc.h | 56 +++++ drivers/remoteproc/renesas_apmu.c | 3 +- drivers/remoteproc/rproc-elf-loader.c | 93 ++++++--- drivers/remoteproc/sandbox_testproc.c | 3 +- drivers/remoteproc/stm32_copro.c | 3 +- drivers/remoteproc/ti_k3_dsp_rproc.c | 2 +- drivers/remoteproc/ti_k3_r5f_rproc.c | 2 +- include/asm-generic/io.h | 37 ++++ include/remoteproc.h | 3 +- lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++ 21 files changed, 731 insertions(+), 35 deletions(-)---
base-commit:48f21e66e360552c75d70a50421d0e0ed1f59e90
change-id: 20251012-imx-rproc-383db752c3f7Best regards,
Hi Peng
Quoted 9 lines · Peng Fan (OSS)
This patch series introduces remoteproc support for NXP i.MX8M and i.MX93 platforms. Most of the i.MX-specific logic is ported from the Linux kernel to ensure compatibility and maintainability.
The existing bootaux command in U-Boot only supports loading raw binary images. However, this approach fails when the remote processor firmware contains sections that must be loaded into both TCM and DDR. To address this limitation, need to use remoteproc framework ELF loader, enabling proper loading of segmented firmware images.
I am not sure, what problem you are facing to load fw having section in TCM and DDR both, with current frame-work.
There are few drivers, using both TCM and DDR and working ok ref[0]
[0] https://elixir.bootlin.com/u-boot/v2025.10/source/drivers/remoteproc/ti_k3_r5f_rproc.c#L110
Quoted 55 lines
Patch Summary:
Patches 1–2: Import
memcpy_ioandmemset_iofrom the Linux kernel and enable
them in the remoteproc subsystem.
Patches 3–11: Add platform-specific remoteproc support for i.MX8M and i.MX93. Patch 6: Temporarily adds Cortex-M nodes tox-u-boot.dtsisince they are not
yet available in the upstream Linux device tree. These nodes can be
removed once they are merged upstream.NXP internal R-b tags are kept, because the patches are directly cherry-picked from NXP LTS tree.
Signed-off-by Peng Fan <[email protected]>---
Peng Fan (11):
lib: Importiomem_copyfrom Linux Kernel
remoteproc: Extenddevice_to_virtwith ais_iomemparameter
remoteproc: Addimx_rprocdriver to support NXP i.MX8MP/N
remoteproc:imx_rproc: Support i.MX8MQ/M
remoteproc:imx_rproc: Add support for i.MX93 CM33
arm: dts: imx8m: Add remoteproc node
imx8mp: Enable remoteproc for i.MX8MP EVK
imx8mm: Enable remoteproc for i.MX8MM EVK
imx8mn: Enable remoteproc for i.MX8MN EVK
imx8mq: Enable remoteproc for i.MX8MQ EVK
imx93: Enable remoteproc for i.MX93-EVK/QSB/FRDMMAINTAINERS | 1 + arch/arm/dts/imx8mm-u-boot.dtsi | 4 + arch/arm/dts/imx8mn-u-boot.dtsi | 4 + arch/arm/dts/imx8mp-u-boot.dtsi | 4 + arch/arm/dts/imx8mq-u-boot.dtsi | 4 + arch/arm/mach-imx/imx8m/Kconfig | 20 ++ arch/arm/mach-imx/imx9/Kconfig | 12 ++ drivers/remoteproc/Kconfig | 7 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/imx_rproc.c | 370 ++++++++++++++++++++++++++++++++++ drivers/remoteproc/imx_rproc.h | 56 +++++ drivers/remoteproc/renesas_apmu.c | 3 +- drivers/remoteproc/rproc-elf-loader.c | 93 ++++++--- drivers/remoteproc/sandbox_testproc.c | 3 +- drivers/remoteproc/stm32_copro.c | 3 +- drivers/remoteproc/ti_k3_dsp_rproc.c | 2 +- drivers/remoteproc/ti_k3_r5f_rproc.c | 2 +- include/asm-generic/io.h | 37 ++++ include/remoteproc.h | 3 +- lib/Makefile | 1 + lib/iomem_copy.c | 136 +++++++++++++ 21 files changed, 731 insertions(+), 35 deletions(-)---
base-commit:48f21e66e360552c75d70a50421d0e0ed1f59e90
change-id: 20251012-imx-rproc-383db752c3f7Best regards,
Quoted 18 lines
Subject: Re: [PATCH 00/11] remoteproc: Add support for i.MX8M[M/N/P/Q] and i.MX93
Hi Peng
Quoted 5 lines · Peng Fan (OSS)
This patch series introduces remoteproc support for NXP i.MX8M and i.MX93 platforms. Most of the i.MX-specific logic is ported from the Linux kernel to ensure compatibility and maintainability.
The existing bootaux command in U-Boot only supports loading raw
binary images.
Quoted 4 lines
However, this approach fails when the remote processor firmware contains sections that must be loaded into both TCM and DDR. To address this limitation, need to use remoteproc framework ELF loader, enabling proper loading of segmented firmware images.
Quoted 4 lines
I am not sure, what problem you are facing to load fw having section in TCM and DDR both, with current frame-work.
There are few drivers, using both TCM and DDR and working ok ref[0]
We have customers are building a very large image for the remote cores inside i.MX. But the TCM size is not large enough, so they need use TCM and DDR both, some sections in TCM, some sections in DDR.
No issue with current framework, it is i.MX bootaux command not support the above request.
Thanks,
Peng.
Quoted 2 lines
[0]