1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Analog Devices ADXL313 3-Axis Digital Accelerometer 8 9maintainers: 10 - Lucas Stankus <lucas.p.stankus@gmail.com> 11 12description: | 13 Analog Devices ADXL313 3-Axis Digital Accelerometer that supports 14 both I2C & SPI interfaces. 15 https://www.analog.com/en/products/adxl313.html 16 17properties: 18 compatible: 19 enum: 20 - adi,adxl313 21 22 reg: 23 maxItems: 1 24 25 spi-3wire: true 26 27 vs-supply: 28 description: Regulator that supplies power to the accelerometer 29 30 vdd-supply: 31 description: Regulator that supplies the digital interface supply voltage 32 33 interrupts: 34 minItems: 1 35 maxItems: 2 36 37 interrupt-names: 38 minItems: 1 39 maxItems: 2 40 items: 41 enum: 42 - INT1 43 - INT2 44 45required: 46 - compatible 47 - reg 48 49allOf: 50 - $ref: /schemas/spi/spi-peripheral-props.yaml# 51 52unevaluatedProperties: false 53 54examples: 55 - | 56 #include <dt-bindings/gpio/gpio.h> 57 #include <dt-bindings/interrupt-controller/irq.h> 58 i2c0 { 59 #address-cells = <1>; 60 #size-cells = <0>; 61 62 /* Example for a I2C device node */ 63 accelerometer@53 { 64 compatible = "adi,adxl313"; 65 reg = <0x53>; 66 interrupt-parent = <&gpio0>; 67 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 68 interrupt-names = "INT1"; 69 }; 70 }; 71 - | 72 #include <dt-bindings/gpio/gpio.h> 73 #include <dt-bindings/interrupt-controller/irq.h> 74 spi { 75 #address-cells = <1>; 76 #size-cells = <0>; 77 78 /* Example for a SPI device node */ 79 accelerometer@0 { 80 compatible = "adi,adxl313"; 81 reg = <0>; 82 spi-max-frequency = <5000000>; 83 interrupt-parent = <&gpio0>; 84 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 85 interrupt-names = "INT1"; 86 }; 87 }; 88