All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] dt-bindings: sound: Convert jz4740-i2s doc to YAML
@ 2020-03-06 22:29 ` Paul Cercueil
  0 siblings, 0 replies; 26+ messages in thread
From: Paul Cercueil @ 2020-03-06 22:29 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Mark Rutland,
	Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, devicetree, linux-kernel, od, Zhou Yanjie, Paul Cercueil

Convert the textual binding documentation for the AIC (AC97/I2S
Controller) of Ingenic SoCs to a YAML schema, and add the new compatible
strings in the process.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 .../bindings/sound/ingenic,aic.yaml           | 92 +++++++++++++++++++
 .../bindings/sound/ingenic,jz4740-i2s.txt     | 23 -----
 2 files changed, 92 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/ingenic,aic.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt

diff --git a/Documentation/devicetree/bindings/sound/ingenic,aic.yaml b/Documentation/devicetree/bindings/sound/ingenic,aic.yaml
new file mode 100644
index 000000000000..44f49bebb267
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ingenic,aic.yaml
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ingenic,aic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ingenic SoCs AC97 / I2S Controller (AIC) DT bindings
+
+maintainers:
+  - Paul Cercueil <paul@crapouillou.net>
+
+properties:
+  $nodename:
+    pattern: '^audio-controller@'
+
+  compatible:
+    oneOf:
+      - enum:
+        - ingenic,jz4740-i2s
+        - ingenic,jz4760-i2s
+        - ingenic,jz4770-i2s
+        - ingenic,jz4780-i2s
+      - items:
+        - const: ingenic,jz4725b-i2s
+        - const: ingenic,jz4740-i2s
+
+  '#sound-dai-cells':
+    const: 0
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: AIC clock
+      - description: I2S clock
+      - description: EXT clock
+      - description: PLL/2 clock
+
+  clock-names:
+    items:
+      - const: aic
+      - const: i2s
+      - const: ext
+      - const: pll half
+
+  dmas:
+    items:
+      - description: DMA controller phandle and request line for I2S RX
+      - description: DMA controller phandle and request line for I2S TX
+
+  dma-names:
+    items:
+      - const: rx
+      - const: tx
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - dmas
+  - dma-names
+  - '#sound-dai-cells'
+
+examples:
+  - |
+    #include <dt-bindings/clock/jz4740-cgu.h>
+    aic: audio-controller@10020000 {
+      compatible = "ingenic,jz4740-i2s";
+      reg = <0x10020000 0x38>;
+
+      #sound-dai-cells = <0>;
+
+      interrupt-parent = <&intc>;
+      interrupts = <18>;
+
+      clocks = <&cgu JZ4740_CLK_AIC>,
+               <&cgu JZ4740_CLK_I2S>,
+               <&cgu JZ4740_CLK_EXT>,
+               <&cgu JZ4740_CLK_PLL_HALF>;
+      clock-names = "aic", "i2s", "ext", "pll half";
+
+      dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>;
+      dma-names = "rx", "tx";
+    };
diff --git a/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt b/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt
deleted file mode 100644
index b623d50004fb..000000000000
--- a/Documentation/devicetree/bindings/sound/ingenic,jz4740-i2s.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Ingenic JZ4740 I2S controller
-
-Required properties:
-- compatible : "ingenic,jz4740-i2s" or "ingenic,jz4780-i2s"
-- reg : I2S registers location and length
-- clocks : AIC and I2S PLL clock specifiers.
-- clock-names: "aic" and "i2s"
-- dmas: DMA controller phandle and DMA request line for I2S Tx and Rx channels
-- dma-names: Must be "tx" and "rx"
-
-Example:
-
-i2s: i2s@10020000 {
-	compatible = "ingenic,jz4740-i2s";
-	reg = <0x10020000 0x94>;
-
-	clocks = <&cgu JZ4740_CLK_AIC>, <&cgu JZ4740_CLK_I2SPLL>;
-	clock-names = "aic", "i2s";
-
-	dmas = <&dma 2>, <&dma 3>;
-	dma-names = "tx", "rx";
-
-};
-- 
2.25.1


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

end of thread, other threads:[~2020-03-24 17:18 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 22:29 [PATCH 1/6] dt-bindings: sound: Convert jz4740-i2s doc to YAML Paul Cercueil
2020-03-06 22:29 ` Paul Cercueil
2020-03-06 22:29 ` [PATCH 2/6] ASoC: jz4740-i2s: Fix divider written at incorrect offset in register Paul Cercueil
2020-03-06 22:29   ` Paul Cercueil
2020-03-06 22:29 ` [PATCH 3/6] ASoC: jz4740-i2s: Add local dev variable in probe function Paul Cercueil
2020-03-06 22:29   ` Paul Cercueil
2020-03-09 14:25   ` Applied "ASoC: jz4740-i2s: Add local dev variable in probe function" to the asoc tree Mark Brown
2020-03-09 14:25     ` Mark Brown
2020-03-06 22:29 ` [PATCH 4/6] ASoC: jz4740-i2s: Avoid passing enum as match data Paul Cercueil
2020-03-06 22:29   ` Paul Cercueil
2020-03-09 14:25   ` Applied "ASoC: jz4740-i2s: Avoid passing enum as match data" to the asoc tree Mark Brown
2020-03-09 14:25     ` Mark Brown
2020-03-06 22:29 ` [PATCH 5/6] ASoC: jz4740-i2s: Add support for the JZ4760 Paul Cercueil
2020-03-06 22:29   ` Paul Cercueil
2020-03-24 17:16   ` Applied "ASoC: jz4740-i2s: Add support for the JZ4760" to the asoc tree Mark Brown
2020-03-24 17:16     ` Mark Brown
2020-03-06 22:29 ` [PATCH 6/6] ASoC: jz4740-i2s: Add support for the JZ4770 Paul Cercueil
2020-03-06 22:29   ` Paul Cercueil
2020-03-24 17:16   ` Applied "ASoC: jz4740-i2s: Add support for the JZ4770" to the asoc tree Mark Brown
2020-03-24 17:16     ` Mark Brown
2020-03-09 13:26 ` [PATCH 1/6] dt-bindings: sound: Convert jz4740-i2s doc to YAML Mark Brown
2020-03-09 13:26   ` Mark Brown
2020-03-23 19:44 ` Rob Herring
2020-03-23 19:44   ` Rob Herring
2020-03-24 17:16 ` Applied "ASoC: Convert jz4740-i2s doc to YAML" to the asoc tree Mark Brown
2020-03-24 17:16   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.