Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
7title: Rockchip PWM controller
8
9maintainers:
10 - Heiko Stuebner <heiko@sntech.de>
11
12properties:
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,rk3128-pwm
25 - rockchip,rk3368-pwm
26 - rockchip,rk3399-pwm
27 - rockchip,rv1108-pwm
28 - const: rockchip,rk3288-pwm
29 - items:
30 - enum:
31 - rockchip,px30-pwm
32 - rockchip,rk3308-pwm
33 - rockchip,rk3528-pwm
34 - rockchip,rk3562-pwm
35 - rockchip,rk3568-pwm
36 - rockchip,rk3588-pwm
37 - rockchip,rv1126-pwm
38 - const: rockchip,rk3328-pwm
39
40 reg:
41 maxItems: 1
42
43 clocks:
44 minItems: 1
45 maxItems: 2
46
47 clock-names:
48 maxItems: 2
49
50 "#pwm-cells":
51 enum: [2, 3]
52 description:
53 Must be 2 (rk2928) or 3 (rk3288 and later).
54 See pwm.yaml for a description of the cell format.
55
56required:
57 - compatible
58 - reg
59
60allOf:
61 - $ref: pwm.yaml#
62
63 - if:
64 properties:
65 compatible:
66 contains:
67 enum:
68 - rockchip,rk3328-pwm
69 - rockchip,rv1108-pwm
70
71 then:
72 properties:
73 clocks:
74 items:
75 - description: Used to derive the functional clock for the device.
76 - description: Used as the APB bus clock.
77
78 clock-names:
79 items:
80 - const: pwm
81 - const: pclk
82
83 required:
84 - clocks
85 - clock-names
86
87 else:
88 properties:
89 clocks:
90 maxItems: 1
91 description:
92 Used both to derive the functional clock
93 for the device and as the bus clock.
94
95 required:
96 - clocks
97
98additionalProperties: false
99
100examples:
101 - |
102 #include <dt-bindings/clock/rk3188-cru-common.h>
103 pwm0: pwm@20030000 {
104 compatible = "rockchip,rk2928-pwm";
105 reg = <0x20030000 0x10>;
106 clocks = <&cru PCLK_PWM01>;
107 #pwm-cells = <2>;
108 };