Skip to content

Commit a331099

Browse files
Johan Jonkerthierryreding
authored andcommitted
dt-bindings: pwm: Convert pwm-rockchip.txt to YAML
Current dts files with 'pwm' nodes are manually verified. In order to automate this process pwm-rockchip.txt has to be converted to YAML. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent 0b638f5 commit a331099

2 files changed

Lines changed: 88 additions & 27 deletions

File tree

Documentation/devicetree/bindings/pwm/pwm-rockchip.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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,vop-pwm
18+
- items:
19+
- enum:
20+
- rockchip,rv1108-pwm
21+
- const: rockchip,rk3288-pwm
22+
23+
reg:
24+
maxItems: 1
25+
26+
clocks:
27+
minItems: 1
28+
maxItems: 2
29+
30+
clock-names:
31+
maxItems: 2
32+
33+
"#pwm-cells":
34+
enum: [2, 3]
35+
description:
36+
Must be 2 (rk2928) or 3 (rk3288 and later).
37+
See pwm.yaml for a description of the cell format.
38+
39+
required:
40+
- compatible
41+
- reg
42+
- "#pwm-cells"
43+
44+
if:
45+
properties:
46+
compatible:
47+
contains:
48+
enum:
49+
- rockchip,rv1108-pwm
50+
51+
then:
52+
properties:
53+
clocks:
54+
items:
55+
- description: Used to derive the functional clock for the device.
56+
- description: Used as the APB bus clock.
57+
58+
clock-names:
59+
items:
60+
- const: pwm
61+
- const: pclk
62+
63+
required:
64+
- clocks
65+
- clock-names
66+
67+
else:
68+
properties:
69+
clocks:
70+
maxItems: 1
71+
description:
72+
Used both to derive the functional clock
73+
for the device and as the bus clock.
74+
75+
required:
76+
- clocks
77+
78+
additionalProperties: false
79+
80+
examples:
81+
- |
82+
#include <dt-bindings/clock/rk3188-cru-common.h>
83+
pwm0: pwm@20030000 {
84+
compatible = "rockchip,rk2928-pwm";
85+
reg = <0x20030000 0x10>;
86+
clocks = <&cru PCLK_PWM01>;
87+
#pwm-cells = <2>;
88+
};

0 commit comments

Comments
 (0)