xref: /freebsd/sys/contrib/device-tree/Bindings/iio/accel/adi,adxl372.yaml (revision 02e9120893770924227138ba49df1edb3896112a)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/accel/adi,adxl372.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer
8
9maintainers:
10  - Stefan Popa <stefan.popa@analog.com>
11
12description: |
13  Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer that supports
14  both I2C & SPI interfaces
15    https://www.analog.com/en/products/adxl372.html
16
17properties:
18  compatible:
19    enum:
20      - adi,adxl372
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28required:
29  - compatible
30  - reg
31  - interrupts
32
33allOf:
34  - $ref: /schemas/spi/spi-peripheral-props.yaml#
35
36unevaluatedProperties: false
37
38examples:
39  - |
40    #include <dt-bindings/gpio/gpio.h>
41    #include <dt-bindings/interrupt-controller/irq.h>
42    i2c {
43        #address-cells = <1>;
44        #size-cells = <0>;
45
46        /* Example for a I2C device node */
47        accelerometer@53 {
48            compatible = "adi,adxl372";
49            reg = <0x53>;
50            interrupt-parent = <&gpio>;
51            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
52        };
53    };
54  - |
55    #include <dt-bindings/gpio/gpio.h>
56    #include <dt-bindings/interrupt-controller/irq.h>
57    spi {
58        #address-cells = <1>;
59        #size-cells = <0>;
60
61        accelerometer@0 {
62            compatible = "adi,adxl372";
63            reg = <0>;
64            spi-max-frequency = <1000000>;
65            interrupt-parent = <&gpio>;
66            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
67        };
68    };
69