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
55 allOf:
56 - $ref: pwm.yaml#
57
58 - if:
59 properties:
60 compatible:
61 contains:
62 enum:
63 - rockchip,rk3328-pwm
64 - rockchip,rv1108-pwm
65
66 then:
67 properties:
68 clocks:
69 items:
70 - description: Used to derive the functional clock for the device.
71 - description: Used as the APB bus clock.
72
73 clock-names:
74 items:
75 - const: pwm
76 - const: pclk
77
78 required:
79 - clocks
80 - clock-names
81
82 else:
83 properties:
84 clocks:
85 maxItems: 1
86 description:
87 Used both to derive the functional clock
88 for the device and as the bus clock.
89
90 required:
91 - clocks
92
93 additionalProperties: false
94
95 examples:
96 - |
97 #include <dt-bindings/clock/rk3188-cru-common.h>
98 pwm0: pwm@20030000 {
99 compatible = "rockchip,rk2928-pwm";
100 reg = <0x20030000 0x10>;
101 clocks = <&cru PCLK_PWM01>;
102 #pwm-cells = <2>;
103 };
Cache object: dbad04a66e68a5b6a500a56a5e56ccf9
|