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
48  spi-max-frequency: true
49
50required:
51  - compatible
52  - reg
53
54additionalProperties: false
55
56examples:
57  - |
58        #include <dt-bindings/gpio/gpio.h>
59        #include <dt-bindings/interrupt-controller/irq.h>
60        i2c {
61                #address-cells = <1>;
62                #size-cells = <0>;
63
64                /* Example for a I2C device node */
65                accelerometer@1d {
66                        compatible = "adi,adxl355";
67                        reg = <0x1d>;
68                        interrupt-parent = <&gpio>;
69                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
70                        interrupt-names = "DRDY";
71                };
72        };
73  - |
74        #include <dt-bindings/gpio/gpio.h>
75        #include <dt-bindings/interrupt-controller/irq.h>
76        spi {
77                #address-cells = <1>;
78                #size-cells = <0>;
79
80                accelerometer@0 {
81                        compatible = "adi,adxl355";
82                        reg = <0>;
83                        spi-max-frequency = <1000000>;
84                        interrupt-parent = <&gpio>;
85                        interrupts = <25 IRQ_TYPE_EDGE_RISING>;
86                        interrupt-names = "DRDY";
87                };
88        };
89