public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4] ASoC: dt-bindings: Convert mxs-saif.txt to fsl,imx28-saif.yaml (imx28 saif)
@ 2024-08-29 10:26 Lukasz Majewski
  2024-08-29 16:13 ` Conor Dooley
  0 siblings, 1 reply; 2+ messages in thread
From: Lukasz Majewski @ 2024-08-29 10:26 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, linux-sound
  Cc: Pengutronix Kernel Team, Fabio Estevam, devicetree, imx,
	linux-arm-kernel, linux-kernel, Liam Girdwood, Mark Brown,
	Lukasz Majewski

The 'fsl,imx28-saif' compatible has already the mxs-saif.txt description.
This patch converts (and removes it) this file to fsl,imx28-saif.yaml.

Changes for the mxs-saif.txt:
- Adds 'clocks', '#clock-cells' and '#sound-dai-cells' properties
- Provide device description

Signed-off-by: Lukasz Majewski <lukma@denx.de>

---
Changes for v4:
- Change file name to match compatible (fsl,imx28-saif.yaml)
- Remove 'saif0' and 'saif1' labels as those are not needed in the
  example node

Changes for v3:
- Add #clock-cells property

Changes for v2:
- Remove mxs-saif.txt
- Add description with information about extensions required for this
  device's current DTS description
---
 .../bindings/sound/fsl,imx28-saif.yaml        | 82 +++++++++++++++++++
 .../devicetree/bindings/sound/mxs-saif.txt    | 41 ----------
 2 files changed, 82 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx28-saif.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/mxs-saif.txt

diff --git a/Documentation/devicetree/bindings/sound/fsl,imx28-saif.yaml b/Documentation/devicetree/bindings/sound/fsl,imx28-saif.yaml
new file mode 100644
index 000000000000..b2c73a9b7a55
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,imx28-saif.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,imx28-saif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MXS Serial Audio Interface (SAIF)
+
+maintainers:
+  - Lukasz Majewski <lukma@denx.de>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+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
+
+  interrupts:
+    maxItems: 1
+
+  dmas:
+    maxItems: 1
+
+  dma-names:
+    const: rx-tx
+
+  "#clock-cells":
+    description: Configure the I2S device as MCLK clock provider.
+    const: 0
+
+  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
+  - "#sound-dai-cells"
+  - interrupts
+  - dmas
+  - dma-names
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    saif@80042000 {
+        compatible = "fsl,imx28-saif";
+        reg = <0x80042000 2000>;
+        #sound-dai-cells = <0>;
+        interrupts = <59>;
+        dmas = <&dma_apbx 4>;
+        dma-names = "rx-tx";
+        #clock-cells = <0>;
+        clocks = <&clks 53>;
+    };
+    saif@80046000 {
+        compatible = "fsl,imx28-saif";
+        reg = <0x80046000 2000>;
+        #sound-dai-cells = <0>;
+        interrupts = <58>;
+        dmas = <&dma_apbx 5>;
+        dma-names = "rx-tx";
+        clocks = <&clks 53>;
+        fsl,saif-master = <&saif0>;
+    };
diff --git a/Documentation/devicetree/bindings/sound/mxs-saif.txt b/Documentation/devicetree/bindings/sound/mxs-saif.txt
deleted file mode 100644
index 7ba07a118e37..000000000000
--- a/Documentation/devicetree/bindings/sound/mxs-saif.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-* Freescale MXS Serial Audio Interface (SAIF)
-
-Required properties:
-- compatible: Should be "fsl,<chip>-saif"
-- reg: Should contain registers location and length
-- interrupts: Should contain ERROR interrupt number
-- dmas: DMA specifier, consisting of a phandle to DMA controller node
-  and SAIF DMA channel ID.
-  Refer to dma.txt and fsl-mxs-dma.txt for details.
-- dma-names: Must be "rx-tx".
-
-Optional properties:
-- fsl,saif-master: phandle to the master SAIF.  It's only required for
-  the slave SAIF.
-
-Note: Each SAIF controller should have an alias correctly numbered
-in "aliases" node.
-
-Example:
-
-aliases {
-	saif0 = &saif0;
-	saif1 = &saif1;
-};
-
-saif0: saif@80042000 {
-	compatible = "fsl,imx28-saif";
-	reg = <0x80042000 2000>;
-	interrupts = <59>;
-	dmas = <&dma_apbx 4>;
-	dma-names = "rx-tx";
-};
-
-saif1: saif@80046000 {
-	compatible = "fsl,imx28-saif";
-	reg = <0x80046000 2000>;
-	interrupts = <58>;
-	dmas = <&dma_apbx 5>;
-	dma-names = "rx-tx";
-	fsl,saif-master = <&saif0>;
-};
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v4] ASoC: dt-bindings: Convert mxs-saif.txt to fsl,imx28-saif.yaml (imx28 saif)
  2024-08-29 10:26 [PATCH v4] ASoC: dt-bindings: Convert mxs-saif.txt to fsl,imx28-saif.yaml (imx28 saif) Lukasz Majewski
@ 2024-08-29 16:13 ` Conor Dooley
  0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2024-08-29 16:13 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, linux-sound, Pengutronix Kernel Team, Fabio Estevam,
	devicetree, imx, linux-arm-kernel, linux-kernel, Liam Girdwood,
	Mark Brown

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

On Thu, Aug 29, 2024 at 12:26:25PM +0200, Lukasz Majewski wrote:
> The 'fsl,imx28-saif' compatible has already the mxs-saif.txt description.
> This patch converts (and removes it) this file to fsl,imx28-saif.yaml.
> 
> Changes for the mxs-saif.txt:
> - Adds 'clocks', '#clock-cells' and '#sound-dai-cells' properties
> - Provide device description
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> 
> ---
> Changes for v4:
> - Change file name to match compatible (fsl,imx28-saif.yaml)
> - Remove 'saif0' and 'saif1' labels as those are not needed in the
>   example node

Hmm, what you've done is not quite what I was suggesting. I was saying
that either you should remove one of the examples entirely, or merge the
two examples retaining the only saif0 label.

With that sorted,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.


> +examples:
> +  - |
> +    saif@80042000 {
> +        compatible = "fsl,imx28-saif";
> +        reg = <0x80042000 2000>;
> +        #sound-dai-cells = <0>;
> +        interrupts = <59>;
> +        dmas = <&dma_apbx 4>;
> +        dma-names = "rx-tx";
> +        #clock-cells = <0>;
> +        clocks = <&clks 53>;
> +    };
> +    saif@80046000 {
> +        compatible = "fsl,imx28-saif";
> +        reg = <0x80046000 2000>;
> +        #sound-dai-cells = <0>;
> +        interrupts = <58>;
> +        dmas = <&dma_apbx 5>;
> +        dma-names = "rx-tx";
> +        clocks = <&clks 53>;
> +        fsl,saif-master = <&saif0>;
> +    };

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-29 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 10:26 [PATCH v4] ASoC: dt-bindings: Convert mxs-saif.txt to fsl,imx28-saif.yaml (imx28 saif) Lukasz Majewski
2024-08-29 16:13 ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox