* [PATCH 1/5] dt-bindings: dsp: fix power domain count
2024-09-18 18:21 [PATCH 0/5] configure imx8 dsp DT node for rproc usage Laurentiu Mihalcea
@ 2024-09-18 18:21 ` Laurentiu Mihalcea
2024-09-18 18:49 ` Frank Li
` (2 more replies)
2024-09-18 18:21 ` [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage Laurentiu Mihalcea
` (3 subsequent siblings)
4 siblings, 3 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-18 18:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Per the current binding, QM/QXP DSPs are supposed
to have 4 power domains, while the rest just 1.
For QM/QXP, the 4 power domains are: DSP, DSP_RAM,
MU13A, MU13B.
First off, drop MU13A from the count. This is attached
to the platform device of lsio_mu13. This decreases the
count to 3.
Secondly, drop DSP and DSP_RAM from the count for QXP.
These are attached to the platform devices of the lpcgs
(used as clock providers for the DSP).
With this in mind, the number of required power domains for
QXP is 1 (MU13B), while for QM it's 3 (MU13B, DSP, DSP_RAM).
Additionally, two extra power domains may be required in the
case of QM/QXP DSPs. These are IRQSTR_DSP and MU2A. For the nodes
using the "-hifi4" compatibles these PDs are optional, while for
nodes using the "-dsp" compatibles these are mandatory.
These changes reflect all of this information.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
.../devicetree/bindings/dsp/fsl,dsp.yaml | 62 +++++++++++++++----
1 file changed, 49 insertions(+), 13 deletions(-)
diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
index 9af40da5688e..e2f016af1048 100644
--- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
+++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
@@ -51,8 +51,6 @@ properties:
description:
List of phandle and PM domain specifier as documented in
Documentation/devicetree/bindings/power/power_domain.txt
- minItems: 1
- maxItems: 4
mboxes:
description:
@@ -97,16 +95,55 @@ allOf:
properties:
compatible:
contains:
- enum:
- - fsl,imx8qxp-dsp
- - fsl,imx8qm-dsp
- - fsl,imx8qxp-hifi4
- - fsl,imx8qm-hifi4
+ const: fsl,imx8qxp-hifi4
then:
properties:
power-domains:
- minItems: 4
- else:
+ maxItems: 3
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8qxp-dsp
+ then:
+ properties:
+ power-domains:
+ minItems: 3
+ maxItems: 3
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8qm-dsp
+ then:
+ properties:
+ power-domains:
+ minItems: 5
+ maxItems: 5
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8qm-hifi4
+ then:
+ properties:
+ power-domains:
+ minItems: 3
+ maxItems: 5
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx8mp-dsp
+ - fsl,imx8mp-hifi4
+ - fsl,imx8ulp-dsp
+ - fsl,imx8ulp-hifi4
+ then:
properties:
power-domains:
maxItems: 1
@@ -157,10 +194,9 @@ examples:
<&adma_lpcg IMX_ADMA_LPCG_OCRAM_IPG_CLK>,
<&adma_lpcg IMX_ADMA_LPCG_DSP_CORE_CLK>;
clock-names = "ipg", "ocram", "core";
- power-domains = <&pd IMX_SC_R_MU_13A>,
- <&pd IMX_SC_R_MU_13B>,
- <&pd IMX_SC_R_DSP>,
- <&pd IMX_SC_R_DSP_RAM>;
+ power-domains = <&pd IMX_SC_R_MU_13B>,
+ <&pd IMX_SC_R_IRQSTR_DSP>,
+ <&pd IMX_SC_R_MU_2A>;
mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>;
memory-region = <&dsp_reserved>;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 1/5] dt-bindings: dsp: fix power domain count
2024-09-18 18:21 ` [PATCH 1/5] dt-bindings: dsp: fix power domain count Laurentiu Mihalcea
@ 2024-09-18 18:49 ` Frank Li
2024-09-22 23:03 ` Laurentiu Mihalcea
2024-09-18 19:36 ` Rob Herring (Arm)
2024-09-18 20:37 ` Rob Herring
2 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2024-09-18 18:49 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:13PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Per the current binding, QM/QXP DSPs are supposed
> to have 4 power domains, while the rest just 1.
> For QM/QXP, the 4 power domains are: DSP, DSP_RAM,
> MU13A, MU13B.
>
> First off, drop MU13A from the count. This is attached
> to the platform device of lsio_mu13. This decreases the
> count to 3.
>
> Secondly, drop DSP and DSP_RAM from the count for QXP.
> These are attached to the platform devices of the lpcgs
> (used as clock providers for the DSP).
>
> With this in mind, the number of required power domains for
> QXP is 1 (MU13B), while for QM it's 3 (MU13B, DSP, DSP_RAM).
>
> Additionally, two extra power domains may be required in the
> case of QM/QXP DSPs. These are IRQSTR_DSP and MU2A. For the nodes
> using the "-hifi4" compatibles these PDs are optional, while for
> nodes using the "-dsp" compatibles these are mandatory.
>
> These changes reflect all of this information.
Can you wrap message to 75 char?
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> .../devicetree/bindings/dsp/fsl,dsp.yaml | 62 +++++++++++++++----
> 1 file changed, 49 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> index 9af40da5688e..e2f016af1048 100644
> --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
> @@ -51,8 +51,6 @@ properties:
> description:
> List of phandle and PM domain specifier as documented in
> Documentation/devicetree/bindings/power/power_domain.txt
> - minItems: 1
> - maxItems: 4
>
> mboxes:
> description:
> @@ -97,16 +95,55 @@ allOf:
> properties:
> compatible:
> contains:
> - enum:
> - - fsl,imx8qxp-dsp
> - - fsl,imx8qm-dsp
> - - fsl,imx8qxp-hifi4
> - - fsl,imx8qm-hifi4
> + const: fsl,imx8qxp-hifi4
> then:
> properties:
> power-domains:
> - minItems: 4
> - else:
> + maxItems: 3
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx8qxp-dsp
> + then:
> + properties:
> + power-domains:
> + minItems: 3
> + maxItems: 3
I remember only need maxItems, if minItems == maxItems.
Frank
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx8qm-dsp
> + then:
> + properties:
> + power-domains:
> + minItems: 5
> + maxItems: 5
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx8qm-hifi4
> + then:
> + properties:
> + power-domains:
> + minItems: 3
> + maxItems: 5
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx8mp-dsp
> + - fsl,imx8mp-hifi4
> + - fsl,imx8ulp-dsp
> + - fsl,imx8ulp-hifi4
> + then:
> properties:
> power-domains:
> maxItems: 1
> @@ -157,10 +194,9 @@ examples:
> <&adma_lpcg IMX_ADMA_LPCG_OCRAM_IPG_CLK>,
> <&adma_lpcg IMX_ADMA_LPCG_DSP_CORE_CLK>;
> clock-names = "ipg", "ocram", "core";
> - power-domains = <&pd IMX_SC_R_MU_13A>,
> - <&pd IMX_SC_R_MU_13B>,
> - <&pd IMX_SC_R_DSP>,
> - <&pd IMX_SC_R_DSP_RAM>;
> + power-domains = <&pd IMX_SC_R_MU_13B>,
> + <&pd IMX_SC_R_IRQSTR_DSP>,
> + <&pd IMX_SC_R_MU_2A>;
> mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
> mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>;
> memory-region = <&dsp_reserved>;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] dt-bindings: dsp: fix power domain count
2024-09-18 18:49 ` Frank Li
@ 2024-09-22 23:03 ` Laurentiu Mihalcea
0 siblings, 0 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-22 23:03 UTC (permalink / raw)
To: Frank Li
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On 9/18/2024 9:49 PM, Frank Li wrote:
> On Wed, Sep 18, 2024 at 02:21:13PM -0400, Laurentiu Mihalcea wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> Per the current binding, QM/QXP DSPs are supposed
>> to have 4 power domains, while the rest just 1.
>> For QM/QXP, the 4 power domains are: DSP, DSP_RAM,
>> MU13A, MU13B.
>>
>> First off, drop MU13A from the count. This is attached
>> to the platform device of lsio_mu13. This decreases the
>> count to 3.
>>
>> Secondly, drop DSP and DSP_RAM from the count for QXP.
>> These are attached to the platform devices of the lpcgs
>> (used as clock providers for the DSP).
>>
>> With this in mind, the number of required power domains for
>> QXP is 1 (MU13B), while for QM it's 3 (MU13B, DSP, DSP_RAM).
>>
>> Additionally, two extra power domains may be required in the
>> case of QM/QXP DSPs. These are IRQSTR_DSP and MU2A. For the nodes
>> using the "-hifi4" compatibles these PDs are optional, while for
>> nodes using the "-dsp" compatibles these are mandatory.
>>
>> These changes reflect all of this information.
> Can you wrap message to 75 char?
Shall fix in V2.
>
>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>> ---
>> .../devicetree/bindings/dsp/fsl,dsp.yaml | 62 +++++++++++++++----
>> 1 file changed, 49 insertions(+), 13 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
>> index 9af40da5688e..e2f016af1048 100644
>> --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
>> +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml
>> @@ -51,8 +51,6 @@ properties:
>> description:
>> List of phandle and PM domain specifier as documented in
>> Documentation/devicetree/bindings/power/power_domain.txt
>> - minItems: 1
>> - maxItems: 4
>>
>> mboxes:
>> description:
>> @@ -97,16 +95,55 @@ allOf:
>> properties:
>> compatible:
>> contains:
>> - enum:
>> - - fsl,imx8qxp-dsp
>> - - fsl,imx8qm-dsp
>> - - fsl,imx8qxp-hifi4
>> - - fsl,imx8qm-hifi4
>> + const: fsl,imx8qxp-hifi4
>> then:
>> properties:
>> power-domains:
>> - minItems: 4
>> - else:
>> + maxItems: 3
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: fsl,imx8qxp-dsp
>> + then:
>> + properties:
>> + power-domains:
>> + minItems: 3
>> + maxItems: 3
> I remember only need maxItems, if minItems == maxItems.
Might be off here but from my own testing and from looking at dtschema/fixups.py it would seem that's not really applicable to subschemas under "then"/"else" blocks.
>
> Frank
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: fsl,imx8qm-dsp
>> + then:
>> + properties:
>> + power-domains:
>> + minItems: 5
>> + maxItems: 5
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: fsl,imx8qm-hifi4
>> + then:
>> + properties:
>> + power-domains:
>> + minItems: 3
>> + maxItems: 5
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - fsl,imx8mp-dsp
>> + - fsl,imx8mp-hifi4
>> + - fsl,imx8ulp-dsp
>> + - fsl,imx8ulp-hifi4
>> + then:
>> properties:
>> power-domains:
>> maxItems: 1
>> @@ -157,10 +194,9 @@ examples:
>> <&adma_lpcg IMX_ADMA_LPCG_OCRAM_IPG_CLK>,
>> <&adma_lpcg IMX_ADMA_LPCG_DSP_CORE_CLK>;
>> clock-names = "ipg", "ocram", "core";
>> - power-domains = <&pd IMX_SC_R_MU_13A>,
>> - <&pd IMX_SC_R_MU_13B>,
>> - <&pd IMX_SC_R_DSP>,
>> - <&pd IMX_SC_R_DSP_RAM>;
>> + power-domains = <&pd IMX_SC_R_MU_13B>,
>> + <&pd IMX_SC_R_IRQSTR_DSP>,
>> + <&pd IMX_SC_R_MU_2A>;
>> mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
>> mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>;
>> memory-region = <&dsp_reserved>;
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] dt-bindings: dsp: fix power domain count
2024-09-18 18:21 ` [PATCH 1/5] dt-bindings: dsp: fix power domain count Laurentiu Mihalcea
2024-09-18 18:49 ` Frank Li
@ 2024-09-18 19:36 ` Rob Herring (Arm)
2024-09-18 20:37 ` Rob Herring
2 siblings, 0 replies; 17+ messages in thread
From: Rob Herring (Arm) @ 2024-09-18 19:36 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Conor Dooley, Krzysztof Kozlowski, Daniel Baluta, Shengjiu Wang,
Iuliana Prodan, linux-kernel, Sascha Hauer, linux-arm-kernel, imx,
Shawn Guo, devicetree
On Wed, 18 Sep 2024 14:21:13 -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Per the current binding, QM/QXP DSPs are supposed
> to have 4 power domains, while the rest just 1.
> For QM/QXP, the 4 power domains are: DSP, DSP_RAM,
> MU13A, MU13B.
>
> First off, drop MU13A from the count. This is attached
> to the platform device of lsio_mu13. This decreases the
> count to 3.
>
> Secondly, drop DSP and DSP_RAM from the count for QXP.
> These are attached to the platform devices of the lpcgs
> (used as clock providers for the DSP).
>
> With this in mind, the number of required power domains for
> QXP is 1 (MU13B), while for QM it's 3 (MU13B, DSP, DSP_RAM).
>
> Additionally, two extra power domains may be required in the
> case of QM/QXP DSPs. These are IRQSTR_DSP and MU2A. For the nodes
> using the "-hifi4" compatibles these PDs are optional, while for
> nodes using the "-dsp" compatibles these are mandatory.
>
> These changes reflect all of this information.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> .../devicetree/bindings/dsp/fsl,dsp.yaml | 62 +++++++++++++++----
> 1 file changed, 49 insertions(+), 13 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mailbox/arm,mhuv2.example.dtb: dsp@596e8000: power-domains: [[4294967295, 0], [4294967295, 1], [4294967295, 2], [4294967295, 3]] is too long
from schema $id: http://devicetree.org/schemas/dsp/fsl,dsp.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240918182117.86221-2-laurentiumihalcea111@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/5] dt-bindings: dsp: fix power domain count
2024-09-18 18:21 ` [PATCH 1/5] dt-bindings: dsp: fix power domain count Laurentiu Mihalcea
2024-09-18 18:49 ` Frank Li
2024-09-18 19:36 ` Rob Herring (Arm)
@ 2024-09-18 20:37 ` Rob Herring
2 siblings, 0 replies; 17+ messages in thread
From: Rob Herring @ 2024-09-18 20:37 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Daniel Baluta, Shengjiu Wang, Iuliana Prodan, devicetree, imx,
linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:13PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The subject should say this is for fsl,dsp, not *all* dsp's.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage
2024-09-18 18:21 [PATCH 0/5] configure imx8 dsp DT node for rproc usage Laurentiu Mihalcea
2024-09-18 18:21 ` [PATCH 1/5] dt-bindings: dsp: fix power domain count Laurentiu Mihalcea
@ 2024-09-18 18:21 ` Laurentiu Mihalcea
2024-09-18 19:02 ` Frank Li
2024-09-18 18:21 ` [PATCH 3/5] arm64: dts: imx8qm: drop dsp node from audio_subsys bus Laurentiu Mihalcea
` (2 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-18 18:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Currently, the dsp node is configured for SOF usage, which
is not the "default" case and should be done in a separate
SOF DTS. As such, configure the dsp node for rproc usage,
which is the "default" case.
This also includes the addition of the 2 optional
power domains which may be required by some applications.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
.../boot/dts/freescale/imx8-ss-audio.dtsi | 20 +++++++++----------
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 15 +++++++++++++-
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 19 ++++++++++++++++++
3 files changed, 42 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
index ff5df0fed9e9..28970211dd67 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
@@ -431,22 +431,20 @@ dsp_ram_lpcg: clock-controller@59590000 {
};
dsp: dsp@596e8000 {
- compatible = "fsl,imx8qxp-dsp";
+ compatible = "fsl,imx8qxp-hifi4";
reg = <0x596e8000 0x88000>;
clocks = <&dsp_lpcg IMX_LPCG_CLK_5>,
<&dsp_ram_lpcg IMX_LPCG_CLK_4>,
<&dsp_lpcg IMX_LPCG_CLK_7>;
clock-names = "ipg", "ocram", "core";
- power-domains = <&pd IMX_SC_R_MU_13A>,
- <&pd IMX_SC_R_MU_13B>,
- <&pd IMX_SC_R_DSP>,
- <&pd IMX_SC_R_DSP_RAM>;
- mbox-names = "txdb0", "txdb1",
- "rxdb0", "rxdb1";
- mboxes = <&lsio_mu13 2 0>,
- <&lsio_mu13 2 1>,
- <&lsio_mu13 3 0>,
- <&lsio_mu13 3 1>;
+ power-domains = <&pd IMX_SC_R_MU_13B>,
+ <&pd IMX_SC_R_IRQSTR_DSP>,
+ <&pd IMX_SC_R_MU_2A>;
+ mbox-names = "tx", "rx", "rxdb";
+ mboxes = <&lsio_mu13 0 0>,
+ <&lsio_mu13 1 0>,
+ <&lsio_mu13 3 0>;
+ firmware-name = "imx/dsp/hifi4.bin";
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
index 936ba5ecdcac..527933a3eb5c 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
@@ -63,7 +63,8 @@ sound-wm8960 {
};
&dsp {
- memory-region = <&dsp_reserved>;
+ memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
+ <&dsp_vdev0vring1>, <&dsp_reserved>;
status = "okay";
};
@@ -71,6 +72,18 @@ &dsp_reserved {
status = "okay";
};
+&dsp_vdev0buffer {
+ status = "okay";
+};
+
+&dsp_vdev0vring0 {
+ status = "okay";
+};
+
+&dsp_vdev0vring1 {
+ status = "okay";
+};
+
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 0313f295de2e..9522a65b3e22 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -186,6 +186,25 @@ dsp_reserved: dsp@92400000 {
status = "disabled";
};
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
+ reg = <0 0x942f0000 0 0x8000>;
+ no-map;
+ status = "disabled";
+ };
+
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
+ reg = <0 0x942f8000 0 0x8000>;
+ no-map;
+ status = "disabled";
+ };
+
+ dsp_vdev0buffer: vdev0buffer@94300000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x94300000 0 0x100000>;
+ no-map;
+ status = "disabled";
+ };
+
encoder_rpc: encoder-rpc@94400000 {
reg = <0 0x94400000 0 0x700000>;
no-map;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage
2024-09-18 18:21 ` [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage Laurentiu Mihalcea
@ 2024-09-18 19:02 ` Frank Li
2024-09-24 11:01 ` Daniel Baluta
0 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2024-09-18 19:02 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:14PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Currently, the dsp node is configured for SOF usage, which
> is not the "default" case and should be done in a separate
> SOF DTS. As such, configure the dsp node for rproc usage,
> which is the "default" case.
why do you think SOF is not "default" case? where sof dts?
Frank
>
> This also includes the addition of the 2 optional
> power domains which may be required by some applications.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> .../boot/dts/freescale/imx8-ss-audio.dtsi | 20 +++++++++----------
> arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 15 +++++++++++++-
> arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 19 ++++++++++++++++++
> 3 files changed, 42 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
> index ff5df0fed9e9..28970211dd67 100644
> --- a/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi
> @@ -431,22 +431,20 @@ dsp_ram_lpcg: clock-controller@59590000 {
> };
>
> dsp: dsp@596e8000 {
> - compatible = "fsl,imx8qxp-dsp";
> + compatible = "fsl,imx8qxp-hifi4";
> reg = <0x596e8000 0x88000>;
> clocks = <&dsp_lpcg IMX_LPCG_CLK_5>,
> <&dsp_ram_lpcg IMX_LPCG_CLK_4>,
> <&dsp_lpcg IMX_LPCG_CLK_7>;
> clock-names = "ipg", "ocram", "core";
> - power-domains = <&pd IMX_SC_R_MU_13A>,
> - <&pd IMX_SC_R_MU_13B>,
> - <&pd IMX_SC_R_DSP>,
> - <&pd IMX_SC_R_DSP_RAM>;
> - mbox-names = "txdb0", "txdb1",
> - "rxdb0", "rxdb1";
> - mboxes = <&lsio_mu13 2 0>,
> - <&lsio_mu13 2 1>,
> - <&lsio_mu13 3 0>,
> - <&lsio_mu13 3 1>;
> + power-domains = <&pd IMX_SC_R_MU_13B>,
> + <&pd IMX_SC_R_IRQSTR_DSP>,
> + <&pd IMX_SC_R_MU_2A>;
> + mbox-names = "tx", "rx", "rxdb";
> + mboxes = <&lsio_mu13 0 0>,
> + <&lsio_mu13 1 0>,
> + <&lsio_mu13 3 0>;
> + firmware-name = "imx/dsp/hifi4.bin";
> status = "disabled";
> };
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
> index 936ba5ecdcac..527933a3eb5c 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
> @@ -63,7 +63,8 @@ sound-wm8960 {
> };
>
> &dsp {
> - memory-region = <&dsp_reserved>;
> + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
> + <&dsp_vdev0vring1>, <&dsp_reserved>;
> status = "okay";
> };
>
> @@ -71,6 +72,18 @@ &dsp_reserved {
> status = "okay";
> };
>
> +&dsp_vdev0buffer {
> + status = "okay";
> +};
> +
> +&dsp_vdev0vring0 {
> + status = "okay";
> +};
> +
> +&dsp_vdev0vring1 {
> + status = "okay";
> +};
> +
> &fec1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_fec1>;
> diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> index 0313f295de2e..9522a65b3e22 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> @@ -186,6 +186,25 @@ dsp_reserved: dsp@92400000 {
> status = "disabled";
> };
>
> + dsp_vdev0vring0: vdev0vring0@942f0000 {
> + reg = <0 0x942f0000 0 0x8000>;
> + no-map;
> + status = "disabled";
> + };
> +
> + dsp_vdev0vring1: vdev0vring1@942f8000 {
> + reg = <0 0x942f8000 0 0x8000>;
> + no-map;
> + status = "disabled";
> + };
> +
> + dsp_vdev0buffer: vdev0buffer@94300000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x94300000 0 0x100000>;
> + no-map;
> + status = "disabled";
> + };
> +
> encoder_rpc: encoder-rpc@94400000 {
> reg = <0 0x94400000 0 0x700000>;
> no-map;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage
2024-09-18 19:02 ` Frank Li
@ 2024-09-24 11:01 ` Daniel Baluta
0 siblings, 0 replies; 17+ messages in thread
From: Daniel Baluta @ 2024-09-24 11:01 UTC (permalink / raw)
To: Frank Li
Cc: Laurentiu Mihalcea, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, Sascha Hauer, Daniel Baluta,
Shengjiu Wang, Iuliana Prodan, devicetree, imx, linux-arm-kernel,
linux-kernel
On Wed, Sep 18, 2024 at 10:02 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Wed, Sep 18, 2024 at 02:21:14PM -0400, Laurentiu Mihalcea wrote:
> > From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> >
> > Currently, the dsp node is configured for SOF usage, which
> > is not the "default" case and should be done in a separate
> > SOF DTS. As such, configure the dsp node for rproc usage,
> > which is the "default" case.
>
> why do you think SOF is not "default" case? where sof dts?
SOF DTS are yet to be upstreamed. We use the DSP for several usescases.
1) General applications using the DSP using remoteproc/rpmsg interface.
2) Sound Open Firmware.
We would like to have 1) as a default this implies that Audio is done
via default
ALSA path.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/5] arm64: dts: imx8qm: drop dsp node from audio_subsys bus
2024-09-18 18:21 [PATCH 0/5] configure imx8 dsp DT node for rproc usage Laurentiu Mihalcea
2024-09-18 18:21 ` [PATCH 1/5] dt-bindings: dsp: fix power domain count Laurentiu Mihalcea
2024-09-18 18:21 ` [PATCH 2/5] arm64: dts: imx8qxp: configure dsp node for rproc usage Laurentiu Mihalcea
@ 2024-09-18 18:21 ` Laurentiu Mihalcea
2024-09-18 18:54 ` Frank Li
2024-09-18 18:21 ` [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp Laurentiu Mihalcea
2024-09-18 18:21 ` [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage Laurentiu Mihalcea
4 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-18 18:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
On i.MX8QM, the DSP is in the VPU subsystem, which
means that using the dsp node from 'imx8-ss-audio.dtsi'
is wrong as it's placed under the wrong bus. Luckily,
there's no users for the dsp node so drop it.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
index 3ee6e2869e3c..f8b577ebdbef 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
@@ -603,3 +603,5 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll {
#include "imx8qm-ss-audio.dtsi"
#include "imx8qm-ss-lvds.dtsi"
#include "imx8qm-ss-mipi.dtsi"
+
+/delete-node/ &dsp;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 3/5] arm64: dts: imx8qm: drop dsp node from audio_subsys bus
2024-09-18 18:21 ` [PATCH 3/5] arm64: dts: imx8qm: drop dsp node from audio_subsys bus Laurentiu Mihalcea
@ 2024-09-18 18:54 ` Frank Li
0 siblings, 0 replies; 17+ messages in thread
From: Frank Li @ 2024-09-18 18:54 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:15PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> On i.MX8QM, the DSP is in the VPU subsystem, which
> means that using the dsp node from 'imx8-ss-audio.dtsi'
> is wrong as it's placed under the wrong bus. Luckily,
> there's no users for the dsp node so drop it.
>
Fix tag, and wrap at 75 chars.
the 'dsp' node from 'imx8-ss-audio.dtsi' is wrong in i.MX8QM because it is
in the VPU subsystem. So delete it.
Frank
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> index 3ee6e2869e3c..f8b577ebdbef 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> @@ -603,3 +603,5 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll {
> #include "imx8qm-ss-audio.dtsi"
> #include "imx8qm-ss-lvds.dtsi"
> #include "imx8qm-ss-mipi.dtsi"
> +
> +/delete-node/ &dsp;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp
2024-09-18 18:21 [PATCH 0/5] configure imx8 dsp DT node for rproc usage Laurentiu Mihalcea
` (2 preceding siblings ...)
2024-09-18 18:21 ` [PATCH 3/5] arm64: dts: imx8qm: drop dsp node from audio_subsys bus Laurentiu Mihalcea
@ 2024-09-18 18:21 ` Laurentiu Mihalcea
2024-09-18 18:57 ` Frank Li
2024-09-18 18:21 ` [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage Laurentiu Mihalcea
4 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-18 18:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add DT node for i.MX8QM's DSP, which is found in
the VPU subsystem.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8qm.dtsi | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
index f8b577ebdbef..ae0165a44dcd 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
@@ -581,6 +581,33 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll {
clock-output-names = "mipi_pll_div2_clk";
};
+ vpu_subsys_dsp: bus@55000000 {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x55000000 0x0 0x55000000 0x1000000>;
+
+ vpu_dsp: dsp@556e8000 {
+ compatible = "fsl,imx8qm-hifi4";
+ reg = <0x556e8000 0x88000>;
+ clocks = <&clk_dummy>,
+ <&clk_dummy>,
+ <&clk_dummy>;
+ clock-names = "ipg", "ocram", "core";
+ power-domains = <&pd IMX_SC_R_MU_13B>,
+ <&pd IMX_SC_R_DSP>,
+ <&pd IMX_SC_R_DSP_RAM>,
+ <&pd IMX_SC_R_IRQSTR_DSP>,
+ <&pd IMX_SC_R_MU_2A>;
+ mbox-names = "tx", "rx", "rxdb";
+ mboxes = <&lsio_mu13 0 0>,
+ <&lsio_mu13 1 0>,
+ <&lsio_mu13 3 0>;
+ firmware-name = "imx/dsp/hifi4.bin";
+ status = "disabled";
+ };
+ };
+
/* sorted in register address */
#include "imx8-ss-cm41.dtsi"
#include "imx8-ss-audio.dtsi"
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp
2024-09-18 18:21 ` [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp Laurentiu Mihalcea
@ 2024-09-18 18:57 ` Frank Li
2024-09-22 23:19 ` Laurentiu Mihalcea
0 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2024-09-18 18:57 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:16PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Add DT node for i.MX8QM's DSP, which is found in
> the VPU subsystem.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8qm.dtsi | 27 +++++++++++++++++++++++
why not add a file imx8qm-ss-vpu.dtsi to keep consistent with others.
Frank
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> index f8b577ebdbef..ae0165a44dcd 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
> @@ -581,6 +581,33 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll {
> clock-output-names = "mipi_pll_div2_clk";
> };
>
> + vpu_subsys_dsp: bus@55000000 {
> + compatible = "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0x55000000 0x0 0x55000000 0x1000000>;
> +
> + vpu_dsp: dsp@556e8000 {
> + compatible = "fsl,imx8qm-hifi4";
> + reg = <0x556e8000 0x88000>;
> + clocks = <&clk_dummy>,
> + <&clk_dummy>,
> + <&clk_dummy>;
> + clock-names = "ipg", "ocram", "core";
> + power-domains = <&pd IMX_SC_R_MU_13B>,
> + <&pd IMX_SC_R_DSP>,
> + <&pd IMX_SC_R_DSP_RAM>,
> + <&pd IMX_SC_R_IRQSTR_DSP>,
> + <&pd IMX_SC_R_MU_2A>;
> + mbox-names = "tx", "rx", "rxdb";
> + mboxes = <&lsio_mu13 0 0>,
> + <&lsio_mu13 1 0>,
> + <&lsio_mu13 3 0>;
> + firmware-name = "imx/dsp/hifi4.bin";
> + status = "disabled";
> + };
> + };
> +
> /* sorted in register address */
> #include "imx8-ss-cm41.dtsi"
> #include "imx8-ss-audio.dtsi"
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp
2024-09-18 18:57 ` Frank Li
@ 2024-09-22 23:19 ` Laurentiu Mihalcea
0 siblings, 0 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-22 23:19 UTC (permalink / raw)
To: Frank Li
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On 9/18/2024 9:57 PM, Frank Li wrote:
> On Wed, Sep 18, 2024 at 02:21:16PM -0400, Laurentiu Mihalcea wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> Add DT node for i.MX8QM's DSP, which is found in
>> the VPU subsystem.
>>
>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>> ---
>> arch/arm64/boot/dts/freescale/imx8qm.dtsi | 27 +++++++++++++++++++++++
> why not add a file imx8qm-ss-vpu.dtsi to keep consistent with others.
Don't see much value in doing so right now. It's just two extra nodes (should stay that way AFAICT).
>
> Frank
>
>> 1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
>> index f8b577ebdbef..ae0165a44dcd 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
>> @@ -581,6 +581,33 @@ mipi_pll_div2_clk: clock-controller-mipi-div2-pll {
>> clock-output-names = "mipi_pll_div2_clk";
>> };
>>
>> + vpu_subsys_dsp: bus@55000000 {
>> + compatible = "simple-bus";
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + ranges = <0x55000000 0x0 0x55000000 0x1000000>;
>> +
>> + vpu_dsp: dsp@556e8000 {
>> + compatible = "fsl,imx8qm-hifi4";
>> + reg = <0x556e8000 0x88000>;
>> + clocks = <&clk_dummy>,
>> + <&clk_dummy>,
>> + <&clk_dummy>;
>> + clock-names = "ipg", "ocram", "core";
>> + power-domains = <&pd IMX_SC_R_MU_13B>,
>> + <&pd IMX_SC_R_DSP>,
>> + <&pd IMX_SC_R_DSP_RAM>,
>> + <&pd IMX_SC_R_IRQSTR_DSP>,
>> + <&pd IMX_SC_R_MU_2A>;
>> + mbox-names = "tx", "rx", "rxdb";
>> + mboxes = <&lsio_mu13 0 0>,
>> + <&lsio_mu13 1 0>,
>> + <&lsio_mu13 3 0>;
>> + firmware-name = "imx/dsp/hifi4.bin";
>> + status = "disabled";
>> + };
>> + };
>> +
>> /* sorted in register address */
>> #include "imx8-ss-cm41.dtsi"
>> #include "imx8-ss-audio.dtsi"
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage
2024-09-18 18:21 [PATCH 0/5] configure imx8 dsp DT node for rproc usage Laurentiu Mihalcea
` (3 preceding siblings ...)
2024-09-18 18:21 ` [PATCH 4/5] arm64: dts: imx8qm: add node for VPU dsp Laurentiu Mihalcea
@ 2024-09-18 18:21 ` Laurentiu Mihalcea
2024-09-18 19:00 ` Frank Li
4 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-18 18:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Set the status of the dsp node to "okay" and assign
its reserved memory regions.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 27 ++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
index 62203eed6a6c..7ee69ce7b193 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
@@ -92,6 +92,27 @@ vdevbuffer: memory@90400000 {
reg = <0 0x90400000 0 0x100000>;
no-map;
};
+
+ dsp_reserved: dsp@92400000 {
+ reg = <0 0x92400000 0 0x1000000>;
+ no-map;
+ };
+
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
+ reg = <0 0x942f0000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
+ reg = <0 0x942f8000 0 0x8000>;
+ no-map;
+ };
+
+ dsp_vdev0buffer: vdev0buffer@94300000 {
+ compatible = "shared-dma-pool";
+ reg = <0 0x94300000 0 0x100000>;
+ no-map;
+ };
};
lvds_backlight0: backlight-lvds0 {
@@ -640,6 +661,12 @@ &sai7 {
status = "okay";
};
+&vpu_dsp {
+ memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
+ <&dsp_vdev0vring1>, <&dsp_reserved>;
+ status = "okay";
+};
+
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog>;
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage
2024-09-18 18:21 ` [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage Laurentiu Mihalcea
@ 2024-09-18 19:00 ` Frank Li
2024-09-22 23:15 ` Laurentiu Mihalcea
0 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2024-09-18 19:00 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On Wed, Sep 18, 2024 at 02:21:17PM -0400, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Set the status of the dsp node to "okay" and assign
> its reserved memory regions.
wrap at 75 chars.
Add dsp node and related reserved memory regions.
Frank
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 27 ++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
> index 62203eed6a6c..7ee69ce7b193 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
> @@ -92,6 +92,27 @@ vdevbuffer: memory@90400000 {
> reg = <0 0x90400000 0 0x100000>;
> no-map;
> };
> +
> + dsp_reserved: dsp@92400000 {
> + reg = <0 0x92400000 0 0x1000000>;
> + no-map;
> + };
> +
> + dsp_vdev0vring0: vdev0vring0@942f0000 {
'vdev0vring0' should be genernal name, such as 'memory'
> + reg = <0 0x942f0000 0 0x8000>;
> + no-map;
> + };
> +
> + dsp_vdev0vring1: vdev0vring1@942f8000 {
> + reg = <0 0x942f8000 0 0x8000>;
> + no-map;
> + };
> +
> + dsp_vdev0buffer: vdev0buffer@94300000 {
> + compatible = "shared-dma-pool";
> + reg = <0 0x94300000 0 0x100000>;
> + no-map;
> + };
> };
>
> lvds_backlight0: backlight-lvds0 {
> @@ -640,6 +661,12 @@ &sai7 {
> status = "okay";
> };
>
> +&vpu_dsp {
> + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
> + <&dsp_vdev0vring1>, <&dsp_reserved>;
> + status = "okay";
> +};
> +
> &iomuxc {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_hog>;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 5/5] arm64: dts: imx8qm: enable dsp node for rproc usage
2024-09-18 19:00 ` Frank Li
@ 2024-09-22 23:15 ` Laurentiu Mihalcea
0 siblings, 0 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2024-09-22 23:15 UTC (permalink / raw)
To: Frank Li
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
Sascha Hauer, Daniel Baluta, Shengjiu Wang, Iuliana Prodan,
devicetree, imx, linux-arm-kernel, linux-kernel
On 9/18/2024 10:00 PM, Frank Li wrote:
> On Wed, Sep 18, 2024 at 02:21:17PM -0400, Laurentiu Mihalcea wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> Set the status of the dsp node to "okay" and assign
>> its reserved memory regions.
> wrap at 75 chars.
>
> Add dsp node and related reserved memory regions.
>
> Frank
>
>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>> ---
>> arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 27 ++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
>> index 62203eed6a6c..7ee69ce7b193 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
>> +++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
>> @@ -92,6 +92,27 @@ vdevbuffer: memory@90400000 {
>> reg = <0 0x90400000 0 0x100000>;
>> no-map;
>> };
>> +
>> + dsp_reserved: dsp@92400000 {
>> + reg = <0 0x92400000 0 0x1000000>;
>> + no-map;
>> + };
>> +
>> + dsp_vdev0vring0: vdev0vring0@942f0000 {
> 'vdev0vring0' should be genernal name, such as 'memory'
Driver expects reserved memory node names to have a certain format.
If possible and if too problematic I'd rather have this fixed in a separate patch series.
>
>> + reg = <0 0x942f0000 0 0x8000>;
>> + no-map;
>> + };
>> +
>> + dsp_vdev0vring1: vdev0vring1@942f8000 {
>> + reg = <0 0x942f8000 0 0x8000>;
>> + no-map;
>> + };
>> +
>> + dsp_vdev0buffer: vdev0buffer@94300000 {
>> + compatible = "shared-dma-pool";
>> + reg = <0 0x94300000 0 0x100000>;
>> + no-map;
>> + };
>> };
>>
>> lvds_backlight0: backlight-lvds0 {
>> @@ -640,6 +661,12 @@ &sai7 {
>> status = "okay";
>> };
>>
>> +&vpu_dsp {
>> + memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>,
>> + <&dsp_vdev0vring1>, <&dsp_reserved>;
>> + status = "okay";
>> +};
>> +
>> &iomuxc {
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_hog>;
>> --
>> 2.34.1
>>
^ permalink raw reply [flat|nested] 17+ messages in thread