xref: /linux/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml (revision 223981db9bafb80f558162c148f261e2ff043dbe)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Rockchip SPDIF transceiver
8
9description:
10  The S/PDIF audio block is a stereo transceiver that allows the
11  processor to receive and transmit digital audio via a coaxial or
12  fibre cable.
13
14maintainers:
15  - Heiko Stuebner <heiko@sntech.de>
16
17properties:
18  compatible:
19    oneOf:
20      - const: rockchip,rk3066-spdif
21      - const: rockchip,rk3228-spdif
22      - const: rockchip,rk3328-spdif
23      - const: rockchip,rk3366-spdif
24      - const: rockchip,rk3368-spdif
25      - const: rockchip,rk3399-spdif
26      - const: rockchip,rk3568-spdif
27      - items:
28          - enum:
29              - rockchip,rk3128-spdif
30              - rockchip,rk3188-spdif
31              - rockchip,rk3288-spdif
32              - rockchip,rk3308-spdif
33          - const: rockchip,rk3066-spdif
34
35  reg:
36    maxItems: 1
37
38  interrupts:
39    maxItems: 1
40
41  clocks:
42    items:
43      - description: clock for SPDIF bus
44      - description: clock for SPDIF controller
45
46  clock-names:
47    items:
48      - const: mclk
49      - const: hclk
50
51  dmas:
52    maxItems: 1
53
54  dma-names:
55    const: tx
56
57  power-domains:
58    maxItems: 1
59
60  rockchip,grf:
61    $ref: /schemas/types.yaml#/definitions/phandle
62    description:
63      The phandle of the syscon node for the GRF register.
64      Required property on RK3288.
65
66  "#sound-dai-cells":
67    const: 0
68
69required:
70  - compatible
71  - reg
72  - interrupts
73  - clocks
74  - clock-names
75  - dmas
76  - dma-names
77  - "#sound-dai-cells"
78
79allOf:
80  - $ref: dai-common.yaml#
81  - if:
82      properties:
83        compatible:
84          contains:
85            const: rockchip,rk3288-spdif
86    then:
87      required:
88        - rockchip,grf
89
90unevaluatedProperties: false
91
92examples:
93  - |
94    #include <dt-bindings/clock/rk3188-cru.h>
95    #include <dt-bindings/interrupt-controller/arm-gic.h>
96    spdif: spdif@1011e000 {
97      compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
98      reg = <0x1011e000 0x2000>;
99      interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
100      clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>;
101      clock-names = "mclk", "hclk";
102      dmas = <&dmac1_s 8>;
103      dma-names = "tx";
104      #sound-dai-cells = <0>;
105    };
106