[PATCH v3 5/6] arm64: dts: imx8mp: Add fsl,dsp-ctrl property for dsp

Daniel Baluta posted 6 patches 1 year ago
There is a newer version of this series
[PATCH v3 5/6] arm64: dts: imx8mp: Add fsl,dsp-ctrl property for dsp
Posted by Daniel Baluta 1 year ago
Audio block control contains a set of registers some of them used for
DSP configuration.

Drivers (rproc, SOF) are using fsl,dsp-ctrl property to access those
registers in order to control the operations of the DSP (e.g for
start, reset, etc).

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index b42e6430123f..c8f9347d602c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1609,7 +1609,7 @@ sdma2: dma-controller@30e10000 {
 			};
 
 			audio_blk_ctrl: clock-controller@30e20000 {
-				compatible = "fsl,imx8mp-audio-blk-ctrl";
+				compatible = "fsl,imx8mp-audio-blk-ctrl", "syscon";
 				reg = <0x30e20000 0x10000>;
 				#clock-cells = <1>;
 				#reset-cells = <1>;
@@ -2426,6 +2426,7 @@ dsp: dsp@3b6e8000 {
 			mboxes = <&mu2 0 0>, <&mu2 1 0>, <&mu2 3 0>;
 			firmware-name = "imx/dsp/hifi4.bin";
 			memory-region = <&dsp_reserved>;
+			fsl,dsp-ctrl = <&audio_blk_ctrl>;
 			status = "disabled";
 		};
 	};
-- 
2.25.1
Re: [PATCH v3 5/6] arm64: dts: imx8mp: Add fsl,dsp-ctrl property for dsp
Posted by Krzysztof Kozlowski 1 year ago
On Tue, Dec 10, 2024 at 02:53:37PM +0200, Daniel Baluta wrote:
> Audio block control contains a set of registers some of them used for
> DSP configuration.
> 
> Drivers (rproc, SOF) are using fsl,dsp-ctrl property to access those
> registers in order to control the operations of the DSP (e.g for
> start, reset, etc).

This should have been implemented as reset controller, not syscon. It's
really poor choice to call everything syscon. It does not scale, does
not provide you runtime PM or probe ordering (device links). Quick look
at your drivers suggest that you have exacvtly that problems.

Best regards,
Krzysztof
Re: [PATCH v3 5/6] arm64: dts: imx8mp: Add fsl,dsp-ctrl property for dsp
Posted by Daniel Baluta 10 months, 1 week ago
On Wed, Dec 11, 2024 at 11:07 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Tue, Dec 10, 2024 at 02:53:37PM +0200, Daniel Baluta wrote:
> > Audio block control contains a set of registers some of them used for
> > DSP configuration.
> >
> > Drivers (rproc, SOF) are using fsl,dsp-ctrl property to access those
> > registers in order to control the operations of the DSP (e.g for
> > start, reset, etc).
>
> This should have been implemented as reset controller, not syscon. It's
> really poor choice to call everything syscon. It does not scale, does
> not provide you runtime PM or probe ordering (device links). Quick look
> at your drivers suggest that you have exacvtly that problems.

Hi Krzysztof,

The bits we are using from audio-blck-ctrl for controlling the DSP are
not for reset!
They are only for Run/Stall the DSP.

The reset is done via DAP interface. I will sent a separate patch to abstract
the reset interaction using a reset controller. But for Run/Stall bits we need
to use a syscon.

thanks,
Daniel.