[PATCH 2/3] ASoC: dt-bindings: rockchip: add spdifrx bindings

Yunhao Tian t123yh.xyz at gmail.com
Sun Oct 24 11:43:16 CEST 2021


From: Yunhao Tian <t123yh.xyz at gmail.com>

This adds the YAML bindings for the Rockchip S/PDIF receiver driver.

Signed-off-by: Yunhao Tian <t123yh.xyz at gmail.com>
---
 .../bindings/sound/rockchip-spdifrx.yaml      | 80 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdifrx.yaml

diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdifrx.yaml b/Documentation/devicetree/bindings/sound/rockchip-spdifrx.yaml
new file mode 100644
index 000000000000..fcbbc3e8786a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip-spdifrx.yaml
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip SPDIF Receiver
+
+description:
+  The SPDIF receiver block allows the processor to
+  receive digital audio via a coaxial cable or a fibre cable.
+
+properties:
+  compatible:
+    oneOf:
+      - const: rockchip,rk3308-spdifrx
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: clock for SPDIF bus
+      - description: clock for SPDIF controller
+
+  clock-names:
+    items:
+      - const: mclk
+      - const: hclk
+
+  dmas:
+    maxItems: 1
+
+  dma-names:
+    const: rx
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    const: spdifrx-m
+
+  power-domains:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - dmas
+  - dma-names
+  - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/rk3308-cru.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    spdif_rx: spdif-rx at ff3b0000 {
+      #sound-dai-cells = <0>;
+      compatible = "rockchip,rk3308-spdifrx";
+      reg = <0x0 0xff3b0000 0x0 0x1000>;
+      interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&cru SCLK_SPDIF_RX>, <&cru HCLK_SPDIFRX>;
+      clock-names = "mclk", "hclk";
+      dmas = <&dmac1 14>;
+      dma-names = "rx";
+      resets = <&cru SRST_SPDIFRX_M>;
+      reset-names = "spdifrx-m";
+      status = "disabled";
+    };
\ No newline at end of file
diff --git a/MAINTAINERS b/MAINTAINERS
index a2bee2166a39..82e0fa37c5b1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15985,6 +15985,7 @@ M:	Yunhao Tian <t123yh.xyz at gmail.com>
 L:	linux-rockchip at lists.infradead.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/sound/rockchip-spdifrx.yaml
 F:	sound/soc/rockchip/rockchip_spdifrx.*
 
 ROCKCHIP VIDEO DECODER DRIVER
 M:	Ezequiel Garcia <ezequiel at collabora.com>
-- 
2.25.1



More information about the Alsa-devel mailing list