Configure imx8mp dsp node for rproc usage
Subsystems (2)
v5 cover Configure imx8mp dsp node for rproc usage
DSP found in i.MX8MP SOC can be used by multiple frameworks in order to enable various applications:
- rproc/rpmsg framework, used to load for example Zephyr samples
- Sound Open Firmware, used to enable various audio processing pipelines.
Current dsp node was configured with SOF in mind but it doesn't work well with imx8mp-evk dts. SOF controls audio IPs from firmware side while imx8mp-evk.dts preffers to control audio IPs from Linux side.
So, configure 'dsp' node to be used with rproc scenario and later will add a separate dts or an overlay to configure the node for SOF.
This patch series configures and enables dsp node to be used with rproc.
Changes since v4:
(https://lore.kernel.org/linux-arm-kernel/Z6zGLn3B6SVXhTV1@lizhi-Precision-Tower-5810/T/)
- after comments received on v4, we implemented the run/stall bits using reset controller API (changes merged ->
https://patchwork.kernel.org/project/linux-arm-kernel/cover/[email protected]/)
- drop patches related to DSP run/stall/reset via syscon
- picked up patch related to using run_stall via reset controller API.
Daniel Baluta (5):
arm64: dts: imx8mp: Use resets property
arm64: dts: imx8mp: Add mu2 root clock
arm64: dts: imx8mp: Configure dsp node for rproc usage
arm64: dts: imx8mp: Add DSP clocks
arm64: dts: Add dsp rproc related mem regions
arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 10 +++++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 22 +++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0
PATCH v5 1/5 arm64: dts: imx8mp: Use resets property
Add resets property to dsp node in order to be able to control the dsp run/stall bit from audio block control.
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +3 -0
@@ -6,6 +6,7 @@ #include <dt-bindings/clock/imx8mp-clock.h> #include <dt-bindings/power/imx8mp-power.h> #include <dt-bindings/reset/imx8mp-reset.h> +#include <dt-bindings/reset/imx8mp-reset-audiomix.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/interconnect/fsl,imx8mp.h>
@@ -2422,6 +2423,8 @@ dsp: dsp@3b6e8000 { mboxes = <&mu2 2 0>, <&mu2 2 1>, <&mu2 3 0>, <&mu2 3 1>; memory-region = <&dsp_reserved>; + resets = <&audio_blk_ctrl IMX8MP_AUDIOMIX_DSP_RUNSTALL>; + reset-names = "runstall"; status = "disabled"; }; };
Signature · 1 line
2.43.0
PATCH v5 2/5 arm64: dts: imx8mp: Add mu2 root clock
In reply to Daniel BalutaEnable MU2 node and add mu2 root clock.
MU2 is used to communicate with DSP core.
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -1
@@ -1253,7 +1253,7 @@ mu2: mailbox@30e60000 { reg = <0x30e60000 0x10000>; interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>; #mbox-cells = <2>; - status = "disabled"; + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_MU2_ROOT>; }; i2c5: i2c@30ad0000 {
Signature · 1 line
2.43.0
Re: [PATCH v5 2/5] arm64: dts: imx8mp: Add mu2 root clock
Am Montag, 17. März 2025, 14:33:03 CET schrieb Daniel Baluta:
Quoted 15 lines
Enable MU2 node and add mu2 root clock.
MU2 is used to communicate with DSP core.Reviewed-by Iuliana Prodan <[email protected]>Reviewed-by Peng Fan <[email protected]>Signed-off-by Daniel Baluta <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/imx8mp.dtsi +0
-0
arch/arm64/boot/dts/freescale/imx8mp.dtsi mu2: mailbox@30e60000 { · line 1256
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0
-1@@ -1253,7 +1253,7 @@ mu2: mailbox@30e60000 { reg = <0x30e60000 0x10000>; interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>; #mbox-cells = <2>; - status = "disabled";
There is no need to enable MU2 if the DSP is disabled by default, no?
Best regards
Alexander
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1
-0+ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_MU2_ROOT>; }; i2c5: i2c@30ad0000 {
Signature · 4 lines
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/
Re: [PATCH v5 2/5] arm64: dts: imx8mp: Add mu2 root clock
Quoted 12 lines · Alexander Stein
Am Montag, 17. März 2025, 14:33:03 CET schrieb Daniel Baluta:
Quoted 10 lines
Enable MU2 node and add mu2 root clock.
MU2 is used to communicate with DSP core.Reviewed-by Iuliana Prodan <[email protected]>Reviewed-by Peng Fan <[email protected]>Signed-off-by Daniel Baluta <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi mu2: mailbox@30e60000 { · line 1256
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0
-1@@ -1253,7 +1253,7 @@ mu2: mailbox@30e60000 { reg = <0x30e60000 0x10000>; interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>; #mbox-cells = <2>; - status = "disabled";There is no need to enable MU2 if the DSP is disabled by default, no?
True, I can enable it only when needed. Will fix in next version.
PATCH v5 3/5 arm64: dts: imx8mp: Configure dsp node for rproc usage
In reply to Daniel BalutaDSP can be used with various frameworks (e.g audio firmware, rproc). Currently 'dsp' configuration is intended for audio firmware but it doesn't work well with board level DTs (e.g imx8mp-evk) because board level DT enables audio related IPs (e.g SAI) while audio firmware needs this IPs disabled (because firmware will configure them).
So, configure 'dsp' node to be used with rproc. This way users will be able to use board DT to use the DSP as long as they don't clash with Audio IP configurations.
More comples usage of 'dsp' node (e.g by audio firmware) will need to create a separate dts file (or an overlay).
This change follows the approach taken for other i.MX8 boards in commit 391a319c81f6d7 ("arm64: dts: imx8-ss-audio: configure dsp node for rproc usage")
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +6 -6
@@ -281,7 +281,7 @@ reserved-memory { ranges; dsp_reserved: dsp@92400000 { - reg = <0 0x92400000 0 0x2000000>; + reg = <0 0x92400000 0 0x1000000>; no-map; status = "disabled"; };
@@ -2416,12 +2416,12 @@ usb_dwc3_1: usb@38200000 { }; dsp: dsp@3b6e8000 { - compatible = "fsl,imx8mp-dsp"; + compatible = "fsl,imx8mp-hifi4"; reg = <0x3b6e8000 0x88000>; - mbox-names = "txdb0", "txdb1", - "rxdb0", "rxdb1"; - mboxes = <&mu2 2 0>, <&mu2 2 1>, - <&mu2 3 0>, <&mu2 3 1>; + power-domains = <&pgc_audio>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu2 0 0>, <&mu2 1 0>, <&mu2 3 0>; + firmware-name = "imx/dsp/hifi4.bin"; memory-region = <&dsp_reserved>; resets = <&audio_blk_ctrl IMX8MP_AUDIOMIX_DSP_RUNSTALL>; reset-names = "runstall";
Signature · 1 line
2.43.0
PATCH v5 4/5 arm64: dts: imx8mp: Add DSP clocks
In reply to Daniel BalutaDSP core needs ocram, core and debug clocks.
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +5 -0
@@ -2418,6 +2418,11 @@ usb_dwc3_1: usb@38200000 { dsp: dsp@3b6e8000 { compatible = "fsl,imx8mp-hifi4"; reg = <0x3b6e8000 0x88000>; + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>, + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_OCRAMA_IPG>, + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSP_ROOT>, + <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_DSPDBG_ROOT>; + clock-names = "ipg", "ocram", "core", "debug"; power-domains = <&pgc_audio>; mbox-names = "tx", "rx", "rxdb"; mboxes = <&mu2 0 0>, <&mu2 1 0>, <&mu2 3 0>;
Signature · 1 line
2.43.0
PATCH v5 5/5 arm64: dts: Add dsp rproc related mem regions
In reply to Daniel BalutaWith imx8mp-evk board we are now configuring 'dsp' node for rproc usage, so add rproc specific memory regions.
Also, enable dsp node because it is ready to be used.
--- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-evk.dts +10 -0
@@ -309,6 +309,16 @@ &aud2htx { status = "okay"; }; +&dsp_reserved { + status = "okay"; +}; + +&dsp { + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>, + <&dsp_vdev0vring1>, <&dsp_reserved>; + status = "okay"; +}; + &eqos { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_eqos>;
Signature · 1 line
2.43.0
Rob Herring (Arm)
maintainerQuoted 31 lines · Daniel Baluta
DSP found in i.MX8MP SOC can be used by multiple frameworks in order to enable various applications:
- rproc/rpmsg framework, used to load for example Zephyr samples
- Sound Open Firmware, used to enable various audio processing pipelines.Current dsp node was configured with SOF in mind but it doesn't work well with imx8mp-evk dts. SOF controls audio IPs from firmware side while
imx8mp-evk.dtspreffers to control audio IPs from Linux side.So, configure 'dsp' node to be used with rproc scenario and later will add a separate dts or an overlay to configure the node for SOF.
This patch series configures and enables dsp node to be used with rproc.
Changes since v4:
(https://lore.kernel.org/linux-arm-kernel/Z6zGLn3B6SVXhTV1@lizhi-Precision-Tower-5810/T/)- after comments received on v4, we implemented the run/stall bits using reset controller API (changes merged ->https://patchwork.kernel.org/project/linux-arm-kernel/cover/[email protected]/)
- drop patches related to DSP run/stall/reset via syscon
- picked up patch related to usingrun_stallvia reset controller API.Daniel Baluta (5):
arm64: dts: imx8mp: Use resets property
arm64: dts: imx8mp: Add mu2 root clock
arm64: dts: imx8mp: Configure dsp node for rproc usage
arm64: dts: imx8mp: Add DSP clocks
arm64: dts: Add dsp rproc related mem regions
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 10 +++++++++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 22 +++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-)--
2.43.0
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/freescale/' for [email protected]:
arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb: dsp@3b6e8000: memory-region: [[142]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-var-som-symphony.dtb: dsp@3b6e8000: memory-region: [[105]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk3.dtb: dsp@3b6e8000: memory-region: [[156]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx-2x.dtb: dsp@3b6e8000: memory-region: [[127]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-dahlia.dtb: dsp@3b6e8000: memory-region: [[164]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dtb: dsp@3b6e8000: memory-region: [[102]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw73xx-2x.dtb: dsp@3b6e8000: memory-region: [[129]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-revb-lt6.dtb: dsp@3b6e8000: memory-region: [[132]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-debix-som-a-bmb-08.dtb: dsp@3b6e8000: memory-region: [[118]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-dev.dtb: dsp@3b6e8000: memory-region: [[165]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-nitrogen-smarc-universal-board.dtb: dsp@3b6e8000: memory-region: [[105]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s-ep1.dtb: dsp@3b6e8000: memory-region: [[140]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-adpismarc.dtb: dsp@3b6e8000: memory-region: [[142]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dtb: dsp@3b6e8000: memory-region: [[162]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw71xx-2x.dtb: dsp@3b6e8000: memory-region: [[120]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-yavia.dtb: dsp@3b6e8000: memory-region: [[163]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dtb: dsp@3b6e8000: memory-region: [[155]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dtb: dsp@3b6e8000: memory-region: [[164]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dtb: dsp@3b6e8000: memory-region: [[119]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-yavia.dtb: dsp@3b6e8000: memory-region: [[158]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dtb: dsp@3b6e8000: memory-region: [[131]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-navqp.dtb: dsp@3b6e8000: memory-region: [[111]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-revb-hdmi.dtb: dsp@3b6e8000: memory-region: [[134]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dtb: dsp@3b6e8000: memory-region: [[130]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-dhcom-pdk2.dtb: dsp@3b6e8000: memory-region: [[152]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-revc-bd500.dtb: dsp@3b6e8000: memory-region: [[130]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dtb: dsp@3b6e8000: memory-region: [[148]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dtb: dsp@3b6e8000: memory-region: [[136]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-helios.dtb: dsp@3b6e8000: memory-region: [[142]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-dahlia.dtb: dsp@3b6e8000: memory-region: [[169]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mp-ras314.dtb: dsp@3b6e8000: memory-region: [[156]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-dhcom-drc02.dtb: dsp@3b6e8000: memory-region: [[160]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-ivy.dtb: dsp@3b6e8000: memory-region: [[157]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-mallow.dtb: dsp@3b6e8000: memory-region: [[159]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dtb: dsp@3b6e8000: memory-region: [[153]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-kontron-bl-osm-s.dtb: dsp@3b6e8000: memory-region: [[150]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw82xx-2x.dtb: dsp@3b6e8000: memory-region: [[132]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-venice-gw75xx-2x.dtb: dsp@3b6e8000: memory-region: [[123]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc.dtb: dsp@3b6e8000: memory-region: [[144]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-dev.dtb: dsp@3b6e8000: memory-region: [[160]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-revc-tian-g07017.dtb: dsp@3b6e8000: memory-region: [[131]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-iota2-lumpy.dtb: dsp@3b6e8000: memory-region: [[107]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-dhcom-picoitx.dtb: dsp@3b6e8000: memory-region: [[158]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#arch/arm64/boot/dts/freescale/imx8mp-skov-basic.dtb: dsp@3b6e8000: memory-region: [[129]] is too short
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#