0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/gyroscope/nxp,fxas21002c.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: NXP FXAS21002C Gyroscope
0008
0009 maintainers:
0010 - Rui Miguel Silva <rmfrfs@gmail.com>
0011
0012 description: |
0013 3 axis digital gyroscope device with an I2C and SPI interface.
0014 http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C
0015
0016 properties:
0017 compatible:
0018 const: nxp,fxas21002c
0019
0020 reg:
0021 maxItems: 1
0022
0023 vdd-supply:
0024 description: Regulator that provides power to the sensor
0025
0026 vddio-supply:
0027 description: Regulator that provides power to the bus
0028
0029 reset-gpios:
0030 maxItems: 1
0031 description: GPIO connected to reset
0032
0033 interrupts:
0034 minItems: 1
0035 maxItems: 2
0036 description: Either interrupt may be triggered on rising or falling edges.
0037
0038 interrupt-names:
0039 minItems: 1
0040 maxItems: 2
0041 items:
0042 enum:
0043 - INT1
0044 - INT2
0045
0046 drive-open-drain:
0047 type: boolean
0048 description: the interrupt/data ready line will be configured as open drain,
0049 which is useful if several sensors share the same interrupt
0050 line.
0051
0052 spi-max-frequency:
0053 maximum: 2000000
0054
0055 required:
0056 - compatible
0057 - reg
0058
0059 additionalProperties: false
0060
0061 examples:
0062 - |
0063 #include <dt-bindings/interrupt-controller/irq.h>
0064
0065 i2c0 {
0066 #address-cells = <1>;
0067 #size-cells = <0>;
0068
0069 gyroscope@20 {
0070 compatible = "nxp,fxas21002c";
0071 reg = <0x20>;
0072
0073 vdd-supply = <®_peri_3p15v>;
0074 vddio-supply = <®_peri_3p15v>;
0075
0076 interrupt-parent = <&gpio1>;
0077 interrupts = <7 IRQ_TYPE_EDGE_RISING>;
0078 interrupt-names = "INT1";
0079 };
0080 };
0081 spi0 {
0082 #address-cells = <1>;
0083 #size-cells = <0>;
0084
0085 gyroscope@0 {
0086 compatible = "nxp,fxas21002c";
0087 reg = <0x0>;
0088
0089 spi-max-frequency = <2000000>;
0090
0091 interrupt-parent = <&gpio2>;
0092 interrupts = <7 IRQ_TYPE_EDGE_RISING>;
0093 interrupt-names = "INT2";
0094 };
0095 };