xref: /linux/Documentation/devicetree/bindings/iio/accel/adi,adxl380.yaml (revision 0c436dfe5c25d0931b164b944165259f95e5281f)
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,adxl380.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADXL380/382 3-Axis Digital Accelerometer
8
9maintainers:
10  - Ramona Gradinariu <ramona.gradinariu@analog.com>
11  - Antoniu Miclaus <antoniu.miclaus@analog.com>
12
13description: |
14  The ADXL380/ADXL382 is a low noise density, low power, 3-axis
15  accelerometer with selectable measurement ranges. The ADXL380
16  supports the ±4 g, ±8 g, and ±16 g ranges, and the ADXL382 supports
17  ±15 g, ±30 g, and ±60 g ranges.
18
19  https://www.analog.com/en/products/adxl380.html
20
21properties:
22  compatible:
23    enum:
24      - adi,adxl380
25      - adi,adxl382
26
27  reg:
28    maxItems: 1
29
30  interrupts:
31    minItems: 1
32    maxItems: 2
33
34  interrupt-names:
35    minItems: 1
36    items:
37      - enum: [INT0, INT1]
38      - const: INT1
39
40  vddio-supply: true
41
42  vsupply-supply: true
43
44required:
45  - compatible
46  - reg
47  - interrupts
48  - interrupt-names
49  - vddio-supply
50  - vsupply-supply
51
52allOf:
53  - $ref: /schemas/spi/spi-peripheral-props.yaml#
54
55unevaluatedProperties: false
56
57examples:
58  - |
59    #include <dt-bindings/interrupt-controller/irq.h>
60
61    i2c {
62      #address-cells = <1>;
63      #size-cells = <0>;
64
65      accelerometer@54 {
66        compatible = "adi,adxl380";
67        reg = <0x54>;
68        vddio-supply = <&vddio>;
69        vsupply-supply = <&vsupply>;
70        interrupt-parent = <&gpio>;
71        interrupts = <25 IRQ_TYPE_LEVEL_HIGH>;
72        interrupt-names = "INT0";
73      };
74    };
75  - |
76    #include <dt-bindings/interrupt-controller/irq.h>
77
78    spi {
79      #address-cells = <1>;
80      #size-cells = <0>;
81
82      accelerometer@0 {
83        compatible = "adi,adxl380";
84        reg = <0>;
85        spi-max-frequency = <8000000>;
86        vddio-supply = <&vddio>;
87        vsupply-supply = <&vsupply>;
88        interrupt-parent = <&gpio>;
89        interrupts = <25 IRQ_TYPE_LEVEL_HIGH>;
90        interrupt-names = "INT0";
91      };
92    };
93