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,rk3328-i2s
28            - rockchip,rk3366-i2s
29            - rockchip,rk3368-i2s
30            - rockchip,rk3399-i2s
31          - const: rockchip,rk3066-i2s
32
33  reg:
34    maxItems: 1
35
36  interrupts:
37    maxItems: 1
38
39  clocks:
40    items:
41      - description: clock for I2S controller
42      - description: clock for I2S BUS
43
44  clock-names:
45    items:
46      - const: i2s_clk
47      - const: i2s_hclk
48
49  dmas:
50    items:
51      - description: TX DMA Channel
52      - description: RX DMA Channel
53
54  dma-names:
55    items:
56      - const: tx
57      - const: rx
58
59  power-domains:
60    maxItems: 1
61
62  rockchip,capture-channels:
63    allOf:
64      - $ref: /schemas/types.yaml#/definitions/uint32
65    default: 2
66    description:
67      Max capture channels, if not set, 2 channels default.
68
69  rockchip,playback-channels:
70    allOf:
71      - $ref: /schemas/types.yaml#/definitions/uint32
72    default: 8
73    description:
74      Max playback channels, if not set, 8 channels default.
75
76  rockchip,grf:
77    $ref: /schemas/types.yaml#/definitions/phandle
78    description:
79      The phandle of the syscon node for the GRF register.
80      Required property for controllers which support multi channel
81      playback/capture.
82
83  "#sound-dai-cells":
84    const: 0
85
86required:
87  - compatible
88  - reg
89  - interrupts
90  - clocks
91  - clock-names
92  - dmas
93  - dma-names
94  - "#sound-dai-cells"
95
96additionalProperties: false
97
98examples:
99  - |
100    #include <dt-bindings/clock/rk3288-cru.h>
101    #include <dt-bindings/interrupt-controller/arm-gic.h>
102    #include <dt-bindings/interrupt-controller/irq.h>
103    i2s@ff890000 {
104      compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
105      reg = <0xff890000 0x10000>;
106      interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
107      clocks = <&cru SCLK_I2S0>, <&cru HCLK_I2S0>;
108      clock-names = "i2s_clk", "i2s_hclk";
109      dmas = <&pdma1 0>, <&pdma1 1>;
110      dma-names = "tx", "rx";
111      rockchip,capture-channels = <2>;
112      rockchip,playback-channels = <8>;
113      #sound-dai-cells = <0>;
114    };
115