1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/rockchip-i2s.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Rockchip I2S controller
8
9description:
10  The I2S bus (Inter-IC sound bus) is a serial link for digital
11  audio data transfer between devices in the system.
12
13maintainers:
14  - Heiko Stuebner <heiko@sntech.de>
15
16properties:
17  compatible:
18    oneOf:
19      - const: rockchip,rk3066-i2s
20      - items:
21          - enum:
22            - rockchip,px30-i2s
23            - rockchip,rk3036-i2s
24            - rockchip,rk3188-i2s
25            - rockchip,rk3228-i2s
26            - rockchip,rk3288-i2s
27            - rockchip,rk3308-i2s
28            - rockchip,rk3328-i2s
29            - rockchip,rk3366-i2s
30            - rockchip,rk3368-i2s
31            - rockchip,rk3399-i2s
32          - const: rockchip,rk3066-i2s
33
34  reg:
35    maxItems: 1
36
37  interrupts:
38    maxItems: 1
39
40  clocks:
41    items:
42      - description: clock for I2S controller
43      - description: clock for I2S BUS
44
45  clock-names:
46    items:
47      - const: i2s_clk
48      - const: i2s_hclk
49
50  dmas:
51    minItems: 1
52    maxItems: 2
53
54  dma-names:
55    oneOf:
56      - const: rx
57      - items:
58        - const: tx
59        - const: rx
60
61  power-domains:
62    maxItems: 1
63
64  rockchip,capture-channels:
65    allOf:
66      - $ref: /schemas/types.yaml#/definitions/uint32
67    default: 2
68    description:
69      Max capture channels, if not set, 2 channels default.
70
71  rockchip,playback-channels:
72    allOf:
73      - $ref: /schemas/types.yaml#/definitions/uint32
74    default: 8
75    description:
76      Max playback channels, if not set, 8 channels default.
77
78  rockchip,grf:
79    $ref: /schemas/types.yaml#/definitions/phandle
80    description:
81      The phandle of the syscon node for the GRF register.
82      Required property for controllers which support multi channel
83      playback/capture.
84
85  "#sound-dai-cells":
86    const: 0
87
88required:
89  - compatible
90  - reg
91  - interrupts
92  - clocks
93  - clock-names
94  - dmas
95  - dma-names
96  - "#sound-dai-cells"
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/clock/rk3288-cru.h>
103    #include <dt-bindings/interrupt-controller/arm-gic.h>
104    #include <dt-bindings/interrupt-controller/irq.h>
105    i2s@ff890000 {
106      compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
107      reg = <0xff890000 0x10000>;
108      interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
109      clocks = <&cru SCLK_I2S0>, <&cru HCLK_I2S0>;
110      clock-names = "i2s_clk", "i2s_hclk";
111      dmas = <&pdma1 0>, <&pdma1 1>;
112      dma-names = "tx", "rx";
113      rockchip,capture-channels = <2>;
114      rockchip,playback-channels = <8>;
115      #sound-dai-cells = <0>;
116    };
117