dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion
Straight forward conversion, but there are a few generic properties in here like wakeup-source which should probably have schema in a more generic location. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/20201031184854.745828-13-jic23@kernel.org
This commit is contained in:
parent
3ead692b75
commit
7a2cf8e913
86
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
Normal file
86
Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
Normal file
@ -0,0 +1,86 @@
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
...
|
@ -1,49 +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"
|
||||
"st,lsm6dst"
|
||||
- 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>;
|
||||
};
|
Loading…
Reference in New Issue
Block a user