diff mbox series

[1/2] dt-bindings: iio: position: Add ams AS5600 Position Sensor

Message ID 20251020201653.86181-2-duttaditya18@gmail.com
State New
Headers show
Series New driver for ams AS5600 Position Sensor | expand

Commit Message

Aditya Dutt Oct. 20, 2025, 8:16 p.m. UTC
The AS5600 is a Hall-based rotary magnetic position sensor using
planar sensors that convert the magnetic field component perpendicular
to the surface of the chip into a voltage, or a numerical value
available through i2c.

Add dt-bindings for the sensor.

Datasheet: https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5600-position-sensor
Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
---
 .../bindings/iio/position/ams,as5600.yaml     | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/position/ams,as5600.yaml

Comments

Conor Dooley Oct. 22, 2025, 5:50 p.m. UTC | #1
On Tue, Oct 21, 2025 at 01:46:52AM +0530, Aditya Dutt wrote:
> The AS5600 is a Hall-based rotary magnetic position sensor using
> planar sensors that convert the magnetic field component perpendicular
> to the surface of the chip into a voltage, or a numerical value
> available through i2c.
> 
> Add dt-bindings for the sensor.
> 
> Datasheet: https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5600-position-sensor

Looks like this device has two supplies, could you document those
please?

Additionally, this "PGO" pin - is it necessary for a driver to know what
state it is in to function correctly? If so, can the information about
which state it is in be gathered from i2c?
Should there also be an optional pgo-gpios property for the scenario
where it is not tied, but set by a GPIO, if that is even possible.

> Signed-off-by: Aditya Dutt <duttaditya18@gmail.com>
> ---
>  .../bindings/iio/position/ams,as5600.yaml     | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/position/ams,as5600.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml b/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml
> new file mode 100644
> index 000000000000..d4c92dd41dd6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/position/ams,as5600.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ams AS5600 Position Sensor
> +
> +maintainers:
> +  - Aditya Dutt <duttaditya18@gmail.com>
> +
> +description: |
> +  12-Bit Programmable Contactless Potentiometer
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ams,as5600

blank line here please.

> +  reg:
> +    maxItems: 1
> +    description: |
> +      The I2C register address of the device. Typical address for AS5600: 0x36.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      ams5600@36 {

potentiometer@36

pw-bot: changes-requested

Cheers,
Conor.

> +        compatible = "ams,as5600";
> +        reg = <0x36>;
> +      };
> +    };
> +
> +...
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml b/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml
new file mode 100644
index 000000000000..d4c92dd41dd6
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/position/ams,as5600.yaml
@@ -0,0 +1,42 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/position/ams,as5600.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ams AS5600 Position Sensor
+
+maintainers:
+  - Aditya Dutt <duttaditya18@gmail.com>
+
+description: |
+  12-Bit Programmable Contactless Potentiometer
+
+properties:
+  compatible:
+    enum:
+      - ams,as5600
+  reg:
+    maxItems: 1
+    description: |
+      The I2C register address of the device. Typical address for AS5600: 0x36.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      ams5600@36 {
+        compatible = "ams,as5600";
+        reg = <0x36>;
+      };
+    };
+
+...