xref: /openbmc/linux/Documentation/devicetree/bindings/iio/gyroscope/nxp,fxas21002c.yaml (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
1c95003d8SRui Miguel Silva# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c95003d8SRui Miguel Silva%YAML 1.2
3c95003d8SRui Miguel Silva---
4c95003d8SRui Miguel Silva$id: http://devicetree.org/schemas/iio/gyroscope/nxp,fxas21002c.yaml#
5c95003d8SRui Miguel Silva$schema: http://devicetree.org/meta-schemas/core.yaml#
6c95003d8SRui Miguel Silva
7c95003d8SRui Miguel Silvatitle: NXP FXAS21002C Gyroscope
8c95003d8SRui Miguel Silva
9c95003d8SRui Miguel Silvamaintainers:
10c95003d8SRui Miguel Silva  - Rui Miguel Silva <rmfrfs@gmail.com>
11c95003d8SRui Miguel Silva
12c95003d8SRui Miguel Silvadescription: |
13c95003d8SRui Miguel Silva  3 axis digital gyroscope device with an I2C and SPI interface.
14c95003d8SRui Miguel Silva  http://www.nxp.com/products/sensors/gyroscopes/3-axis-digital-gyroscope:FXAS21002C
15c95003d8SRui Miguel Silva
16c95003d8SRui Miguel Silvaproperties:
17c95003d8SRui Miguel Silva  compatible:
18c95003d8SRui Miguel Silva    const: nxp,fxas21002c
19c95003d8SRui Miguel Silva
20c95003d8SRui Miguel Silva  reg:
21c95003d8SRui Miguel Silva    maxItems: 1
22c95003d8SRui Miguel Silva
23c95003d8SRui Miguel Silva  vdd-supply:
24c95003d8SRui Miguel Silva    description: Regulator that provides power to the sensor
25c95003d8SRui Miguel Silva
26c95003d8SRui Miguel Silva  vddio-supply:
27c95003d8SRui Miguel Silva    description: Regulator that provides power to the bus
28c95003d8SRui Miguel Silva
29c95003d8SRui Miguel Silva  reset-gpios:
30c95003d8SRui Miguel Silva    maxItems: 1
31c95003d8SRui Miguel Silva    description: GPIO connected to reset
32c95003d8SRui Miguel Silva
33c95003d8SRui Miguel Silva  interrupts:
34c95003d8SRui Miguel Silva    minItems: 1
35c95003d8SRui Miguel Silva    maxItems: 2
36c95003d8SRui Miguel Silva    description: Either interrupt may be triggered on rising or falling edges.
37c95003d8SRui Miguel Silva
38c95003d8SRui Miguel Silva  interrupt-names:
39c95003d8SRui Miguel Silva    minItems: 1
40c95003d8SRui Miguel Silva    maxItems: 2
41c95003d8SRui Miguel Silva    items:
42c95003d8SRui Miguel Silva      enum:
43c95003d8SRui Miguel Silva        - INT1
44c95003d8SRui Miguel Silva        - INT2
45c95003d8SRui Miguel Silva
46c95003d8SRui Miguel Silva  drive-open-drain:
47c95003d8SRui Miguel Silva    type: boolean
48c95003d8SRui Miguel Silva    description: the interrupt/data ready line will be configured as open drain,
49c95003d8SRui Miguel Silva                 which is useful if several sensors share the same interrupt
50c95003d8SRui Miguel Silva                 line.
51c95003d8SRui Miguel Silva
52c95003d8SRui Miguel Silva  spi-max-frequency:
53c95003d8SRui Miguel Silva    maximum: 2000000
54c95003d8SRui Miguel Silva
55c95003d8SRui Miguel Silvarequired:
56c95003d8SRui Miguel Silva  - compatible
57c95003d8SRui Miguel Silva  - reg
58c95003d8SRui Miguel Silva
59d29c7f8cSKrzysztof KozlowskiallOf:
60d29c7f8cSKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
61d29c7f8cSKrzysztof Kozlowski
62d29c7f8cSKrzysztof KozlowskiunevaluatedProperties: false
63c95003d8SRui Miguel Silva
64c95003d8SRui Miguel Silvaexamples:
65c95003d8SRui Miguel Silva  - |
66c95003d8SRui Miguel Silva    #include <dt-bindings/interrupt-controller/irq.h>
67c95003d8SRui Miguel Silva
68*46908557SKrzysztof Kozlowski    i2c {
69c95003d8SRui Miguel Silva        #address-cells = <1>;
70c95003d8SRui Miguel Silva        #size-cells = <0>;
71c95003d8SRui Miguel Silva
72c95003d8SRui Miguel Silva        gyroscope@20 {
73c95003d8SRui Miguel Silva            compatible = "nxp,fxas21002c";
74c95003d8SRui Miguel Silva            reg = <0x20>;
75c95003d8SRui Miguel Silva
76c95003d8SRui Miguel Silva            vdd-supply = <&reg_peri_3p15v>;
77c95003d8SRui Miguel Silva            vddio-supply = <&reg_peri_3p15v>;
78c95003d8SRui Miguel Silva
79c95003d8SRui Miguel Silva            interrupt-parent = <&gpio1>;
80c95003d8SRui Miguel Silva            interrupts = <7 IRQ_TYPE_EDGE_RISING>;
81c95003d8SRui Miguel Silva            interrupt-names = "INT1";
82c95003d8SRui Miguel Silva        };
83c95003d8SRui Miguel Silva    };
84*46908557SKrzysztof Kozlowski    spi {
85c95003d8SRui Miguel Silva        #address-cells = <1>;
86c95003d8SRui Miguel Silva        #size-cells = <0>;
87c95003d8SRui Miguel Silva
88c95003d8SRui Miguel Silva        gyroscope@0 {
8928ffe8bfSRob Herring            compatible = "nxp,fxas21002c";
90c95003d8SRui Miguel Silva            reg = <0x0>;
91c95003d8SRui Miguel Silva
92c95003d8SRui Miguel Silva            spi-max-frequency = <2000000>;
93c95003d8SRui Miguel Silva
94c95003d8SRui Miguel Silva            interrupt-parent = <&gpio2>;
95c95003d8SRui Miguel Silva            interrupts = <7 IRQ_TYPE_EDGE_RISING>;
96c95003d8SRui Miguel Silva            interrupt-names = "INT2";
97c95003d8SRui Miguel Silva        };
98c95003d8SRui Miguel Silva    };
99