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,adxl355.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADXL355 3-Axis, Low noise MEMS Accelerometer
8
9maintainers:
10  - Puranjay Mohan <puranjay12@gmail.com>
11
12description: |
13  Analog Devices ADXL355 3-Axis, Low noise MEMS Accelerometer that supports
14  both I2C & SPI interfaces
15    https://www.analog.com/en/products/adxl355.html
16
17properties:
18  compatible:
19    enum:
20      - adi,adxl355
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    minItems: 1
27    maxItems: 3
28    description: |
29      Type for DRDY should be IRQ_TYPE_EDGE_RISING.
30      Three configurable interrupt lines exist.
31
32  interrupt-names:
33    description: Specify which interrupt line is in use.
34    items:
35      enum:
36        - INT1
37        - INT2
38        - DRDY
39    minItems: 1
40    maxItems: 3
41
42  vdd-supply:
43    description: Regulator that provides power to the sensor
44
45  vddio-supply:
46    description: Regulator that provides power to the bus
47
48required:
49  - compatible
50  - reg
51
52allOf:
53  - $ref: /schemas/spi/spi-peripheral-props.yaml#
54
55unevaluatedProperties: false
56
57examples:
58  - |
59        #include <dt-bindings/gpio/gpio.h>
60        #include <dt-bindings/interrupt-controller/irq.h>
61        i2c {
62                #address-cells = <1>;
63                #size-cells = <0>;
64
65                /* Example for a I2C device node */
66                accelerometer@1d {
67                        compatible = "adi,adxl355";
68                        reg = <0x1d>;
69                        interrupt-parent = <&gpio>;
70                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
71                        interrupt-names = "DRDY";
72                };
73        };
74  - |
75        #include <dt-bindings/gpio/gpio.h>
76        #include <dt-bindings/interrupt-controller/irq.h>
77        spi {
78                #address-cells = <1>;
79                #size-cells = <0>;
80
81                accelerometer@0 {
82                        compatible = "adi,adxl355";
83                        reg = <0>;
84                        spi-max-frequency = <1000000>;
85                        interrupt-parent = <&gpio>;
86                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
87                        interrupt-names = "DRDY";
88                };
89        };
90