xref: /freebsd/sys/contrib/device-tree/Bindings/pwm/marvell,pxa-pwm.yaml (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/pwm/marvell,pxa-pwm.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Marvell PXA PWM
8
9maintainers:
10  - Duje Mihanović <duje.mihanovic@skole.hr>
11
12allOf:
13  - $ref: pwm.yaml#
14  - if:
15      properties:
16        compatible:
17          contains:
18            const: spacemit,k1-pwm
19    then:
20      properties:
21        "#pwm-cells":
22          const: 3
23    else:
24      properties:
25        "#pwm-cells":
26          const: 1
27          description: |
28            Used for specifying the period length in nanoseconds.
29
30properties:
31  compatible:
32    oneOf:
33      - enum:
34          - marvell,pxa250-pwm
35          - marvell,pxa270-pwm
36          - marvell,pxa168-pwm
37          - marvell,pxa910-pwm
38      - items:
39          - const: spacemit,k1-pwm
40          - const: marvell,pxa910-pwm
41
42  reg:
43    # Length should be 0x10
44    maxItems: 1
45
46  "#pwm-cells":
47    description: Number of cells in a pwm specifier.
48
49  clocks:
50    maxItems: 1
51
52  resets:
53    maxItems: 1
54
55required:
56  - compatible
57  - reg
58  - clocks
59
60additionalProperties: false
61
62examples:
63  - |
64    #include <dt-bindings/clock/pxa-clock.h>
65
66    pwm0: pwm@40b00000 {
67      compatible = "marvell,pxa250-pwm";
68      reg = <0x40b00000 0x10>;
69      #pwm-cells = <1>;
70      clocks = <&clks CLK_PWM0>;
71    };
72