1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/pwm/sophgo,sg2042-pwm.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Sophgo SG2042 PWM controller
8
9maintainers:
10  - Chen Wang <unicorn_wang@outlook.com>
11
12description:
13  This controller contains 4 channels which can generate PWM waveforms.
14
15allOf:
16  - $ref: pwm.yaml#
17
18properties:
19  compatible:
20    const: sophgo,sg2042-pwm
21
22  reg:
23    maxItems: 1
24
25  clocks:
26    maxItems: 1
27
28  clock-names:
29    items:
30      - const: apb
31
32  resets:
33    maxItems: 1
34
35  "#pwm-cells":
36    const: 3
37
38required:
39  - compatible
40  - reg
41  - clocks
42  - clock-names
43  - resets
44
45unevaluatedProperties: false
46
47examples:
48  - |
49    #include <dt-bindings/reset/sophgo,sg2042-reset.h>
50
51    pwm@7f006000 {
52        compatible = "sophgo,sg2042-pwm";
53        reg = <0x7f006000 0x1000>;
54        #pwm-cells = <3>;
55        clocks = <&clock 67>;
56        clock-names = "apb";
57        resets = <&rstgen RST_PWM>;
58    };
59