arm64: dts: freescale: Add remoteproc support for i.MX EVKs
Subsystems (2)
v2 cover arm64: dts: freescale: Add remoteproc support for i.MX EVKs
This series adds remoteproc node and reserved memory regions for the i.MX95, i.MX952 and i.MX943 EVK boards.
- Patch 1 adds CM7 support for imx95-19x19-evk
- Patch 2 adds CM7 support for imx952-evk
- Patch 3 adds CM7-0, CM7-1 and CM33S support for imx943-evk
- Patch 4, update resource table address for i.MX8ULP-EVK
Each patch defines the remoteproc device node with mailbox channels and the associated reserved memory regions (firmware memory, virtio vring buffers, resource tables and shared DMA pools).
---
Changes in v2:
- Change to vdev0buffer in patch 1 for i.MX95
- Link to v1: https://patch.msgid.link/[email protected]
---
Biwen Li (1):
arm64: dts: imx8ulp-evk: Update rpmsg resource table address
Peng Fan (3):
arm64: dts: imx95-19x19-evk: Add CM7 node and related memory nodes
arm64: dts: imx952-evk: Add CM7 node and related memory nodes
arm64: dts: imx943-evk: Add CM7 and CM33S nodes
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 4 +- arch/arm64/boot/dts/freescale/imx943-evk.dts | 135 ++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 46 ++++++++ arch/arm64/boot/dts/freescale/imx952-evk.dts | 50 ++++++++ 4 files changed, 233 insertions(+), 2 deletions(-)
---
base-commit: cc2b5f627e8ccbae1188ef2d8be3e451d7f933a5
change-id: 20260715-imx-rproc-dts-6c78f82652f9
Best regards,
Signature · 1 line
Peng Fan <[email protected]>
PATCH v2 1/4 arm64: dts: imx95-19x19-evk: Add CM7 node and related memory nodes
From: Peng Fan <[email protected]>
Add remoteproc CM7 node and reserved memory regions to enable the Cortex-M7 remote processor. The reserved memory includes firmware memory, virtio device vring buffers, a resource table and a shared DMA pool for inter-processor communication via the MU7 mailbox.
--- arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+)
arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts +46 -0
@@ -76,6 +76,42 @@ linux_cma: linux,cma { linux,cma-default; reusable; }; + + m7_reserved: memory@80000000 { + no-map; + reg = <0 0x80000000 0 0x1000000>; + }; + + vdev0vring0: vdev0vring0@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: vdev0vring1@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: vdev1vring0@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: vdev1vring1@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + rsc_table: rsc-table@88220000 { + reg = <0 0x88220000 0 0x1000>; + no-map; + }; + + vdev0buffer: vdev0buffer@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; }; flexcan1_phy: can-phy0 {
@@ -185,6 +221,16 @@ reg_usb_vbus: regulator-vbus { enable-active-high; }; + remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + }; + sound-bt-sco { compatible = "simple-audio-card"; simple-audio-card,name = "bt-sco-audio";
Signature · 1 line
2.34.1
PATCH v2 2/4 arm64: dts: imx952-evk: Add CM7 node and related memory nodes
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add remoteproc CM7 node and reserved memory regions to enable the Cortex-M7 remote processor. The reserved memory includes firmware memory, virtio device vring buffers and a resource table for inter-processor communication via the MU7 mailbox.
--- arch/arm64/boot/dts/freescale/imx952-evk.dts | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm64/boot/dts/freescale/imx952-evk.dts +50 -0
@@ -82,6 +82,42 @@ linux_cma: linux,cma { linux,cma-default; reusable; }; + + m7_reserved: memory@80000000 { + no-map; + reg = <0 0x80000000 0 0x1000000>; + }; + + vdev0vring0: vdev0vring0@88000000 { + reg = <0 0x88000000 0 0x8000>; + no-map; + }; + + vdev0vring1: vdev0vring1@88008000 { + reg = <0 0x88008000 0 0x8000>; + no-map; + }; + + vdev1vring0: vdev1vring0@88010000 { + reg = <0 0x88010000 0 0x8000>; + no-map; + }; + + vdev1vring1: vdev1vring1@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: vdevbuffer@88020000 { + compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + }; + + rsc_table: rsc-table@88220000 { + reg = <0 0x88220000 0 0x1000>; + no-map; + }; }; flexcan1_phy: can-phy0 {
@@ -151,6 +187,16 @@ reg_usb_vbus: regulator-vbus { enable-active-high; }; + remoteproc-cm7 { + compatible = "fsl,imx95-cm7"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu7 0 1 + &mu7 1 1 + &mu7 3 1>; + memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>, <&m7_reserved>; + }; + sound-bt-sco { compatible = "simple-audio-card"; simple-audio-card,bitclock-inversion;
@@ -451,6 +497,10 @@ &micfil { status = "okay"; }; +&mu7 { + status = "okay"; +}; + &sai1 { assigned-clocks = <&scmi_clk IMX952_CLK_AUDIOPLL1_VCO>, <&scmi_clk IMX952_CLK_AUDIOPLL2_VCO>,
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 2/4] arm64: dts: imx952-evk: Add CM7 node and related memory nodes
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The vdev buffer memory region bypasses the name check in `imx_rproc_prepare()`, causing it to be…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The vdev buffer memory region bypasses the name check in imx_rproc_prepare(), causing it to be incorrectly mapped as a general carveout. --
--- Patch [2]: [PATCH v2 2/4] arm64: dts: imx952-evk: Add CM7 node and related memory nodes --- commit 22a3bbe540374b7f9198ab38657f1b8b84d70816
Author: Peng Fan <[email protected]>
arm64: dts: imx952-evk: Add CM7 node and related memory nodes
This commit adds the remoteproc CM7 node and reserved memory regions for the Cortex-M7 remote processor. The reserved memory includes firmware memory, vring buffers, and a resource table.
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx952-evk.dts +0
-0
[ ... ]
Quoted 1 line
arch/arm64/boot/dts/freescale/imx952-evk.dts +0
-0@@ -82,6 +82,42 @@ linux_cma: linux,cma {
[ ... ]
arch/arm64/boot/dts/freescale/imx952-evk.dts linux_cma: linux,cma { · line 111
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx952-evk.dts +6
-0+ vdev1vring1: vdev1vring1@88018000 { + reg = <0 0x88018000 0 0x8000>; + no-map; + }; + + vdevbuffer: vdevbuffer@88020000 {
[Severity: Medium]
Should this node be named vdev0buffer instead of vdevbuffer?
Because this node is named vdevbuffer, it bypasses the driver's hardcoded skip check strstarts(res.name, "vdev0buffer") in imx_rproc_prepare().
Will this cause the memory region to be incorrectly mapped as a general carveout during rproc_start()?
This unnecessarily consumes 1MB of vmalloc space via ioremap_wc and double-maps the memory since it is simultaneously initialized as a DMA coherent pool.
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx952-evk.dts +4
-0+ compatible = "shared-dma-pool"; + reg = <0 0x88020000 0 0x100000>; + no-map; + };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
PATCH v2 3/4 arm64: dts: imx943-evk: Add CM7 and CM33S nodes
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Add remoteproc nodes for the two Cortex-M7 cores (CM7-0, CM7-1) and the Cortex-M33S core, along with their respective reserved memory regions for firmware, virtio device vrings, resource tables and shared DMA pools. Enable the MU11, MU13 and MU15 mailbox units used for inter-processor communication with each remote processor.
--- arch/arm64/boot/dts/freescale/imx943-evk.dts | 135 +++++++++++++++++++++++++++ 1 file changed, 135 insertions(+)
arch/arm64/boot/dts/freescale/imx943-evk.dts +135 -0
@@ -133,6 +133,36 @@ reg_audio_pwr: regulator-wm8962-pwr { enable-active-high; }; + remoteproc-cm70 { + compatible = "fsl,imx94-cm70"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu11 0 1 + &mu11 1 1 + &mu11 3 1>; + memory-region = <&cm70_vdevbuffer>, <&cm70_vdev0vring0>, <&cm70_vdev0vring1>, + <&cm70_vdev1vring0>, <&cm70_vdev1vring1>, <&cm70_rsc_table>; + }; + + remoteproc-cm71 { + compatible = "fsl,imx94-cm71"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu13 0 1 + &mu13 1 1 + &mu13 3 1>; + memory-region = <&cm71_vdevbuffer>, <&cm71_vdev0vring0>, <&cm71_vdev0vring1>, + <&cm71_vdev1vring0>, <&cm71_vdev1vring1>, <&cm71_rsc_table>; + }; + + remoteproc-cm33s { + compatible = "fsl,imx94-cm33s"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu15 0 1 + &mu15 1 1 + &mu15 3 1>; + memory-region = <&cm33s_vdevbuffer>, <&cm33s_vdev0vring0>, <&cm33s_vdev0vring1>, + <&cm33s_vdev1vring0>, <&cm33s_vdev1vring1>, <&cm33s_rsc_table>; + }; + reserved-memory { ranges; #address-cells = <2>;
@@ -145,6 +175,99 @@ linux,cma { size = <0 0x10000000>; linux,cma-default; }; + + cm33s_vdev0vring0: vdev0vring0@20800000 { + reg = <0 0x20800000 0 0x8000>; + no-map; + }; + + cm33s_vdev0vring1: vdev0vring1@20808000 { + reg = <0 0x20808000 0 0x8000>; + no-map; + }; + + cm33s_vdev1vring0: vdev1vring0@20810000 { + reg = <0 0x20810000 0 0x8000>; + no-map; + }; + + cm33s_vdev1vring1: vdev1vring1@20818000 { + reg = <0 0x20818000 0 0x8000>; + no-map; + }; + + cm33s_rsc_table: rsc-table@208a0000 { + reg = <0 0x208a0000 0 0x1000>; + no-map; + }; + + cm33s_vdevbuffer: vdevbuffer@20820000 { + compatible = "shared-dma-pool"; + reg = <0 0x20820000 0 0x80000>; + no-map; + }; + + cm70_vdev0vring0: vdev0vring0@82000000 { + reg = <0 0x82000000 0 0x8000>; + no-map; + }; + + cm70_vdev0vring1: vdev0vring1@82008000 { + reg = <0 0x82008000 0 0x8000>; + no-map; + }; + + cm70_vdev1vring0: vdev1vring0@82010000 { + reg = <0 0x82010000 0 0x8000>; + no-map; + }; + + cm70_vdev1vring1: vdev1vring1@82018000 { + reg = <0 0x82018000 0 0x8000>; + no-map; + }; + + cm70_rsc_table: rsc-table@82220000 { + reg = <0 0x82220000 0 0x1000>; + no-map; + }; + + cm70_vdevbuffer: vdevbuffer@82020000 { + compatible = "shared-dma-pool"; + reg = <0 0x82020000 0 0x100000>; + no-map; + }; + + cm71_vdev0vring0: vdev0vring0@84000000 { + reg = <0 0x84000000 0 0x8000>; + no-map; + }; + + cm71_vdev0vring1: vdev0vring1@84008000 { + reg = <0 0x84008000 0 0x8000>; + no-map; + }; + + cm71_vdev1vring0: vdev1vring0@84010000 { + reg = <0 0x84010000 0 0x8000>; + no-map; + }; + + cm71_vdev1vring1: vdev1vring1@84018000 { + reg = <0 0x84018000 0 0x8000>; + no-map; + }; + + cm71_rsc_table: rsc-table@84220000 { + reg = <0 0x84220000 0 0x1000>; + no-map; + }; + + cm71_vdevbuffer: vdevbuffer@84020000 { + compatible = "shared-dma-pool"; + reg = <0 0x84020000 0 0x100000>; + no-map; + }; }; sound-bt-sco {
@@ -592,6 +715,18 @@ &micfil { status = "okay"; }; +&mu11 { + status = "okay"; +}; + +&mu13 { + status = "okay"; +}; + +&mu15 { + status = "okay"; +}; + &netc_blk_ctrl { assigned-clocks = <&scmi_clk IMX94_CLK_MAC4>, <&scmi_clk IMX94_CLK_MAC5>;
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 3/4] arm64: dts: imx943-evk: Add CM7 and CM33S nodes
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing reserved memory regions for remote processor firmware --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing reserved memory regions for remote processor firmware
--
--- Patch [3]: [PATCH v2 3/4] arm64: dts: imx943-evk: Add CM7 and CM33S nodes --- commit 348fa25c5d73cddade66c1646cc1a5d82686eae7
Author: Peng Fan <[email protected]>
arm64: dts: imx943-evk: Add CM7 and CM33S nodes
This commit adds remoteproc nodes for the Cortex-M7 (CM7-0, CM7-1) and Cortex-M33S cores on the i.MX943 EVK. It configures the mailbox units and various reserved memory regions for inter-processor communication.
Quoted 4 lines
Add remoteproc nodes for the two Cortex-M7 cores (CM7-0, CM7-1) and the Cortex-M33S core, along with their respective reserved memory regions for firmware, virtio device vrings, resource tables and shared DMA pools.
[Severity: Medium]
The commit message states that reserved memory regions for firmware are added, but they appear to be entirely missing from the device tree changes.
If the remote processors are intended to execute their firmware from system DDR RAM, the omission means Linux will not carve out this memory. If preloaded by a bootloader, Linux might map and clobber the live firmware.
Are these firmware reservations accidentally omitted, or does the firmware run exclusively from TCM memory for this specific EVK?
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx943-evk.dts +0
-0@@ -133,6 +133,36 @@ reg_audio_pwr: regulator-wm8962-pwr { enable-active-high;
arch/arm64/boot/dts/freescale/imx943-evk.dts reg_audio_pwr: regulator-wm8962-pwr { · line 143
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx943-evk.dts +8
-0}; + remoteproc-cm70 { + compatible = "fsl,imx94-cm70"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu11 0 1 + &mu11 1 1 + &mu11 3 1>; + memory-region = <&cm70_vdevbuffer>, <&cm70_vdev0vring0>, <&cm70_vdev0vring1>, + <&cm70_vdev1vring0>, <&cm70_vdev1vring1>, <&cm70_rsc_table>;
[Severity: Medium]
Does this memory-region list need a reference to the firmware reserved memory (e.g., cm70_reserved), or is it intentionally omitted here?
[ ... ]
arch/arm64/boot/dts/freescale/imx943-evk.dts linux,cma { · line 182
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx943-evk.dts +5
-0@@ -145,6 +175,99 @@ linux,cma { size = <0 0x10000000>; linux,cma-default; }; + + cm33s_vdev0vring0: vdev0vring0@20800000 { + reg = <0 0x20800000 0 0x8000>; + no-map; + };
[Severity: Medium]
The added reserved-memory nodes fail to define firmware memory regions for the CM7-0, CM7-1, and CM33S cores, which contradicts the commit message.
If the firmware is loaded into system DDR by the remoteproc driver, imx_rproc_da_to_va will fail to find the carveout and the load will fail. Will these firmware regions need to be added?
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
PATCH v2 4/4 arm64: dts: imx8ulp-evk: Update rpmsg resource table address
In reply to Peng Fan (OSS)From: Biwen Li <[email protected]>
The MCU firmware copies the rsc table to a fixed address (0x1FFF8000) at startup. However, this address is occupied by variables used in the MCU firmware, so copying the rsc table there corrupts those variables.
Move the rsc-table reserved memory region from 0x1FFF8000 to 0x20000000 to avoid the conflict. The M33 firmware linker script has been updated accordingly to place the rpmsg resource table at 0x20000000 (DTCM m_rsc_tbl region).
--- arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +2 -2
@@ -42,8 +42,8 @@ m33_reserved: noncacheable-section@a8600000 { no-map; }; - rsc_table: rsc-table@1fff8000 { - reg = <0 0x1fff8000 0 0x1000>; + rsc_table: rsc-table@20000000 { + reg = <0 0x20000000 0 0x1000>; no-map; };
Signature · 1 line
2.34.1
Quoted 8 lines · Peng Fan (OSS)
This series adds remoteproc node and reserved memory regions for the i.MX95, i.MX952 and i.MX943 EVK boards.
- Patch 1 adds CM7 support for imx95-19x19-evk
- Patch 2 adds CM7 support for imx952-evk
- Patch 3 adds CM7-0, CM7-1 and CM33S support for imx943-evk
- Patch 4, update resource table address for i.MX8ULP-EVK
Quoted 8 lines
Each patch defines the remoteproc device node with mailbox channels and the associated reserved memory regions (firmware memory, virtio vring buffers, resource tables and shared DMA pools).
Signed-off-by Peng Fan <[email protected]>---
Changes in v2:
- Change to vdev0buffer in patch 1 for i.MX95
Others also need change
Frank
Quoted 25 lines
- Link to v1: https://patch.msgid.link/[email protected]
---
Biwen Li (1):
arm64: dts: imx8ulp-evk: Update rpmsg resource table addressPeng Fan (3):
arm64: dts: imx95-19x19-evk: Add CM7 node and related memory nodes
arm64: dts: imx952-evk: Add CM7 node and related memory nodes
arm64: dts: imx943-evk: Add CM7 and CM33S nodesarch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 4 +- arch/arm64/boot/dts/freescale/imx943-evk.dts | 135 ++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx95-19x19-evk.dts | 46 ++++++++ arch/arm64/boot/dts/freescale/imx952-evk.dts | 50 ++++++++ 4 files changed, 233 insertions(+), 2 deletions(-)---
base-commit:cc2b5f627e8ccbae1188ef2d8be3e451d7f933a5
change-id: 20260715-imx-rproc-dts-6c78f82652f9Best regards,
--
Peng Fan <[email protected]>