Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Analog Devices ADXL313 3-Axis Digital Accelerometer
0008 
0009 maintainers:
0010   - Lucas Stankus <lucas.p.stankus@gmail.com>
0011 
0012 description: |
0013   Analog Devices ADXL313 3-Axis Digital Accelerometer that supports
0014   both I2C & SPI interfaces.
0015     https://www.analog.com/en/products/adxl313.html
0016 
0017 properties:
0018   compatible:
0019     enum:
0020       - adi,adxl313
0021 
0022   reg:
0023     maxItems: 1
0024 
0025   spi-3wire: true
0026 
0027   spi-max-frequency: true
0028 
0029   vs-supply:
0030     description: Regulator that supplies power to the accelerometer
0031 
0032   vdd-supply:
0033     description: Regulator that supplies the digital interface supply voltage
0034 
0035   interrupts:
0036     minItems: 1
0037     maxItems: 2
0038 
0039   interrupt-names:
0040     minItems: 1
0041     maxItems: 2
0042     items:
0043       enum:
0044         - INT1
0045         - INT2
0046 
0047 required:
0048   - compatible
0049   - reg
0050 
0051 additionalProperties: false
0052 
0053 examples:
0054   - |
0055     #include <dt-bindings/gpio/gpio.h>
0056     #include <dt-bindings/interrupt-controller/irq.h>
0057     i2c0 {
0058         #address-cells = <1>;
0059         #size-cells = <0>;
0060 
0061         /* Example for a I2C device node */
0062         accelerometer@53 {
0063             compatible = "adi,adxl313";
0064             reg = <0x53>;
0065             interrupt-parent = <&gpio0>;
0066             interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
0067             interrupt-names = "INT1";
0068         };
0069     };
0070   - |
0071     #include <dt-bindings/gpio/gpio.h>
0072     #include <dt-bindings/interrupt-controller/irq.h>
0073     spi {
0074         #address-cells = <1>;
0075         #size-cells = <0>;
0076 
0077         /* Example for a SPI device node */
0078         accelerometer@0 {
0079             compatible = "adi,adxl313";
0080             reg = <0>;
0081             spi-max-frequency = <5000000>;
0082             interrupt-parent = <&gpio0>;
0083             interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
0084             interrupt-names = "INT1";
0085         };
0086     };