* [PATCH v6 1/5] arm64: dts: imx8mp: Use resets property
2025-03-19 9:46 [PATCH v6 0/5] Configure imx8mp dsp node for rproc usage Daniel Baluta
@ 2025-03-19 9:46 ` Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock Daniel Baluta
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Baluta @ 2025-03-19 9:46 UTC (permalink / raw)
To: shawnguo, robh
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan, Frank Li
Add resets property to dsp node in order to be able to control the dsp
run/stall bit from audio block control.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index ce6793b2d57e..3b725fe442d0 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -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";
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock
2025-03-19 9:46 [PATCH v6 0/5] Configure imx8mp dsp node for rproc usage Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 1/5] arm64: dts: imx8mp: Use resets property Daniel Baluta
@ 2025-03-19 9:46 ` Daniel Baluta
2025-03-19 9:59 ` Alexander Stein
2025-03-19 9:46 ` [PATCH v6 3/5] arm64: dts: imx8mp: Configure dsp node for rproc usage Daniel Baluta
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Daniel Baluta @ 2025-03-19 9:46 UTC (permalink / raw)
To: shawnguo, robh
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan
Enable MU2 node and add mu2 root clock.
MU2 is used to communicate with DSP core.
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 4 ++++
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
2 files changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index c26954e5a605..d2fdb420f2d3 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -690,6 +690,10 @@ dsi_out: endpoint {
};
};
+&mu2 {
+ status = "okay";
+};
+
&pcie_phy {
fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
clocks = <&pcie0_refclk>;
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 3b725fe442d0..deb98f03180a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1254,6 +1254,7 @@ mu2: mailbox@30e60000 {
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 {
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock
2025-03-19 9:46 ` [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock Daniel Baluta
@ 2025-03-19 9:59 ` Alexander Stein
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Stein @ 2025-03-19 9:59 UTC (permalink / raw)
To: shawnguo, robh, linux-arm-kernel
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan, Daniel Baluta
Hi,
Am Mittwoch, 19. März 2025, 10:46:18 CET schrieb Daniel Baluta:
> Enable MU2 node and add mu2 root clock.
> MU2 is used to communicate with DSP core.
>
> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 4 ++++
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> index c26954e5a605..d2fdb420f2d3 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> @@ -690,6 +690,10 @@ dsi_out: endpoint {
> };
> };
>
> +&mu2 {
> + status = "okay";
> +};
> +
I think this is supposed to be part of patch 5.
> &pcie_phy {
> fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
> clocks = <&pcie0_refclk>;
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 3b725fe442d0..deb98f03180a 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -1254,6 +1254,7 @@ mu2: mailbox@30e60000 {
> interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
> #mbox-cells = <2>;
> status = "disabled";
> + clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_MU2_ROOT>;
Please keep status as the last property.
Best regards
Alexander
> };
>
> i2c5: i2c@30ad0000 {
>
--
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v6 3/5] arm64: dts: imx8mp: Configure dsp node for rproc usage
2025-03-19 9:46 [PATCH v6 0/5] Configure imx8mp dsp node for rproc usage Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 1/5] arm64: dts: imx8mp: Use resets property Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock Daniel Baluta
@ 2025-03-19 9:46 ` Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 4/5] arm64: dts: imx8mp: Add DSP clocks Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 5/5] arm64: dts: Add dsp rproc related mem regions Daniel Baluta
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Baluta @ 2025-03-19 9:46 UTC (permalink / raw)
To: shawnguo, robh
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan
DSP 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")
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index deb98f03180a..5f9421316ecc 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -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";
};
@@ -2417,13 +2417,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>;
- memory-region = <&dsp_reserved>;
+ 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";
resets = <&audio_blk_ctrl IMX8MP_AUDIOMIX_DSP_RUNSTALL>;
reset-names = "runstall";
status = "disabled";
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v6 4/5] arm64: dts: imx8mp: Add DSP clocks
2025-03-19 9:46 [PATCH v6 0/5] Configure imx8mp dsp node for rproc usage Daniel Baluta
` (2 preceding siblings ...)
2025-03-19 9:46 ` [PATCH v6 3/5] arm64: dts: imx8mp: Configure dsp node for rproc usage Daniel Baluta
@ 2025-03-19 9:46 ` Daniel Baluta
2025-03-19 9:46 ` [PATCH v6 5/5] arm64: dts: Add dsp rproc related mem regions Daniel Baluta
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Baluta @ 2025-03-19 9:46 UTC (permalink / raw)
To: shawnguo, robh
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan
DSP core needs ocram, core and debug clocks.
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 5f9421316ecc..5e5cbad9a98a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -2419,6 +2419,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>;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v6 5/5] arm64: dts: Add dsp rproc related mem regions
2025-03-19 9:46 [PATCH v6 0/5] Configure imx8mp dsp node for rproc usage Daniel Baluta
` (3 preceding siblings ...)
2025-03-19 9:46 ` [PATCH v6 4/5] arm64: dts: imx8mp: Add DSP clocks Daniel Baluta
@ 2025-03-19 9:46 ` Daniel Baluta
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Baluta @ 2025-03-19 9:46 UTC (permalink / raw)
To: shawnguo, robh
Cc: s.hauer, kernel, krzk+dt, conor+dt, festevam, devicetree, imx,
linux-arm-kernel, linux-kernel, frank.li, aisheng.dong,
daniel.baluta, laurentiu.mihalcea, shengjiu.wang, iuliana.prodan,
a.fatoum, mathieu.poirier, linux-remoteproc, Daniel Baluta,
Peng Fan
With 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.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index d2fdb420f2d3..9ab3ee93a35b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -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>;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread