summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/iio/imu
diff options
context:
space:
mode:
Diffstat (limited to 'dts/Bindings/iio/imu')
-rw-r--r--dts/Bindings/iio/imu/adi,adis16480.txt86
-rw-r--r--dts/Bindings/iio/imu/adi,adis16480.yaml130
-rw-r--r--dts/Bindings/iio/imu/st,lsm6dsx.yaml93
-rw-r--r--dts/Bindings/iio/imu/st_lsm6dsx.txt48
4 files changed, 223 insertions, 134 deletions
diff --git a/dts/Bindings/iio/imu/adi,adis16480.txt b/dts/Bindings/iio/imu/adi,adis16480.txt
deleted file mode 100644
index cd903a1d88..0000000000
--- a/dts/Bindings/iio/imu/adi,adis16480.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-
-Analog Devices ADIS16480 and similar IMUs
-
-Required properties for the ADIS16480:
-
-- compatible: Must be one of
- * "adi,adis16375"
- * "adi,adis16480"
- * "adi,adis16485"
- * "adi,adis16488"
- * "adi,adis16490"
- * "adi,adis16495-1"
- * "adi,adis16495-2"
- * "adi,adis16495-3"
- * "adi,adis16497-1"
- * "adi,adis16497-2"
- * "adi,adis16497-3"
-- reg: SPI chip select number for the device
-- spi-max-frequency: Max SPI frequency to use
- see: Documentation/devicetree/bindings/spi/spi-bus.txt
-- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
-- spi-cpol: See Documentation/devicetree/bindings/spi/spi-bus.txt
-- interrupts: interrupt mapping for IRQ, accepted values are:
- * IRQF_TRIGGER_RISING
- * IRQF_TRIGGER_FALLING
-
-Optional properties:
-
-- interrupt-names: Data ready line selection. Valid values are:
- * DIO1
- * DIO2
- * DIO3
- * DIO4
- If this field is left empty, DIO1 is assigned as default data ready
- signal.
-- reset-gpios: must be the device tree identifier of the RESET pin. As the line
- is active low, it should be marked GPIO_ACTIVE_LOW.
-- clocks: phandle to the external clock. Should be set according to
- "clock-names".
- If this field is left empty together with the "clock-names" field, then
- the internal clock is used.
-- clock-names: The name of the external clock to be used. Valid values are:
- * sync: In sync mode, the internal clock is disabled and the frequency
- of the external clock signal establishes therate of data
- collection and processing. See Fig 14 and 15 in the datasheet.
- The clock-frequency must be:
- * 3000 to 4500 Hz for adis1649x devices.
- * 700 to 2400 Hz for adis1648x devices.
- * pps: In Pulse Per Second (PPS) Mode, the rate of data collection and
- production is equal to the product of the external clock
- frequency and the scale factor in the SYNC_SCALE register, see
- Table 154 in the datasheet.
- The clock-frequency must be:
- * 1 to 128 Hz for adis1649x devices.
- * This mode is not supported by adis1648x devices.
- If this field is left empty together with the "clocks" field, then the
- internal clock is used.
-- adi,ext-clk-pin: The DIOx line to be used as an external clock input.
- Valid values are:
- * DIO1
- * DIO2
- * DIO3
- * DIO4
- Each DIOx pin supports only one function at a time (data ready line
- selection or external clock input). When a single pin has two
- two assignments, the enable bit for the lower priority function
- automatically resets to zero (disabling the lower priority function).
- Data ready has highest priority.
- If this field is left empty, DIO2 is assigned as default external clock
- input pin.
-
-Example:
-
- imu@0 {
- compatible = "adi,adis16495-1";
- reg = <0>;
- spi-max-frequency = <3200000>;
- spi-cpol;
- spi-cpha;
- interrupts = <25 IRQF_TRIGGER_FALLING>;
- interrupt-parent = <&gpio>;
- interrupt-names = "DIO2";
- clocks = <&adis16495_sync>;
- clock-names = "sync";
- adi,ext-clk-pin = "DIO1";
- };
diff --git a/dts/Bindings/iio/imu/adi,adis16480.yaml b/dts/Bindings/iio/imu/adi,adis16480.yaml
new file mode 100644
index 0000000000..5dbe24be99
--- /dev/null
+++ b/dts/Bindings/iio/imu/adi,adis16480.yaml
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/imu/adi,adis16480.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADIS16480 and similar IMUs
+
+maintainers:
+ - Alexandru Ardelean <alexandru.ardelean@analog.com>
+
+properties:
+ compatible:
+ enum:
+ - adi,adis16375
+ - adi,adis16480
+ - adi,adis16485
+ - adi,adis16488
+ - adi,adis16490
+ - adi,adis16495-1
+ - adi,adis16495-2
+ - adi,adis16495-3
+ - adi,adis16497-1
+ - adi,adis16497-2
+ - adi,adis16497-3
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ maxItems: 2
+ description: |
+ Accepted interrupt types are:
+ * IRQ_TYPE_EDGE_RISING
+ * IRQ_TYPE_EDGE_FALLING
+
+ interrupt-names:
+ minItems: 1
+ maxItems: 2
+ description:
+ Default if not supplied is DIO1.
+ items:
+ enum:
+ - DIO1
+ - DIO2
+ - DIO3
+ - DIO4
+
+ spi-max-frequency: true
+
+ spi-cpha: true
+ spi-cpol: true
+
+ reset-gpios:
+ maxItems: 1
+ description: Connected to RESET pin which is active low.
+
+ clocks:
+ maxItems: 1
+ description: If not provided, then the internal clock is used.
+
+ clock-names:
+ description: |
+ sync: In sync mode, the internal clock is disabled and the frequency
+ of the external clock signal establishes therate of data
+ collection and processing. See Fig 14 and 15 in the datasheet.
+ The clock-frequency must be:
+ * 3000 to 4500 Hz for adis1649x devices.
+ * 700 to 2400 Hz for adis1648x devices.
+ pps: In Pulse Per Second (PPS) Mode, the rate of data collection and
+ production is equal to the product of the external clock
+ frequency and the scale factor in the SYNC_SCALE register, see
+ Table 154 in the datasheet.
+ The clock-frequency must be:
+ * 1 to 128 Hz for adis1649x devices.
+ * This mode is not supported by adis1648x devices.
+ enum:
+ - sync
+ - pps
+
+ adi,ext-clk-pin:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: |
+ The DIOx line to be used as an external clock input.
+ Each DIOx pin supports only one function at a time (data ready line
+ selection or external clock input). When a single pin has two
+ two assignments, the enable bit for the lower priority function
+ automatically resets to zero (disabling the lower priority function).
+ Data ready has highest priority.
+ If not provided then DIO2 is assigned as default external clock
+ input pin.
+ enum:
+ - DIO1
+ - DIO2
+ - DIO3
+ - DIO4
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - spi-cpha
+ - spi-cpol
+ - spi-max-frequency
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ imu@0 {
+ compatible = "adi,adis16495-1";
+ reg = <0>;
+ spi-max-frequency = <3200000>;
+ spi-cpol;
+ spi-cpha;
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-parent = <&gpio>;
+ interrupt-names = "DIO2";
+ clocks = <&adis16495_sync>;
+ clock-names = "sync";
+ adi,ext-clk-pin = "DIO1";
+ };
+ };
+...
diff --git a/dts/Bindings/iio/imu/st,lsm6dsx.yaml b/dts/Bindings/iio/imu/st,lsm6dsx.yaml
new file mode 100644
index 0000000000..d9b3213318
--- /dev/null
+++ b/dts/Bindings/iio/imu/st,lsm6dsx.yaml
@@ -0,0 +1,93 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/imu/st,lsm6dsx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STM 6-axis (acc + gyro) IMU Mems sensors
+
+maintainers:
+ - Lorenzo Bianconi <lorenzo@kernel.org>
+
+description:
+ Devices have both I2C and SPI interfaces.
+
+properties:
+ compatible:
+ enum:
+ - st,lsm6ds3
+ - st,lsm6ds3h
+ - st,lsm6dsl
+ - st,lsm6dsm
+ - st,ism330dlc
+ - st,lsm6dso
+ - st,asm330lhh
+ - st,lsm6dsox
+ - st,lsm6dsr
+ - st,lsm6ds3tr-c
+ - st,ism330dhcx
+ - st,lsm9ds1-imu
+ - st,lsm6ds0
+ - st,lsm6dsrx
+ - st,lsm6dst
+ - st,lsm6dsop
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ maxItems: 2
+ description:
+ Supports up to 2 interrupt lines via the INT1 and INT2 pins.
+
+ spi-max-frequency: true
+
+ vdd-supply:
+ description: if defined provides VDD power to the sensor.
+
+ vddio-supply:
+ description: if defined provides VDD IO power to the sensor.
+
+ st,drdy-int-pin:
+ $ref: '/schemas/types.yaml#/definitions/uint32'
+ description: |
+ The pin on the package that will be used to signal data ready
+ enum:
+ - 1
+ - 2
+
+ st,pullups:
+ type: boolean
+ description: enable/disable internal i2c controller pullup resistors.
+
+ drive-open-drain:
+ type: boolean
+ description:
+ The interrupt/data ready line will be configured as open drain, which
+ is useful if several sensors share the same interrupt line.
+
+ wakeup-source:
+ $ref: /schemas/types.yaml#/definitions/flag
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ imu@6b {
+ compatible = "st,lsm6dsm";
+ reg = <0x6b>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+ };
+ };
+...
diff --git a/dts/Bindings/iio/imu/st_lsm6dsx.txt b/dts/Bindings/iio/imu/st_lsm6dsx.txt
deleted file mode 100644
index cef4bc16fc..0000000000
--- a/dts/Bindings/iio/imu/st_lsm6dsx.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-* ST_LSM6DSx driver for STM 6-axis (acc + gyro) imu Mems sensors
-
-Required properties:
-- compatible: must be one of:
- "st,lsm6ds3"
- "st,lsm6ds3h"
- "st,lsm6dsl"
- "st,lsm6dsm"
- "st,ism330dlc"
- "st,lsm6dso"
- "st,asm330lhh"
- "st,lsm6dsox"
- "st,lsm6dsr"
- "st,lsm6ds3tr-c"
- "st,ism330dhcx"
- "st,lsm9ds1-imu"
- "st,lsm6ds0"
- "st,lsm6dsrx"
-- reg: i2c address of the sensor / spi cs line
-
-Optional properties:
-- st,drdy-int-pin: the pin on the package that will be used to signal
- "data ready" (valid values: 1 or 2).
-- st,pullups : enable/disable internal i2c controller pullup resistors.
-- drive-open-drain: the interrupt/data ready line will be configured
- as open drain, which is useful if several sensors share the same
- interrupt line. This is a boolean property.
- (This binding is taken from pinctrl/pinctrl-bindings.txt)
- If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or
- IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line
- when it is not active, whereas a pull-up one is needed when interrupt
- line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING.
-- interrupts: interrupt mapping for IRQ. It should be configured with
- flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or
- IRQ_TYPE_EDGE_FALLING.
-- wakeup-source: Enables wake up of host system on event.
-
- Refer to interrupt-controller/interrupts.txt for generic interrupt
- client node bindings.
-
-Example:
-
-lsm6dsm@6b {
- compatible = "st,lsm6dsm";
- reg = <0x6b>;
- interrupt-parent = <&gpio0>;
- interrupts = <0 IRQ_TYPE_EDGE_RISING>;
-};