diff mbox series

[RFC,5/7] dt-bindings: motion: Add common motion device properties

Message ID 20250227162823.3585810-6-david@protonic.nl (mailing list archive)
State New
Headers show
Series Add Linux Motion Control subsystem | expand

Commit Message

David Jander Feb. 27, 2025, 4:28 p.m. UTC
Add device-tree binding documentation for common Linux Motion Control
device properties.

Signed-off-by: David Jander <david@protonic.nl>
---
 .../devicetree/bindings/motion/common.yaml    | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/motion/common.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/motion/common.yaml b/Documentation/devicetree/bindings/motion/common.yaml
new file mode 100644
index 000000000000..e92b360a0698
--- /dev/null
+++ b/Documentation/devicetree/bindings/motion/common.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/motion/common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common properties for motion control devices
+
+maintainers:
+  - David Jander <david@protonic.nl>
+
+description: |
+  This document defines device tree properties common to several motion control
+  devices. It doesn't constitute a device tree binding specification by itself but
+  is meant to be referenced by device tree bindings.
+
+  When referenced from motion device tree bindings the properties defined in this
+  document are defined as follows. The motion device tree bindings are responsible
+  for defining whether each property is required or optional.
+
+properties:
+  motion,speed-conv-mul:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 1
+    description: |
+      Numerator of a fractional representation of a speed conversion factor.
+      The speed conversion factor (represented by numerator and denominator)
+      is multiplied with the internal speed unit to obtain the physical speed
+      unit of the controller. For example, for a stepper motor controller, the
+      physical speed unit is microsteps/second (Hz).
+
+  motion,speed-conv-div:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 1
+    description: |
+      Denominator of fractional representation of a speed conversion factor.
+
+  motion,acceleration-conv-mul:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 1
+    description: |
+      Numerator of a fractional representation of an acceleration conversion
+      factor.
+
+  motion,acceleration-conv-div:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 1
+    description: |
+      Denominator of fractional representation of an acceleration conversion
+      factor.
+
+additionalProperties: true