Skip to content

Commit 1577dda

Browse files
ndilietoUwe Kleine-König
authored andcommitted
dt-bindings: pwm: Add pwm-gpio
Add bindings for PWM modulated by GPIO. Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com> Co-developed-by: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240604-pwm-gpio-v7-1-6b67cf60db92@linaro.org Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
1 parent da804fa commit 1577dda

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Generic software PWM for modulating GPIOs
8+
9+
maintainers:
10+
- Stefan Wahren <wahrenst@gmx.net>
11+
12+
allOf:
13+
- $ref: pwm.yaml#
14+
15+
properties:
16+
compatible:
17+
const: pwm-gpio
18+
19+
"#pwm-cells":
20+
const: 3
21+
description:
22+
See pwm.yaml in this directory for a description of the cells format.
23+
The first cell which represents the PWM instance number must always
24+
be zero.
25+
26+
gpios:
27+
description:
28+
GPIO to be modulated
29+
maxItems: 1
30+
31+
required:
32+
- compatible
33+
- "#pwm-cells"
34+
- gpios
35+
36+
additionalProperties: false
37+
38+
examples:
39+
- |
40+
#include <dt-bindings/gpio/gpio.h>
41+
42+
pwm {
43+
#pwm-cells = <3>;
44+
compatible = "pwm-gpio";
45+
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
46+
};

0 commit comments

Comments
 (0)