xref: /freebsd/sys/contrib/device-tree/Bindings/pwm/sophgo,sg2042-pwm.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
18ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
28ccc0d23SEmmanuel Vadot%YAML 1.2
38ccc0d23SEmmanuel Vadot---
48ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/sophgo,sg2042-pwm.yaml#
58ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68ccc0d23SEmmanuel Vadot
78ccc0d23SEmmanuel Vadottitle: Sophgo SG2042 PWM controller
88ccc0d23SEmmanuel Vadot
98ccc0d23SEmmanuel Vadotmaintainers:
108ccc0d23SEmmanuel Vadot  - Chen Wang <unicorn_wang@outlook.com>
118ccc0d23SEmmanuel Vadot
128ccc0d23SEmmanuel Vadotdescription:
138ccc0d23SEmmanuel Vadot  This controller contains 4 channels which can generate PWM waveforms.
148ccc0d23SEmmanuel Vadot
158ccc0d23SEmmanuel VadotallOf:
168ccc0d23SEmmanuel Vadot  - $ref: pwm.yaml#
178ccc0d23SEmmanuel Vadot
188ccc0d23SEmmanuel Vadotproperties:
198ccc0d23SEmmanuel Vadot  compatible:
20*833e5d42SEmmanuel Vadot    enum:
21*833e5d42SEmmanuel Vadot      - sophgo,sg2042-pwm
22*833e5d42SEmmanuel Vadot      - sophgo,sg2044-pwm
238ccc0d23SEmmanuel Vadot
248ccc0d23SEmmanuel Vadot  reg:
258ccc0d23SEmmanuel Vadot    maxItems: 1
268ccc0d23SEmmanuel Vadot
278ccc0d23SEmmanuel Vadot  clocks:
288ccc0d23SEmmanuel Vadot    maxItems: 1
298ccc0d23SEmmanuel Vadot
308ccc0d23SEmmanuel Vadot  clock-names:
318ccc0d23SEmmanuel Vadot    items:
328ccc0d23SEmmanuel Vadot      - const: apb
338ccc0d23SEmmanuel Vadot
348ccc0d23SEmmanuel Vadot  resets:
358ccc0d23SEmmanuel Vadot    maxItems: 1
368ccc0d23SEmmanuel Vadot
378ccc0d23SEmmanuel Vadot  "#pwm-cells":
388ccc0d23SEmmanuel Vadot    const: 3
398ccc0d23SEmmanuel Vadot
408ccc0d23SEmmanuel Vadotrequired:
418ccc0d23SEmmanuel Vadot  - compatible
428ccc0d23SEmmanuel Vadot  - reg
438ccc0d23SEmmanuel Vadot  - clocks
448ccc0d23SEmmanuel Vadot  - clock-names
458ccc0d23SEmmanuel Vadot  - resets
468ccc0d23SEmmanuel Vadot
478ccc0d23SEmmanuel VadotunevaluatedProperties: false
488ccc0d23SEmmanuel Vadot
498ccc0d23SEmmanuel Vadotexamples:
508ccc0d23SEmmanuel Vadot  - |
518ccc0d23SEmmanuel Vadot    #include <dt-bindings/reset/sophgo,sg2042-reset.h>
528ccc0d23SEmmanuel Vadot
538ccc0d23SEmmanuel Vadot    pwm@7f006000 {
548ccc0d23SEmmanuel Vadot        compatible = "sophgo,sg2042-pwm";
558ccc0d23SEmmanuel Vadot        reg = <0x7f006000 0x1000>;
568ccc0d23SEmmanuel Vadot        #pwm-cells = <3>;
578ccc0d23SEmmanuel Vadot        clocks = <&clock 67>;
588ccc0d23SEmmanuel Vadot        clock-names = "apb";
598ccc0d23SEmmanuel Vadot        resets = <&rstgen RST_PWM>;
608ccc0d23SEmmanuel Vadot    };
61