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