aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Di Lieto <[email protected]>2024-06-04 23:00:40 +0200
committerUwe Kleine-König <[email protected]>2024-07-10 17:52:47 +0200
commit1577ddaa515e3af2614e1f52711c287bebc338cf (patch)
tree46853ad3da274cc33ff1fd76dfbdf10a5b08b056
parentda804fa9bc718e4210ec27cc0457ecc1eb073a14 (diff)
dt-bindings: pwm: Add pwm-gpio
Add bindings for PWM modulated by GPIO. Signed-off-by: Nicola Di Lieto <[email protected]> Co-developed-by: Stefan Wahren <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Dhruva Gole <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
-rw-r--r--Documentation/devicetree/bindings/pwm/pwm-gpio.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
new file mode 100644
index 000000000000..1576c193f2ab
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-gpio.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic software PWM for modulating GPIOs
+
+maintainers:
+ - Stefan Wahren <[email protected]>
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ const: pwm-gpio
+
+ "#pwm-cells":
+ const: 3
+ description:
+ See pwm.yaml in this directory for a description of the cells format.
+ The first cell which represents the PWM instance number must always
+ be zero.
+
+ gpios:
+ description:
+ GPIO to be modulated
+ maxItems: 1
+
+required:
+ - compatible
+ - "#pwm-cells"
+ - gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ pwm {
+ #pwm-cells = <3>;
+ compatible = "pwm-gpio";
+ gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ };