18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28cc087a1SEmmanuel Vadot%YAML 1.2
38cc087a1SEmmanuel Vadot---
48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml#
58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68cc087a1SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometers
88cc087a1SEmmanuel Vadot
98cc087a1SEmmanuel Vadotmaintainers:
108cc087a1SEmmanuel Vadot  - Lucas Stankus <lucas.p.stankus@gmail.com>
118cc087a1SEmmanuel Vadot
128cc087a1SEmmanuel Vadotdescription: |
137ef62cebSEmmanuel Vadot  Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometer that
147ef62cebSEmmanuel Vadot  support both I2C & SPI interfaces.
157ef62cebSEmmanuel Vadot    https://www.analog.com/en/products/adxl312.html
168cc087a1SEmmanuel Vadot    https://www.analog.com/en/products/adxl313.html
177ef62cebSEmmanuel Vadot    https://www.analog.com/en/products/adxl314.html
188cc087a1SEmmanuel Vadot
198cc087a1SEmmanuel Vadotproperties:
208cc087a1SEmmanuel Vadot  compatible:
218cc087a1SEmmanuel Vadot    enum:
227ef62cebSEmmanuel Vadot      - adi,adxl312
238cc087a1SEmmanuel Vadot      - adi,adxl313
247ef62cebSEmmanuel Vadot      - adi,adxl314
258cc087a1SEmmanuel Vadot
268cc087a1SEmmanuel Vadot  reg:
278cc087a1SEmmanuel Vadot    maxItems: 1
288cc087a1SEmmanuel Vadot
298cc087a1SEmmanuel Vadot  spi-3wire: true
308cc087a1SEmmanuel Vadot
318cc087a1SEmmanuel Vadot  vs-supply:
328cc087a1SEmmanuel Vadot    description: Regulator that supplies power to the accelerometer
338cc087a1SEmmanuel Vadot
348cc087a1SEmmanuel Vadot  vdd-supply:
358cc087a1SEmmanuel Vadot    description: Regulator that supplies the digital interface supply voltage
368cc087a1SEmmanuel Vadot
378cc087a1SEmmanuel Vadot  interrupts:
388cc087a1SEmmanuel Vadot    minItems: 1
398cc087a1SEmmanuel Vadot    maxItems: 2
408cc087a1SEmmanuel Vadot
418cc087a1SEmmanuel Vadot  interrupt-names:
428cc087a1SEmmanuel Vadot    minItems: 1
438cc087a1SEmmanuel Vadot    maxItems: 2
448cc087a1SEmmanuel Vadot    items:
458cc087a1SEmmanuel Vadot      enum:
468cc087a1SEmmanuel Vadot        - INT1
478cc087a1SEmmanuel Vadot        - INT2
488cc087a1SEmmanuel Vadot
498cc087a1SEmmanuel Vadotrequired:
508cc087a1SEmmanuel Vadot  - compatible
518cc087a1SEmmanuel Vadot  - reg
528cc087a1SEmmanuel Vadot
537ef62cebSEmmanuel VadotallOf:
547ef62cebSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
557ef62cebSEmmanuel Vadot
567ef62cebSEmmanuel VadotunevaluatedProperties: false
578cc087a1SEmmanuel Vadot
588cc087a1SEmmanuel Vadotexamples:
598cc087a1SEmmanuel Vadot  - |
608cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
618cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
62*cb7aa33aSEmmanuel Vadot    i2c {
638cc087a1SEmmanuel Vadot        #address-cells = <1>;
648cc087a1SEmmanuel Vadot        #size-cells = <0>;
658cc087a1SEmmanuel Vadot
668cc087a1SEmmanuel Vadot        /* Example for a I2C device node */
678cc087a1SEmmanuel Vadot        accelerometer@53 {
688cc087a1SEmmanuel Vadot            compatible = "adi,adxl313";
698cc087a1SEmmanuel Vadot            reg = <0x53>;
708cc087a1SEmmanuel Vadot            interrupt-parent = <&gpio0>;
718cc087a1SEmmanuel Vadot            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
728cc087a1SEmmanuel Vadot            interrupt-names = "INT1";
738cc087a1SEmmanuel Vadot        };
748cc087a1SEmmanuel Vadot    };
758cc087a1SEmmanuel Vadot  - |
768cc087a1SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
778cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
788cc087a1SEmmanuel Vadot    spi {
798cc087a1SEmmanuel Vadot        #address-cells = <1>;
808cc087a1SEmmanuel Vadot        #size-cells = <0>;
818cc087a1SEmmanuel Vadot
828cc087a1SEmmanuel Vadot        /* Example for a SPI device node */
838cc087a1SEmmanuel Vadot        accelerometer@0 {
848cc087a1SEmmanuel Vadot            compatible = "adi,adxl313";
858cc087a1SEmmanuel Vadot            reg = <0>;
868cc087a1SEmmanuel Vadot            spi-max-frequency = <5000000>;
878cc087a1SEmmanuel Vadot            interrupt-parent = <&gpio0>;
888cc087a1SEmmanuel Vadot            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
898cc087a1SEmmanuel Vadot            interrupt-names = "INT1";
908cc087a1SEmmanuel Vadot        };
918cc087a1SEmmanuel Vadot    };
92