[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227162823.3585810-8-david@protonic.nl>
Date: Thu, 27 Feb 2025 17:28:23 +0100
From: David Jander <david@...tonic.nl>
To: linux-kernel@...r.kernel.org
Cc: linux-iio@...r.kernel.org,
Jonathan Corbet <corbet@....net>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
devicetree@...r.kernel.org,
linux-doc@...r.kernel.org,
Nuno Sa <nuno.sa@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Oleksij Rempel <o.rempel@...gutronix.de>,
David Jander <david@...tonic.nl>
Subject: [RFC PATCH 7/7] dt-bindings: motion: Add motion-simple-pwm bindings
Add device-tree bindings for simple Linux Motion Control devices that
are based on 1 or 2 PWM outputs.
Signed-off-by: David Jander <david@...tonic.nl>
---
.../bindings/motion/motion-simple-pwm.yaml | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
diff --git a/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml b/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
new file mode 100644
index 000000000000..409e3aef6f3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/motion/motion-simple-pwm.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/motion/motion-simple-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple PWM based motor controller
+
+maintainers:
+ - David Jander <david@...tonic>
+
+description: |
+ Simple motor control device based on 1 or 2 PWM outputs
+
+properties:
+ compatible:
+ enum:
+ - motion-simple-pwm
+
+ pwms:
+ maxItems: 2
+
+ pwm-names:
+ maxItems: 2
+
+ motion,pwm-inverted:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ If present, this flag indicates that the PWM signal should be inverted.
+ The duty-cycle will be scaled from 100% down to 0% instead 0% to 100%.
+
+required:
+ - compatible
+ - pwms
+
+allOf:
+ - $ref: /schemas/motion/common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ // This example shows how to use the TI DRV8873 or similar motor controllers
+ // with this driver
+ motion-simple-pwm0 {
+ compatible = "motion-simple-pwm";
+ pwms = <&hpdcm0_pwm 0 50000 0>,
+ <&hpdcm0_pwm 1 50000 0>;
+ pwm-names = "left", "right";
+ motion,pwm-inverted;
+ motion,speed-conv-mul = <3600>;
+ motion,speed-conv-div = <100000>;
+ motion,acceleration-conv-mul = <3600>;
+ motion,acceleration-conv-div = <100000>;
+ };
--
2.47.2
Powered by blists - more mailing lists