* [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif
@ 2024-08-27 18:05 Lukasz Majewski
2024-08-28 6:18 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2024-08-27 18:05 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Liam Girdwood, Mark Brown
Cc: Fabio Estevam, Conor Dooley, devicetree, linux-sound,
linux-kernel, Lukasz Majewski
This file allows correct check of DTS node for imx287 based
"fsl,imx28-saif" compatible device.
It corresponds to Documentation/devicetree/bindings/fsl,imx28-saif
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
.../devicetree/bindings/sound/fsl,saif.yaml | 79 +++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,saif.yaml
diff --git a/Documentation/devicetree/bindings/sound/fsl,saif.yaml b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
new file mode 100644
index 000000000000..747faa411a50
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,saif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MXS Serial Audio Interface (SAIF)
+
+maintainers:
+ - Lukasz Majewski <lukma@denx.de>
+
+description: |
+ The SAIF is based on I2S module that is used to communicate with audio codecs,
+ but only with half-duplex manner (i.e. it can either transmit or receive PCM
+ audio).
+
+properties:
+ compatible:
+ const: fsl,imx28-saif
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ assigned-clock-parents: true
+ assigned-clock-rates: true
+ assigned-clocks: true
+
+ interrupts:
+ maxItems: 1
+
+ dmas:
+ maxItems: 1
+
+ dma-names:
+ const: rx-tx
+
+ clocks:
+ maxItems: 1
+
+ fsl,saif-master:
+ description: Indicate that saif is a slave and its phandle points to master
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - dmas
+ - dma-names
+ - "#sound-dai-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ saif0: saif@80042000 {
+ #sound-dai-cells = <0>;
+ compatible = "fsl,imx28-saif";
+ reg = <0x80042000 2000>;
+ interrupts = <59>;
+ clocks = <&clks 53>;
+ dmas = <&dma_apbx 4>;
+ dma-names = "rx-tx";
+ };
+ - |
+ saif1: saif@80046000 {
+ #sound-dai-cells = <0>;
+ compatible = "fsl,imx28-saif";
+ reg = <0x80046000 2000>;
+ interrupts = <58>;
+ clocks = <&clks 53>;
+ dmas = <&dma_apbx 5>;
+ dma-names = "rx-tx";
+ fsl,saif-master = <&saif0>;
+ };
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif
2024-08-27 18:05 [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif Lukasz Majewski
@ 2024-08-28 6:18 ` Krzysztof Kozlowski
2024-08-28 8:01 ` Lukasz Majewski
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-28 6:18 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Rob Herring, Krzysztof Kozlowski, Liam Girdwood, Mark Brown,
Fabio Estevam, Conor Dooley, devicetree, linux-sound,
linux-kernel
On Tue, Aug 27, 2024 at 08:05:28PM +0200, Lukasz Majewski wrote:
> This file allows correct check of DTS node for imx287 based
> "fsl,imx28-saif" compatible device.
>
> It corresponds to Documentation/devicetree/bindings/fsl,imx28-saif
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
> .../devicetree/bindings/sound/fsl,saif.yaml | 79 +++++++++++++++++++
> 1 file changed, 79 insertions(+)
There is a binding. Please perform conversion from TXT to DT schema,
mentioning in commit msg any changes from pure conversion (e.g. new
properties to match DTS).
Few more comments below.
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,saif.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/fsl,saif.yaml b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
> new file mode 100644
> index 000000000000..747faa411a50
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/fsl,saif.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale MXS Serial Audio Interface (SAIF)
> +
> +maintainers:
> + - Lukasz Majewski <lukma@denx.de>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The SAIF is based on I2S module that is used to communicate with audio codecs,
> + but only with half-duplex manner (i.e. it can either transmit or receive PCM
> + audio).
> +
> +properties:
> + compatible:
> + const: fsl,imx28-saif
> +
> + reg:
> + maxItems: 1
> +
> + "#sound-dai-cells":
> + const: 0
> +
> + assigned-clock-parents: true
> + assigned-clock-rates: true
> + assigned-clocks: true
These three should be dropped, redundant.
> +
> + interrupts:
> + maxItems: 1
> +
> + dmas:
> + maxItems: 1
> +
> + dma-names:
> + const: rx-tx
> +
> + clocks:
> + maxItems: 1
> +
> + fsl,saif-master:
> + description: Indicate that saif is a slave and its phandle points to master
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - dmas
> + - dma-names
> + - "#sound-dai-cells"
Keep the same order as in "properties:" block.
and here allOf: with $ref to dai-common.yaml
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + saif0: saif@80042000 {
> + #sound-dai-cells = <0>;
> + compatible = "fsl,imx28-saif";
> + reg = <0x80042000 2000>;
> + interrupts = <59>;
> + clocks = <&clks 53>;
> + dmas = <&dma_apbx 4>;
> + dma-names = "rx-tx";
> + };
> + - |
> + saif1: saif@80046000 {
Just one example, could be this one as more complete.
> + #sound-dai-cells = <0>;
Keep it after "reg" (compatible and reg are always first).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif
2024-08-28 6:18 ` Krzysztof Kozlowski
@ 2024-08-28 8:01 ` Lukasz Majewski
2024-08-28 8:11 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2024-08-28 8:01 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Liam Girdwood, Mark Brown,
Fabio Estevam, Conor Dooley, devicetree, linux-sound,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3952 bytes --]
Hi Krzysztof,
> On Tue, Aug 27, 2024 at 08:05:28PM +0200, Lukasz Majewski wrote:
> > This file allows correct check of DTS node for imx287 based
> > "fsl,imx28-saif" compatible device.
> >
> > It corresponds to Documentation/devicetree/bindings/fsl,imx28-saif
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> > .../devicetree/bindings/sound/fsl,saif.yaml | 79
> > +++++++++++++++++++ 1 file changed, 79 insertions(+)
>
> There is a binding. Please perform conversion from TXT to DT schema,
> mentioning in commit msg any changes from pure conversion (e.g. new
> properties to match DTS).
Hmm.... OK.
>
> Few more comments below.
>
> > create mode 100644
> > Documentation/devicetree/bindings/sound/fsl,saif.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,saif.yaml
> > b/Documentation/devicetree/bindings/sound/fsl,saif.yaml new file
> > mode 100644 index 000000000000..747faa411a50
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/fsl,saif.yaml
> > @@ -0,0 +1,79 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/fsl,saif.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale MXS Serial Audio Interface (SAIF)
> > +
> > +maintainers:
> > + - Lukasz Majewski <lukma@denx.de>
> > +
> > +description: |
>
> Do not need '|' unless you need to preserve formatting.
Ok.
>
> > + The SAIF is based on I2S module that is used to communicate with
> > audio codecs,
> > + but only with half-duplex manner (i.e. it can either transmit or
> > receive PCM
> > + audio).
> > +
> > +properties:
> > + compatible:
> > + const: fsl,imx28-saif
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#sound-dai-cells":
> > + const: 0
> > +
> > + assigned-clock-parents: true
> > + assigned-clock-rates: true
> > + assigned-clocks: true
>
> These three should be dropped, redundant.
Last two are present in definition of saif[01] in imx28.dtsi - so IMHO
it shall be added.
Moreover, those are present in fsl,sg5000.yaml dt-schema description.
>
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + dmas:
> > + maxItems: 1
> > +
> > + dma-names:
> > + const: rx-tx
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + fsl,saif-master:
> > + description: Indicate that saif is a slave and its phandle
> > points to master
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - dmas
> > + - dma-names
> > + - "#sound-dai-cells"
>
> Keep the same order as in "properties:" block.
Ok.
>
> and here allOf: with $ref to dai-common.yaml
Ok.
>
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + saif0: saif@80042000 {
> > + #sound-dai-cells = <0>;
> > + compatible = "fsl,imx28-saif";
> > + reg = <0x80042000 2000>;
> > + interrupts = <59>;
> > + clocks = <&clks 53>;
> > + dmas = <&dma_apbx 4>;
> > + dma-names = "rx-tx";
> > + };
> > + - |
> > + saif1: saif@80046000 {
>
> Just one example, could be this one as more complete.
This is important, as saif1 has "fsl,saif-master" which allows to have
full duplex PCM communication (by default on imx28 single saif is
half-duplex).
>
> > + #sound-dai-cells = <0>;
>
> Keep it after "reg" (compatible and reg are always first).
Ok.
>
> Best regards,
> Krzysztof
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif
2024-08-28 8:01 ` Lukasz Majewski
@ 2024-08-28 8:11 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-28 8:11 UTC (permalink / raw)
To: Lukasz Majewski
Cc: Rob Herring, Krzysztof Kozlowski, Liam Girdwood, Mark Brown,
Fabio Estevam, Conor Dooley, devicetree, linux-sound,
linux-kernel
On 28/08/2024 10:01, Lukasz Majewski wrote:
>>> +properties:
>>> + compatible:
>>> + const: fsl,imx28-saif
>>> +
>>> + reg:
>>> + maxItems: 1
>>> +
>>> + "#sound-dai-cells":
>>> + const: 0
>>> +
>>> + assigned-clock-parents: true
>>> + assigned-clock-rates: true
>>> + assigned-clocks: true
>>
>> These three should be dropped, redundant.
>
> Last two are present in definition of saif[01] in imx28.dtsi - so IMHO
> it shall be added.
But they are already accepted. Why they need to be mentioned twice?
>
> Moreover, those are present in fsl,sg5000.yaml dt-schema description.
>
There is no such file.
>>
>>> +
>>> +unevaluatedProperties: false
>>> +
>>> +examples:
>>> + - |
>>> + saif0: saif@80042000 {
>>> + #sound-dai-cells = <0>;
>>> + compatible = "fsl,imx28-saif";
>>> + reg = <0x80042000 2000>;
>>> + interrupts = <59>;
>>> + clocks = <&clks 53>;
>>> + dmas = <&dma_apbx 4>;
>>> + dma-names = "rx-tx";
>>> + };
>>> + - |
>>> + saif1: saif@80046000 {
>>
>> Just one example, could be this one as more complete.
>
> This is important, as saif1 has "fsl,saif-master" which allows to have
> full duplex PCM communication (by default on imx28 single saif is
> half-duplex).
>
So keep saif1.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-28 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 18:05 [PATCH] ASoC: dt-bindings: Add dt bindings definition file for imx28 saif Lukasz Majewski
2024-08-28 6:18 ` Krzysztof Kozlowski
2024-08-28 8:01 ` Lukasz Majewski
2024-08-28 8:11 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).