xref: /freebsd/sys/contrib/device-tree/Bindings/pwm/clk-pwm.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1*b97ee269SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*b97ee269SEmmanuel Vadot%YAML 1.2
3*b97ee269SEmmanuel Vadot---
4*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/clk-pwm.yaml#
5*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b97ee269SEmmanuel Vadot
7*b97ee269SEmmanuel Vadottitle: Clock based PWM controller
8*b97ee269SEmmanuel Vadot
9*b97ee269SEmmanuel Vadotmaintainers:
10*b97ee269SEmmanuel Vadot  - Nikita Travkin <nikita@trvn.ru>
11*b97ee269SEmmanuel Vadot
12*b97ee269SEmmanuel Vadotdescription: |
13*b97ee269SEmmanuel Vadot  Some systems have clocks that can be exposed to external devices.
14*b97ee269SEmmanuel Vadot  (e.g. by muxing them to GPIO pins)
15*b97ee269SEmmanuel Vadot  It's often possible to control duty-cycle of such clocks which makes them
16*b97ee269SEmmanuel Vadot  suitable for generating PWM signal.
17*b97ee269SEmmanuel Vadot
18*b97ee269SEmmanuel VadotallOf:
19*b97ee269SEmmanuel Vadot  - $ref: pwm.yaml#
20*b97ee269SEmmanuel Vadot
21*b97ee269SEmmanuel Vadotproperties:
22*b97ee269SEmmanuel Vadot  compatible:
23*b97ee269SEmmanuel Vadot    const: clk-pwm
24*b97ee269SEmmanuel Vadot
25*b97ee269SEmmanuel Vadot  clocks:
26*b97ee269SEmmanuel Vadot    description: Clock used to generate the signal.
27*b97ee269SEmmanuel Vadot    maxItems: 1
28*b97ee269SEmmanuel Vadot
29*b97ee269SEmmanuel Vadot  "#pwm-cells":
30*b97ee269SEmmanuel Vadot    const: 2
31*b97ee269SEmmanuel Vadot
32*b97ee269SEmmanuel VadotunevaluatedProperties: false
33*b97ee269SEmmanuel Vadot
34*b97ee269SEmmanuel Vadotrequired:
35*b97ee269SEmmanuel Vadot  - compatible
36*b97ee269SEmmanuel Vadot  - clocks
37*b97ee269SEmmanuel Vadot
38*b97ee269SEmmanuel Vadotexamples:
39*b97ee269SEmmanuel Vadot  - |
40*b97ee269SEmmanuel Vadot    pwm {
41*b97ee269SEmmanuel Vadot      compatible = "clk-pwm";
42*b97ee269SEmmanuel Vadot      #pwm-cells = <2>;
43*b97ee269SEmmanuel Vadot      clocks = <&gcc 0>;
44*b97ee269SEmmanuel Vadot      pinctrl-names = "default";
45*b97ee269SEmmanuel Vadot      pinctrl-0 = <&pwm_clk_flash_default>;
46*b97ee269SEmmanuel Vadot    };
47