Skip to content

Commit

Permalink
dt-bindings: pwm: Document clk based PWM controller
Browse files Browse the repository at this point in the history
Add YAML devicetree binding for clk based PWM controller

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Nikita Travkin authored and Thierry Reding committed Jul 29, 2022
1 parent 2375e96 commit c2252c1
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Documentation/devicetree/bindings/pwm/clk-pwm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pwm/clk-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Clock based PWM controller

maintainers:
- Nikita Travkin <nikita@trvn.ru>

description: |
Some systems have clocks that can be exposed to external devices.
(e.g. by muxing them to GPIO pins)
It's often possible to control duty-cycle of such clocks which makes them
suitable for generating PWM signal.
allOf:
- $ref: pwm.yaml#

properties:
compatible:
const: clk-pwm

clocks:
description: Clock used to generate the signal.
maxItems: 1

"#pwm-cells":
const: 2

unevaluatedProperties: false

required:
- compatible
- clocks

examples:
- |
pwm {
compatible = "clk-pwm";
#pwm-cells = <2>;
clocks = <&gcc 0>;
pinctrl-names = "default";
pinctrl-0 = <&pwm_clk_flash_default>;
};

0 comments on commit c2252c1

Please sign in to comment.