Merge tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmi
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / pwm / pwm-rockchip.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Rockchip PWM controller
8
9 maintainers:
10   - Heiko Stuebner <heiko@sntech.de>
11
12 properties:
13   compatible:
14     oneOf:
15       - const: rockchip,rk2928-pwm
16       - const: rockchip,rk3288-pwm
17       - const: rockchip,rk3328-pwm
18       - const: rockchip,vop-pwm
19       - items:
20           - const: rockchip,rk3036-pwm
21           - const: rockchip,rk2928-pwm
22       - items:
23           - enum:
24               - rockchip,rk3368-pwm
25               - rockchip,rk3399-pwm
26               - rockchip,rv1108-pwm
27           - const: rockchip,rk3288-pwm
28       - items:
29           - enum:
30               - rockchip,px30-pwm
31               - rockchip,rk3308-pwm
32               - rockchip,rk3568-pwm
33           - const: rockchip,rk3328-pwm
34
35   reg:
36     maxItems: 1
37
38   clocks:
39     minItems: 1
40     maxItems: 2
41
42   clock-names:
43     maxItems: 2
44
45   "#pwm-cells":
46     enum: [2, 3]
47     description:
48       Must be 2 (rk2928) or 3 (rk3288 and later).
49       See pwm.yaml for a description of the cell format.
50
51 required:
52   - compatible
53   - reg
54   - "#pwm-cells"
55
56 if:
57   properties:
58     compatible:
59       contains:
60         enum:
61           - rockchip,rk3328-pwm
62           - rockchip,rv1108-pwm
63
64 then:
65   properties:
66     clocks:
67       items:
68         - description: Used to derive the functional clock for the device.
69         - description: Used as the APB bus clock.
70
71     clock-names:
72       items:
73         - const: pwm
74         - const: pclk
75
76   required:
77     - clocks
78     - clock-names
79
80 else:
81   properties:
82     clocks:
83       maxItems: 1
84       description:
85         Used both to derive the functional clock
86         for the device and as the bus clock.
87
88   required:
89     - clocks
90
91 additionalProperties: false
92
93 examples:
94   - |
95     #include <dt-bindings/clock/rk3188-cru-common.h>
96     pwm0: pwm@20030000 {
97       compatible = "rockchip,rk2928-pwm";
98       reg = <0x20030000 0x10>;
99       clocks = <&cru PCLK_PWM01>;
100       #pwm-cells = <2>;
101     };