* [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-11 22:58 [PATCH v4 0/3] add sof support on imx95 Laurentiu Mihalcea
@ 2025-02-11 22:58 ` Laurentiu Mihalcea
2025-02-12 7:09 ` Krzysztof Kozlowski
2025-02-12 9:36 ` Marco Felsch
2025-02-11 22:58 ` [PATCH v4 2/3] ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios support Laurentiu Mihalcea
` (2 subsequent siblings)
3 siblings, 2 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-11 22:58 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer
Cc: Pengutronix Kernel Team, linux-sound, devicetree, imx,
linux-kernel, linux-arm-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add binding for imx95's CM7 core, used for audio processing.
Additionally, introduce a common binding for NXP audio processors with
Sound Open Firmware (SOF) support.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
.../bindings/sound/fsl,imx95-cm7-sof.yaml | 64 +++++++++++++++++++
.../bindings/sound/fsl,sof-cpu.yaml | 27 ++++++++
2 files changed, 91 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
create mode 100644 Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
diff --git a/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
new file mode 100644
index 000000000000..f00ae3219e15
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,imx95-cm7-sof.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP imx95 CM7 core
+
+maintainers:
+ - Daniel Baluta <daniel.baluta@nxp.com>
+
+description: NXP imx95 CM7 core used for audio processing
+
+properties:
+ compatible:
+ const: fsl,imx95-cm7-sof
+
+ reg:
+ maxItems: 1
+
+ reg-names:
+ const: sram
+
+ memory-region:
+ maxItems: 1
+
+ memory-region-names:
+ const: dma
+
+ port:
+ description: SAI3 port
+ $ref: audio-graph-port.yaml#
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - memory-region
+ - memory-region-names
+ - port
+
+allOf:
+ - $ref: fsl,sof-cpu.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ cm7-cpu@80000000 {
+ compatible = "fsl,imx95-cm7-sof";
+ reg = <0x80000000 0x6100000>;
+ reg-names = "sram";
+ mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>;
+ mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
+ memory-region = <&adma_res>;
+ memory-region-names = "dma";
+ port {
+ /* SAI3-WM8962 link */
+ endpoint {
+ remote-endpoint = <&wm8962_ep>;
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml b/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
new file mode 100644
index 000000000000..31863932dbc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,sof-cpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP audio processor common properties
+
+maintainers:
+ - Daniel Baluta <daniel.baluta@nxp.com>
+
+properties:
+ mboxes:
+ maxItems: 4
+
+ mbox-names:
+ items:
+ - const: txdb0
+ - const: txdb1
+ - const: rxdb0
+ - const: rxdb1
+
+required:
+ - mboxes
+ - mbox-names
+
+additionalProperties: true
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-11 22:58 ` [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core Laurentiu Mihalcea
@ 2025-02-12 7:09 ` Krzysztof Kozlowski
2025-02-12 9:36 ` Marco Felsch
1 sibling, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-12 7:09 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, Pengutronix Kernel Team,
linux-sound, devicetree, imx, linux-kernel, linux-arm-kernel
On Tue, Feb 11, 2025 at 05:58:06PM -0500, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Add binding for imx95's CM7 core, used for audio processing.
> Additionally, introduce a common binding for NXP audio processors with
> Sound Open Firmware (SOF) support.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> .../bindings/sound/fsl,imx95-cm7-sof.yaml | 64 +++++++++++++++++++
> .../bindings/sound/fsl,sof-cpu.yaml | 27 ++++++++
> 2 files changed, 91 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-11 22:58 ` [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core Laurentiu Mihalcea
2025-02-12 7:09 ` Krzysztof Kozlowski
@ 2025-02-12 9:36 ` Marco Felsch
2025-02-12 10:11 ` Daniel Baluta
1 sibling, 1 reply; 17+ messages in thread
From: Marco Felsch @ 2025-02-12 9:36 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, devicetree, imx, linux-kernel,
linux-sound, Pengutronix Kernel Team, linux-arm-kernel
On 25-02-11, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Add binding for imx95's CM7 core, used for audio processing.
> Additionally, introduce a common binding for NXP audio processors with
> Sound Open Firmware (SOF) support.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> .../bindings/sound/fsl,imx95-cm7-sof.yaml | 64 +++++++++++++++++++
> .../bindings/sound/fsl,sof-cpu.yaml | 27 ++++++++
> 2 files changed, 91 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> new file mode 100644
> index 000000000000..f00ae3219e15
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl,imx95-cm7-sof.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP imx95 CM7 core
> +
> +maintainers:
> + - Daniel Baluta <daniel.baluta@nxp.com>
> +
> +description: NXP imx95 CM7 core used for audio processing
> +
> +properties:
> + compatible:
> + const: fsl,imx95-cm7-sof
Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
add the -sof suffix instead of -audio or so? SOF is a software project
but you can clearly run different software on the audio-copro as well.
Regards,
Marco
> +
> + reg:
> + maxItems: 1
> +
> + reg-names:
> + const: sram
> +
> + memory-region:
> + maxItems: 1
> +
> + memory-region-names:
> + const: dma
> +
> + port:
> + description: SAI3 port
> + $ref: audio-graph-port.yaml#
> + unevaluatedProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
> + - memory-region
> + - memory-region-names
> + - port
> +
> +allOf:
> + - $ref: fsl,sof-cpu.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + cm7-cpu@80000000 {
> + compatible = "fsl,imx95-cm7-sof";
> + reg = <0x80000000 0x6100000>;
> + reg-names = "sram";
> + mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>;
> + mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
> + memory-region = <&adma_res>;
> + memory-region-names = "dma";
> + port {
> + /* SAI3-WM8962 link */
> + endpoint {
> + remote-endpoint = <&wm8962_ep>;
> + };
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml b/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
> new file mode 100644
> index 000000000000..31863932dbc3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
> @@ -0,0 +1,27 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl,sof-cpu.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP audio processor common properties
> +
> +maintainers:
> + - Daniel Baluta <daniel.baluta@nxp.com>
> +
> +properties:
> + mboxes:
> + maxItems: 4
> +
> + mbox-names:
> + items:
> + - const: txdb0
> + - const: txdb1
> + - const: rxdb0
> + - const: rxdb1
> +
> +required:
> + - mboxes
> + - mbox-names
> +
> +additionalProperties: true
> --
> 2.34.1
>
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-12 9:36 ` Marco Felsch
@ 2025-02-12 10:11 ` Daniel Baluta
2025-02-12 12:38 ` Mark Brown
0 siblings, 1 reply; 17+ messages in thread
From: Daniel Baluta @ 2025-02-12 10:11 UTC (permalink / raw)
To: Marco Felsch
Cc: Laurentiu Mihalcea, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Shawn Guo, Kuninori Morimoto, Sascha Hauer, devicetree, imx,
linux-kernel, linux-sound, Pengutronix Kernel Team,
linux-arm-kernel
On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
>
> On 25-02-11, Laurentiu Mihalcea wrote:
> > From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> >
> > Add binding for imx95's CM7 core, used for audio processing.
> > Additionally, introduce a common binding for NXP audio processors with
> > Sound Open Firmware (SOF) support.
> >
> > Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> > ---
> > .../bindings/sound/fsl,imx95-cm7-sof.yaml | 64 +++++++++++++++++++
> > .../bindings/sound/fsl,sof-cpu.yaml | 27 ++++++++
> > 2 files changed, 91 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> > create mode 100644 Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> > new file mode 100644
> > index 000000000000..f00ae3219e15
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> > @@ -0,0 +1,64 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/fsl,imx95-cm7-sof.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: NXP imx95 CM7 core
> > +
> > +maintainers:
> > + - Daniel Baluta <daniel.baluta@nxp.com>
> > +
> > +description: NXP imx95 CM7 core used for audio processing
> > +
> > +properties:
> > + compatible:
> > + const: fsl,imx95-cm7-sof
>
> Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
> add the -sof suffix instead of -audio or so? SOF is a software project
> but you can clearly run different software on the audio-copro as well.
Sure you can run a different software project on the audio DSP but
you will need a way to distinguish between the different projects.
There might be different mailbox, memory configurations. So you will need
to invent another suffix specific to the new project.
We can make const: fsl,imx95-cm7-audio as the one used with SOF
and think about a different name later for when another project will
want to use the DSP.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-12 10:11 ` Daniel Baluta
@ 2025-02-12 12:38 ` Mark Brown
2025-02-12 19:36 ` Laurentiu Mihalcea
0 siblings, 1 reply; 17+ messages in thread
From: Mark Brown @ 2025-02-12 12:38 UTC (permalink / raw)
To: Daniel Baluta
Cc: Marco Felsch, Laurentiu Mihalcea, Rob Herring,
Krzysztof Kozlowski, Shawn Guo, Kuninori Morimoto, Sascha Hauer,
devicetree, imx, linux-kernel, linux-sound,
Pengutronix Kernel Team, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]
On Wed, Feb 12, 2025 at 12:11:49PM +0200, Daniel Baluta wrote:
> On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
> > On 25-02-11, Laurentiu Mihalcea wrote:
> > > + const: fsl,imx95-cm7-sof
> > Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
> > add the -sof suffix instead of -audio or so? SOF is a software project
> > but you can clearly run different software on the audio-copro as well.
> Sure you can run a different software project on the audio DSP but
> you will need a way to distinguish between the different projects.
> There might be different mailbox, memory configurations. So you will need
> to invent another suffix specific to the new project.
> We can make const: fsl,imx95-cm7-audio as the one used with SOF
> and think about a different name later for when another project will
> want to use the DSP.
I think the point here was that the DT should stay the same even if the
DSP firwmare changes, just as how changing the main OS shouldn't affect
the DT.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-12 12:38 ` Mark Brown
@ 2025-02-12 19:36 ` Laurentiu Mihalcea
2025-02-13 6:47 ` Marco Felsch
0 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-12 19:36 UTC (permalink / raw)
To: Mark Brown, Daniel Baluta
Cc: Marco Felsch, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, devicetree, imx, linux-kernel,
linux-sound, Pengutronix Kernel Team, linux-arm-kernel
On 2/12/2025 2:38 PM, Mark Brown wrote:
> On Wed, Feb 12, 2025 at 12:11:49PM +0200, Daniel Baluta wrote:
>> On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
>>> On 25-02-11, Laurentiu Mihalcea wrote:
>>>> + const: fsl,imx95-cm7-sof
>>> Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
>>> add the -sof suffix instead of -audio or so? SOF is a software project
>>> but you can clearly run different software on the audio-copro as well.
>> Sure you can run a different software project on the audio DSP but
>> you will need a way to distinguish between the different projects.
>> There might be different mailbox, memory configurations. So you will need
>> to invent another suffix specific to the new project.
>> We can make const: fsl,imx95-cm7-audio as the one used with SOF
>> and think about a different name later for when another project will
>> want to use the DSP.
> I think the point here was that the DT should stay the same even if the
> DSP firwmare changes, just as how changing the main OS shouldn't affect
> the DT.
It's rather unfortunate but based on the experience from the 8 series
(imx8qm, imx8qxp, imx8mp), the programming model can differ quite
a bit (e.g: remoteproc vs SOF) even if the core is the same (i.e: DSP core).
The different programming models also required different DT configurations
(e.g: dif. mboxes as Daniel mentioned, some extra properties (i.e: reg-names), etc...)
The "-sof" suffix was chosen here instead of the more generic "-audio" (or whatever else
alternative) because the DT configuration is specific to SOF's programming model. Other
audio applications running on the same core may have dif. configurations (e.g: use
DTCM/ITCM for memory instead of DDR, dif. mbox count, etc...). I suppose this kind of thing
is bound to happen to some degree since the DT node doesn't just describe the CM7 core
(but, rather, it also encompasses information on the memory, mboxes, etc. used)
but perhaps I'm wrong?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-12 19:36 ` Laurentiu Mihalcea
@ 2025-02-13 6:47 ` Marco Felsch
2025-03-04 21:35 ` Laurentiu Mihalcea
0 siblings, 1 reply; 17+ messages in thread
From: Marco Felsch @ 2025-02-13 6:47 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Mark Brown, Daniel Baluta, Rob Herring, Krzysztof Kozlowski,
Shawn Guo, Kuninori Morimoto, Sascha Hauer, devicetree, imx,
linux-kernel, linux-sound, Pengutronix Kernel Team,
linux-arm-kernel
Hi Laurentiu, Daniel,
On 25-02-12, Laurentiu Mihalcea wrote:
>
> On 2/12/2025 2:38 PM, Mark Brown wrote:
> > On Wed, Feb 12, 2025 at 12:11:49PM +0200, Daniel Baluta wrote:
> >> On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
> >>> On 25-02-11, Laurentiu Mihalcea wrote:
> >>>> + const: fsl,imx95-cm7-sof
> >>> Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
> >>> add the -sof suffix instead of -audio or so? SOF is a software project
> >>> but you can clearly run different software on the audio-copro as well.
> >> Sure you can run a different software project on the audio DSP but
> >> you will need a way to distinguish between the different projects.
> >> There might be different mailbox, memory configurations. So you will need
> >> to invent another suffix specific to the new project.
> >> We can make const: fsl,imx95-cm7-audio as the one used with SOF
> >> and think about a different name later for when another project will
> >> want to use the DSP.
> > I think the point here was that the DT should stay the same even if the
> > DSP firwmare changes, just as how changing the main OS shouldn't affect
> > the DT.
>
> It's rather unfortunate but based on the experience from the 8 series
> (imx8qm, imx8qxp, imx8mp), the programming model can differ quite
> a bit (e.g: remoteproc vs SOF) even if the core is the same (i.e: DSP core).
>
> The different programming models also required different DT configurations
> (e.g: dif. mboxes as Daniel mentioned, some extra properties (i.e: reg-names), etc...)
>
> The "-sof" suffix was chosen here instead of the more generic "-audio" (or whatever else
> alternative) because the DT configuration is specific to SOF's programming model. Other
> audio applications running on the same core may have dif. configurations (e.g: use
> DTCM/ITCM for memory instead of DDR, dif. mbox count, etc...). I suppose this kind of thing
> is bound to happen to some degree since the DT node doesn't just describe the CM7 core
> (but, rather, it also encompasses information on the memory, mboxes, etc. used)
> but perhaps I'm wrong?
Time will tell if there will be any other user except for SOF for the
DSP but and this is what I wanted to point out: the DTS should abstract
the HW. IMHO The CM7-Audio node should contain all properties required
to turn power and reset the core (e.g. clocks, reset, pm-domains). I get
your point regarding different configs but please have a look at
mt8183-kukui.dtsi. Here the rpmsg config is a subnode of the actual
system-control-proc. This makes much more sense to me since the HW part
is part of the generic core-node and all the software config goes into a
separate subnode.
Regards,
Marco
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-02-13 6:47 ` Marco Felsch
@ 2025-03-04 21:35 ` Laurentiu Mihalcea
2025-03-07 17:53 ` Marco Felsch
0 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-03-04 21:35 UTC (permalink / raw)
To: Marco Felsch
Cc: Mark Brown, Daniel Baluta, Rob Herring, Krzysztof Kozlowski,
Shawn Guo, Kuninori Morimoto, Sascha Hauer, devicetree, imx,
linux-kernel, linux-sound, Pengutronix Kernel Team,
linux-arm-kernel
On 2/13/2025 8:47 AM, Marco Felsch wrote:
> Hi Laurentiu, Daniel,
>
> On 25-02-12, Laurentiu Mihalcea wrote:
>> On 2/12/2025 2:38 PM, Mark Brown wrote:
>>> On Wed, Feb 12, 2025 at 12:11:49PM +0200, Daniel Baluta wrote:
>>>> On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
>>>>> On 25-02-11, Laurentiu Mihalcea wrote:
>>>>>> + const: fsl,imx95-cm7-sof
>>>>> Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
>>>>> add the -sof suffix instead of -audio or so? SOF is a software project
>>>>> but you can clearly run different software on the audio-copro as well.
>>>> Sure you can run a different software project on the audio DSP but
>>>> you will need a way to distinguish between the different projects.
>>>> There might be different mailbox, memory configurations. So you will need
>>>> to invent another suffix specific to the new project.
>>>> We can make const: fsl,imx95-cm7-audio as the one used with SOF
>>>> and think about a different name later for when another project will
>>>> want to use the DSP.
>>> I think the point here was that the DT should stay the same even if the
>>> DSP firwmare changes, just as how changing the main OS shouldn't affect
>>> the DT.
>> It's rather unfortunate but based on the experience from the 8 series
>> (imx8qm, imx8qxp, imx8mp), the programming model can differ quite
>> a bit (e.g: remoteproc vs SOF) even if the core is the same (i.e: DSP core).
>>
>> The different programming models also required different DT configurations
>> (e.g: dif. mboxes as Daniel mentioned, some extra properties (i.e: reg-names), etc...)
>>
>> The "-sof" suffix was chosen here instead of the more generic "-audio" (or whatever else
>> alternative) because the DT configuration is specific to SOF's programming model. Other
>> audio applications running on the same core may have dif. configurations (e.g: use
>> DTCM/ITCM for memory instead of DDR, dif. mbox count, etc...). I suppose this kind of thing
>> is bound to happen to some degree since the DT node doesn't just describe the CM7 core
>> (but, rather, it also encompasses information on the memory, mboxes, etc. used)
>> but perhaps I'm wrong?
> Time will tell if there will be any other user except for SOF for the
> DSP but and this is what I wanted to point out: the DTS should abstract
> the HW. IMHO The CM7-Audio node should contain all properties required
> to turn power and reset the core (e.g. clocks, reset, pm-domains). I get
> your point regarding different configs but please have a look at
> mt8183-kukui.dtsi. Here the rpmsg config is a subnode of the actual
> system-control-proc. This makes much more sense to me since the HW part
> is part of the generic core-node and all the software config goes into a
> separate subnode.
>
> Regards,
> Marco
I understand your point but we're dealing with 2 different programming
models here: SOF and remoteproc as opposed to just remoteproc as it's
the case for Mediatek.
Going for a similar approach would also mean quite a bit of software
changes as we'd need to factor out the common bits (most importantly here:
core operations like start/stop) and placing them in a common driver. This is not
trivial and I'm not sure it's worth the effort right now given that:
1) The current way we model the hardware inside the DT is not exactly inaccurate.
The core does physically use those memory regions, mailboxes, etc.
2) Whatever we do, the information in the DT will still depend on the programming model.
It's just that you're placing it in a child node, instead of the parent, which is arguably not that
big of an improvement?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core
2025-03-04 21:35 ` Laurentiu Mihalcea
@ 2025-03-07 17:53 ` Marco Felsch
0 siblings, 0 replies; 17+ messages in thread
From: Marco Felsch @ 2025-03-07 17:53 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Mark Brown, Daniel Baluta, Rob Herring, Krzysztof Kozlowski,
Shawn Guo, Kuninori Morimoto, Sascha Hauer, devicetree, imx,
linux-kernel, linux-sound, Pengutronix Kernel Team,
linux-arm-kernel
On 25-03-04, Laurentiu Mihalcea wrote:
> On 2/13/2025 8:47 AM, Marco Felsch wrote:
> > Hi Laurentiu, Daniel,
> >
> > On 25-02-12, Laurentiu Mihalcea wrote:
> >> On 2/12/2025 2:38 PM, Mark Brown wrote:
> >>> On Wed, Feb 12, 2025 at 12:11:49PM +0200, Daniel Baluta wrote:
> >>>> On Wed, Feb 12, 2025 at 11:38 AM Marco Felsch <m.felsch@pengutronix.de> wrote:
> >>>>> On 25-02-11, Laurentiu Mihalcea wrote:
> >>>>>> + const: fsl,imx95-cm7-sof
> >>>>> Albeit Krzysztof already add his Reviewed-by, can I ask why we need to
> >>>>> add the -sof suffix instead of -audio or so? SOF is a software project
> >>>>> but you can clearly run different software on the audio-copro as well.
> >>>> Sure you can run a different software project on the audio DSP but
> >>>> you will need a way to distinguish between the different projects.
> >>>> There might be different mailbox, memory configurations. So you will need
> >>>> to invent another suffix specific to the new project.
> >>>> We can make const: fsl,imx95-cm7-audio as the one used with SOF
> >>>> and think about a different name later for when another project will
> >>>> want to use the DSP.
> >>> I think the point here was that the DT should stay the same even if the
> >>> DSP firwmare changes, just as how changing the main OS shouldn't affect
> >>> the DT.
> >> It's rather unfortunate but based on the experience from the 8 series
> >> (imx8qm, imx8qxp, imx8mp), the programming model can differ quite
> >> a bit (e.g: remoteproc vs SOF) even if the core is the same (i.e: DSP core).
> >>
> >> The different programming models also required different DT configurations
> >> (e.g: dif. mboxes as Daniel mentioned, some extra properties (i.e: reg-names), etc...)
> >>
> >> The "-sof" suffix was chosen here instead of the more generic "-audio" (or whatever else
> >> alternative) because the DT configuration is specific to SOF's programming model. Other
> >> audio applications running on the same core may have dif. configurations (e.g: use
> >> DTCM/ITCM for memory instead of DDR, dif. mbox count, etc...). I suppose this kind of thing
> >> is bound to happen to some degree since the DT node doesn't just describe the CM7 core
> >> (but, rather, it also encompasses information on the memory, mboxes, etc. used)
> >> but perhaps I'm wrong?
> > Time will tell if there will be any other user except for SOF for the
> > DSP but and this is what I wanted to point out: the DTS should abstract
> > the HW. IMHO The CM7-Audio node should contain all properties required
> > to turn power and reset the core (e.g. clocks, reset, pm-domains). I get
> > your point regarding different configs but please have a look at
> > mt8183-kukui.dtsi. Here the rpmsg config is a subnode of the actual
> > system-control-proc. This makes much more sense to me since the HW part
> > is part of the generic core-node and all the software config goes into a
> > separate subnode.
> >
> > Regards,
> > Marco
>
> I understand your point but we're dealing with 2 different programming
> models here: SOF and remoteproc as opposed to just remoteproc as it's
> the case for Mediatek.
The idea is exactly to decouple the CM7 HW config from the
software/firmware running on it and this is what MediaTek did.
Of course they are only interested in teh RPMsg part but this approach
could be used to decouple the HW and the FW part which is your use-case
(different FWs running on the CM7).
> Going for a similar approach would also mean quite a bit of software
> changes as we'd need to factor out the common bits (most importantly here:
> core operations like start/stop) and placing them in a common driver.
Exactly but shouldn't be to hard to implement. Of course it is more work
than just adapting the compatible.
> This is not trivial and I'm not sure it's worth the effort right now
> given that:
>
> 1) The current way we model the hardware inside the DT is not exactly inaccurate.
> The core does physically use those memory regions, mailboxes, etc.
>
> 2) Whatever we do, the information in the DT will still depend on the programming model.
> It's just that you're placing it in a child node, instead of the parent, which is arguably not that
> big of an improvement?
The benefit is to have different configs in place and a board can choose
between them, e.g.:
sof_cpu: cm7-cpu@80000000 {
compatible = "fsl,imx95-cm7";
reg = <0x0 0x80000000 0x0 0x6100000>;
reg-names = "sram";
clocks = <...>;
resets = <...>;
access-controllers = <...>;
firmware-name = "nxp/foo";
firmware-config = <&cm7_sof>;
cm7_sof: cm7-sof {
compatible = "fsl,imx95-sof";
memory-region = <&adma_res>;
memory-region-names = "dma";
mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>;
mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
cpu: port {
cpu_ep: endpoint {
remote-endpoint = <&codec_ep>;
};
};
};
cm7_rpmsg: cm7-rpmsg {
compatible = "fsl,imx95-rpmsg";
};
cm7_foo: cm7-foo {
compatible = "fsl,imx95-foo";
};
};
I get your point and I'm not against your patchset. Just IMHO the above
example would make more sense to me since the CM7 hardware handling
(en-/disable/access/reset/clock) can be done by a common driver and must
not be done by each subsystem driver: sof, rpmsg, etc. Also the since
the driver would be common it could be reused by other CoProcessors
within the system as well since there are now more and more CoProcessors
on a SoC.
Regards,
Marco
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 2/3] ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios support
2025-02-11 22:58 [PATCH v4 0/3] add sof support on imx95 Laurentiu Mihalcea
2025-02-11 22:58 ` [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core Laurentiu Mihalcea
@ 2025-02-11 22:58 ` Laurentiu Mihalcea
2025-02-11 22:58 ` [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof Laurentiu Mihalcea
2025-02-12 11:38 ` [PATCH v4 0/3] add sof support on imx95 Iuliana Prodan
3 siblings, 0 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-11 22:58 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer
Cc: Pengutronix Kernel Team, linux-sound, devicetree, imx,
linux-kernel, linux-arm-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Introduce the 'widgets' property, allowing the creation of widgets from
4 template widgets: Microphone, Line, Headphone, and Speaker. Also
introduce the 'hp-det-gpios' property, which allows using headphone
detection using the specified GPIO.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../devicetree/bindings/sound/audio-graph-card2.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
index f943f90d8b15..94588353f852 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
@@ -37,6 +37,10 @@ properties:
codec2codec:
type: object
description: Codec to Codec node
+ hp-det-gpios:
+ $ref: audio-graph.yaml#/properties/hp-det-gpios
+ widgets:
+ $ref: audio-graph.yaml#/properties/widgets
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof
2025-02-11 22:58 [PATCH v4 0/3] add sof support on imx95 Laurentiu Mihalcea
2025-02-11 22:58 ` [PATCH v4 1/3] ASoC: dt-bindings: support imx95's CM7 core Laurentiu Mihalcea
2025-02-11 22:58 ` [PATCH v4 2/3] ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios support Laurentiu Mihalcea
@ 2025-02-11 22:58 ` Laurentiu Mihalcea
2025-02-11 23:23 ` Frank Li
2025-02-12 11:38 ` [PATCH v4 0/3] add sof support on imx95 Iuliana Prodan
3 siblings, 1 reply; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-02-11 22:58 UTC (permalink / raw)
To: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer
Cc: Pengutronix Kernel Team, linux-sound, devicetree, imx,
linux-kernel, linux-arm-kernel
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add imx95 DTS for SOF usage.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
arch/arm64/boot/dts/freescale/Makefile | 1 +
.../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
2 files changed, 86 insertions(+)
create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 839432153cc7..27f64e333e4b 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -282,6 +282,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb
dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb
imx8mm-kontron-dl-dtbs := imx8mm-kontron-bl.dtb imx8mm-kontron-dl.dtbo
diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
new file mode 100644
index 000000000000..ce7b2384e459
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 NXP
+ */
+
+/dts-v1/;
+
+#include "imx95-19x19-evk.dts"
+
+/ {
+ sof_cpu: cm7-cpu@80000000 {
+ compatible = "fsl,imx95-cm7-sof";
+ reg = <0x0 0x80000000 0x0 0x6100000>;
+ reg-names = "sram";
+ memory-region = <&adma_res>;
+ memory-region-names = "dma";
+ mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>;
+ mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
+
+ cpu: port {
+ cpu_ep: endpoint {
+ remote-endpoint = <&codec_ep>;
+ };
+ };
+ };
+
+ reserved-memory {
+ adma_res: memory@86100000 {
+ compatible = "shared-dma-pool";
+ reg = <0x0 0x86100000 0x0 0x100000>;
+ no-map;
+ };
+ };
+
+ sof-sound-wm8962 {
+ compatible = "audio-graph-card2";
+ links = <&cpu>;
+ label = "wm8962-audio";
+ hp-det-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hp>;
+ widgets =
+ "Headphone", "Headphones",
+ "Microphone", "Headset Mic";
+ routing =
+ "Headphones", "HPOUTL",
+ "Headphones", "HPOUTR",
+ "Headset Mic", "MICBIAS",
+ "IN3R", "Headset Mic",
+ "IN1R", "Headset Mic";
+ };
+
+ sound-wm8962 {
+ status = "disabled";
+ };
+
+};
+
+&edma2 {
+ dma-channel-mask = <0xc0000000>, <0x0>;
+};
+
+&sai3 {
+ status = "disabled";
+};
+
+&wm8962 {
+ assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
+ <&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
+ <&scmi_clk IMX95_CLK_AUDIOPLL1>,
+ <&scmi_clk IMX95_CLK_AUDIOPLL2>,
+ <&scmi_clk IMX95_CLK_SAI3>;
+ assigned-clock-parents = <0>, <0>, <0>, <0>, <&scmi_clk IMX95_CLK_AUDIOPLL1>;
+ assigned-clock-rates = <3932160000>, <3612672000>,
+ <393216000>, <361267200>,
+ <12288000>;
+
+ port {
+ codec_ep: endpoint {
+ bitclock-master;
+ frame-master;
+ remote-endpoint = <&cpu_ep>;
+ };
+ };
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof
2025-02-11 22:58 ` [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof Laurentiu Mihalcea
@ 2025-02-11 23:23 ` Frank Li
2025-02-24 19:17 ` Mihalcea Laurentiu
0 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2025-02-11 23:23 UTC (permalink / raw)
To: Laurentiu Mihalcea
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, Pengutronix Kernel Team,
linux-sound, devicetree, imx, linux-kernel, linux-arm-kernel
On Tue, Feb 11, 2025 at 05:58:08PM -0500, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Add imx95 DTS for SOF usage.
>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/Makefile | 1 +
> .../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
> 2 files changed, 86 insertions(+)
> create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
>
> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> index 839432153cc7..27f64e333e4b 100644
> --- a/arch/arm64/boot/dts/freescale/Makefile
> +++ b/arch/arm64/boot/dts/freescale/Makefile
> @@ -282,6 +282,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
> dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
> dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb
> dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb
> +dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb
look like should use dt overlay ?
>
> imx8mm-kontron-dl-dtbs := imx8mm-kontron-bl.dtb imx8mm-kontron-dl.dtbo
>
> diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
> new file mode 100644
> index 000000000000..ce7b2384e459
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
> @@ -0,0 +1,85 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright 2025 NXP
> + */
> +
> +/dts-v1/;
> +
> +#include "imx95-19x19-evk.dts"
> +
> +/ {
> + sof_cpu: cm7-cpu@80000000 {
> + compatible = "fsl,imx95-cm7-sof";
> + reg = <0x0 0x80000000 0x0 0x6100000>;
> + reg-names = "sram";
> + memory-region = <&adma_res>;
> + memory-region-names = "dma";
> + mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>;
> + mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1";
> +
> + cpu: port {
> + cpu_ep: endpoint {
> + remote-endpoint = <&codec_ep>;
> + };
> + };
> + };
> +
> + reserved-memory {
> + adma_res: memory@86100000 {
> + compatible = "shared-dma-pool";
> + reg = <0x0 0x86100000 0x0 0x100000>;
> + no-map;
> + };
> + };
> +
> + sof-sound-wm8962 {
> + compatible = "audio-graph-card2";
> + links = <&cpu>;
> + label = "wm8962-audio";
> + hp-det-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_hp>;
> + widgets =
> + "Headphone", "Headphones",
> + "Microphone", "Headset Mic";
Generally, align to =
widgets = "Headphone", "Headphones",
"Microphone", "Headset Mic";
> + routing =
> + "Headphones", "HPOUTL",
> + "Headphones", "HPOUTR",
> + "Headset Mic", "MICBIAS",
> + "IN3R", "Headset Mic",
> + "IN1R", "Headset Mic";
> + };
> +
> + sound-wm8962 {
> + status = "disabled";
> + };
> +
> +};
> +
> +&edma2 {
> + dma-channel-mask = <0xc0000000>, <0x0>;
> +};
Not sure why need mask edma2's some channel, can you add comments for it
Frank
> +
> +&sai3 {
> + status = "disabled";
> +};
> +
> +&wm8962 {
> + assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>,
> + <&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>,
> + <&scmi_clk IMX95_CLK_AUDIOPLL1>,
> + <&scmi_clk IMX95_CLK_AUDIOPLL2>,
> + <&scmi_clk IMX95_CLK_SAI3>;
> + assigned-clock-parents = <0>, <0>, <0>, <0>, <&scmi_clk IMX95_CLK_AUDIOPLL1>;
> + assigned-clock-rates = <3932160000>, <3612672000>,
> + <393216000>, <361267200>,
> + <12288000>;
> +
> + port {
> + codec_ep: endpoint {
> + bitclock-master;
> + frame-master;
> + remote-endpoint = <&cpu_ep>;
> + };
> + };
> +};
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof
2025-02-11 23:23 ` Frank Li
@ 2025-02-24 19:17 ` Mihalcea Laurentiu
2025-02-24 19:51 ` Frank Li
0 siblings, 1 reply; 17+ messages in thread
From: Mihalcea Laurentiu @ 2025-02-24 19:17 UTC (permalink / raw)
To: Frank Li
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, Pengutronix Kernel Team,
linux-sound, devicetree, imx, linux-kernel, linux-arm-kernel
On 12.02.2025 01:23, Frank Li wrote:
> On Tue, Feb 11, 2025 at 05:58:08PM -0500, Laurentiu Mihalcea wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> Add imx95 DTS for SOF usage.
>>
>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>> ---
>> arch/arm64/boot/dts/freescale/Makefile | 1 +
>> .../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
>> 2 files changed, 86 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
>>
>> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
>> index 839432153cc7..27f64e333e4b 100644
>> --- a/arch/arm64/boot/dts/freescale/Makefile
>> +++ b/arch/arm64/boot/dts/freescale/Makefile
>> @@ -282,6 +282,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
>> dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
>> dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb
>> dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb
>> +dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb
> look like should use dt overlay ?
can you pls explain why you'd see this as an overlay?
(snip)
>> +
>> + sof-sound-wm8962 {
>> + compatible = "audio-graph-card2";
>> + links = <&cpu>;
>> + label = "wm8962-audio";
>> + hp-det-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_hp>;
>> + widgets =
>> + "Headphone", "Headphones",
>> + "Microphone", "Headset Mic";
> Generally, align to =
> widgets = "Headphone", "Headphones",
> "Microphone", "Headset Mic";
sure
>> + routing =
>> + "Headphones", "HPOUTL",
>> + "Headphones", "HPOUTR",
>> + "Headset Mic", "MICBIAS",
>> + "IN3R", "Headset Mic",
>> + "IN1R", "Headset Mic";
>> + };
>> +
>> + sound-wm8962 {
>> + status = "disabled";
>> + };
>> +
>> +};
>> +
>> +&edma2 {
>> + dma-channel-mask = <0xc0000000>, <0x0>;
>> +};
> Not sure why need mask edma2's some channel, can you add comments for it
>
> Frank
sure, can add comment in commit msg
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof
2025-02-24 19:17 ` Mihalcea Laurentiu
@ 2025-02-24 19:51 ` Frank Li
2025-03-04 18:38 ` Laurentiu Mihalcea
0 siblings, 1 reply; 17+ messages in thread
From: Frank Li @ 2025-02-24 19:51 UTC (permalink / raw)
To: Mihalcea Laurentiu
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, Pengutronix Kernel Team,
linux-sound, devicetree, imx, linux-kernel, linux-arm-kernel
On Mon, Feb 24, 2025 at 09:17:03PM +0200, Mihalcea Laurentiu wrote:
>
> On 12.02.2025 01:23, Frank Li wrote:
> > On Tue, Feb 11, 2025 at 05:58:08PM -0500, Laurentiu Mihalcea wrote:
> >> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> >>
> >> Add imx95 DTS for SOF usage.
> >>
> >> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> >> ---
> >> arch/arm64/boot/dts/freescale/Makefile | 1 +
> >> .../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
> >> 2 files changed, 86 insertions(+)
> >> create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
> >>
> >> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> >> index 839432153cc7..27f64e333e4b 100644
> >> --- a/arch/arm64/boot/dts/freescale/Makefile
> >> +++ b/arch/arm64/boot/dts/freescale/Makefile
> >> @@ -282,6 +282,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
> >> dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
> >> dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb
> >> dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb
> >> +dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb
> > look like should use dt overlay ?
>
>
> can you pls explain why you'd see this as an overlay?
It is addtional option, which base on imx95-19x19-evk.dtb. Default wm8962
is used for built-in dai, this provide option to move it dsp.
Ideally this option should work for all boards, which use wm8962.
We try to move MxN problem to M + N. otherwise, there are huge numbers of
dtb files.
Frank
>
> (snip)
>
> >> +
> >> + sof-sound-wm8962 {
> >> + compatible = "audio-graph-card2";
> >> + links = <&cpu>;
> >> + label = "wm8962-audio";
> >> + hp-det-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
> >> + pinctrl-names = "default";
> >> + pinctrl-0 = <&pinctrl_hp>;
> >> + widgets =
> >> + "Headphone", "Headphones",
> >> + "Microphone", "Headset Mic";
> > Generally, align to =
> > widgets = "Headphone", "Headphones",
> > "Microphone", "Headset Mic";
>
>
> sure
>
>
> >> + routing =
> >> + "Headphones", "HPOUTL",
> >> + "Headphones", "HPOUTR",
> >> + "Headset Mic", "MICBIAS",
> >> + "IN3R", "Headset Mic",
> >> + "IN1R", "Headset Mic";
> >> + };
> >> +
> >> + sound-wm8962 {
> >> + status = "disabled";
> >> + };
> >> +
> >> +};
> >> +
> >> +&edma2 {
> >> + dma-channel-mask = <0xc0000000>, <0x0>;
> >> +};
> > Not sure why need mask edma2's some channel, can you add comments for it
> >
> > Frank
>
>
> sure, can add comment in commit msg
>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof
2025-02-24 19:51 ` Frank Li
@ 2025-03-04 18:38 ` Laurentiu Mihalcea
0 siblings, 0 replies; 17+ messages in thread
From: Laurentiu Mihalcea @ 2025-03-04 18:38 UTC (permalink / raw)
To: Frank Li
Cc: Mark Brown, Rob Herring, Krzysztof Kozlowski, Shawn Guo,
Kuninori Morimoto, Sascha Hauer, Pengutronix Kernel Team,
linux-sound, devicetree, imx, linux-kernel, linux-arm-kernel
On 2/24/2025 9:51 PM, Frank Li wrote:
> On Mon, Feb 24, 2025 at 09:17:03PM +0200, Mihalcea Laurentiu wrote:
>> On 12.02.2025 01:23, Frank Li wrote:
>>> On Tue, Feb 11, 2025 at 05:58:08PM -0500, Laurentiu Mihalcea wrote:
>>>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>>>
>>>> Add imx95 DTS for SOF usage.
>>>>
>>>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>>> ---
>>>> arch/arm64/boot/dts/freescale/Makefile | 1 +
>>>> .../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
>>>> 2 files changed, 86 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
>>>>
>>>> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
>>>> index 839432153cc7..27f64e333e4b 100644
>>>> --- a/arch/arm64/boot/dts/freescale/Makefile
>>>> +++ b/arch/arm64/boot/dts/freescale/Makefile
>>>> @@ -282,6 +282,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
>>>> dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
>>>> dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb
>>>> dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb
>>>> +dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb
>>> look like should use dt overlay ?
>>
>> can you pls explain why you'd see this as an overlay?
> It is addtional option, which base on imx95-19x19-evk.dtb. Default wm8962
> is used for built-in dai, this provide option to move it dsp.
>
> Ideally this option should work for all boards, which use wm8962.
>
> We try to move MxN problem to M + N. otherwise, there are huge numbers of
> dtb files.
>
> Frank
Yeah but these are not cameras/sensors (for which there's a lot of possible combinations)
we're dealing with. Unless your board has the same codec, same GPIO for headphone
detection, and uses the same SAI instance this overlay will not work. For instance,
this wouldn't work for the imx95 15x15 EVK board as that uses a different GPIO for
headphone detection. As such, you'll most likely end up with a different DT overlay for
each board instead of a DTB.
Also, from the experience with the IMX8 series, we really don't have many DTBs. Usually,
it's been 1 for the base board and 1 for the audio board if applicable (which can probably
be turned into DT overlays. It would certainly make more sense this way).
Given all this, I'm still not convinced that DT overlays are the way to go.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/3] add sof support on imx95
2025-02-11 22:58 [PATCH v4 0/3] add sof support on imx95 Laurentiu Mihalcea
` (2 preceding siblings ...)
2025-02-11 22:58 ` [PATCH v4 3/3] arm64: dts: imx: add imx95 dts for sof Laurentiu Mihalcea
@ 2025-02-12 11:38 ` Iuliana Prodan
3 siblings, 0 replies; 17+ messages in thread
From: Iuliana Prodan @ 2025-02-12 11:38 UTC (permalink / raw)
To: Laurentiu Mihalcea, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Shawn Guo, Kuninori Morimoto, Sascha Hauer
Cc: Pengutronix Kernel Team, linux-sound, devicetree, imx,
linux-kernel, linux-arm-kernel
On 2/12/2025 12:58 AM, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>
> Add sof support on imx95. This series also includes some changes to
> the audio-graph-card2 binding required for the support.
For the series:
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Thanks,
Iulia
> ---
> Changes in v4:
> - addressed Frank's comments regarding the DTS.
> - squashed commits for common and imx95 bindings.
> - dropped patch introducing driver. This was already handled via
> https://lore.kernel.org/all/20250207162246.3104-1-laurentiumihalcea111@gmail.com/
> - introduced two new properties: 'reg-names' and 'memory-region-names',
> which are now needed by the driver to work properly. Because of this, 'reg'
> and 'memory-region' properties had to be moved from the common binding as
> 'reg-names' and 'memory-region-names' depend on them (you'd get a failure
> when running the binding check otherwise).
> - added missing 'bitclock-master' and 'frame-master' properties to codec EP.
> - addressed Krzysztof's comments regarding the imx95 binding
> - added Krzysztof's Acked-by
> - Link to v3: https://lore.kernel.org/lkml/20241216145039.3074-1-laurentiumihalcea111@gmail.com/
>
> Changes in v3:
> - Ordered DT nodes alphabetically
> - Removed 'cpu' and 'cpu_ep' labels from binding example
> - Some small changes to the binding commit messages/titles.
> - Link to v2: https://lore.kernel.org/lkml/20241113195240.3699-1-laurentiumihalcea111@gmail.com/
>
> Changes in v2:
> - Added new binding for 95's CM7 core with SOF. fsl,dsp.yaml is no longer used.
> - "hp-det-gpios" and "widgets" properties now reference the definitions from audio-graph.yaml
> - Removed extra empty spaces from DTS as suggested by Frank
> - Ordered 'edma2', 'sai3', 'wm8962' DT nodes alphabetically. The order of the nodes
> placed inside / is kept the same for readability
> - Ordered driver header files includes alphabetically as suggested by Frank
> - Removed "reg-names" and changed the maximum size of the "reg" property to 1 to align
> with the other NXP CPUs sharing the same programming model (i.e: audio processing with SOF).
> The region described in the DTS is the SRAM and the mailbox region is now hardcoded in the
> driver as an offset to the start of the SRAM region.
> - Added new binding with properties required by all NXP CPUs sharing the same programming
> model (i.e: audio processing with SOF).
> - Various driver adjustments made to accomodate the DT changes + some bug fixing related
> to the mboxes not being requested/free'd on resume/suspend.
> - Fixed value passed to "dma-channel-mask". A set bit means the channel is masked, not the
> other way around.
> - Link to v1: https://lore.kernel.org/lkml/20241023162114.3354-1-laurentiumihalcea111@gmail.com/
> ---
>
> Laurentiu Mihalcea (3):
> ASoC: dt-bindings: support imx95's CM7 core
> ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios
> support
> arm64: dts: imx: add imx95 dts for sof
>
> .../bindings/sound/audio-graph-card2.yaml | 4 +
> .../bindings/sound/fsl,imx95-cm7-sof.yaml | 64 ++++++++++++++
> .../bindings/sound/fsl,sof-cpu.yaml | 27 ++++++
> arch/arm64/boot/dts/freescale/Makefile | 1 +
> .../dts/freescale/imx95-19x19-evk-sof.dts | 85 +++++++++++++++++++
> 5 files changed, 181 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx95-cm7-sof.yaml
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,sof-cpu.yaml
> create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts
>
^ permalink raw reply [flat|nested] 17+ messages in thread