brintos

brintos / linux-shallow public Read only

0
0
Text · 2.6 KiB · e8ca9a2 Raw
97 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8975.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: AsahiKASEI AK8975 magnetometer sensor8 9maintainers:10  - Jonathan Albrieux <jonathan.albrieux@gmail.com>11 12properties:13  compatible:14    oneOf:15      - enum:16          - asahi-kasei,ak897517          - asahi-kasei,ak896318          - asahi-kasei,ak0991119          - asahi-kasei,ak0991220          - asahi-kasei,ak0991621      - items:22          # ak09918 is register compatible with ak09912.23          - const: asahi-kasei,ak0991824          - const: asahi-kasei,ak0991225      - enum:26          - ak897527          - ak896328          - ak0991129          - ak0991230        deprecated: true31 32  reg:33    maxItems: 134 35  gpios:36    maxItems: 137    description: |38      AK8975 has a "Data ready" pin (DRDY) which informs that data39      is ready to be read and is possible to listen on it. If used,40      this should be active high. Prefer interrupt over this.41 42  interrupts:43    maxItems: 144    description: interrupt for DRDY pin. Triggered on rising edge.45 46  vdd-supply:47    description: |48      an optional regulator that needs to be on to provide VDD power to49      the sensor.50 51  vid-supply:52    description: |53      an optional regulator that needs to be on to provide VID power to54      the sensor.55 56  mount-matrix:57    description: an optional 3x3 mounting rotation matrix.58 59  reset-gpios:60    maxItems: 161    description: |62      an optional pin needed for AK09911 to set the reset state. This should63      be usually active low64 65required:66  - compatible67  - reg68 69additionalProperties: false70 71examples:72  - |73    #include <dt-bindings/interrupt-controller/irq.h>74    #include <dt-bindings/gpio/gpio.h>75    i2c {76        #address-cells = <1>;77        #size-cells = <0>;78 79        magnetometer@c {80            compatible = "asahi-kasei,ak8975";81            reg = <0x0c>;82            interrupt-parent = <&gpio6>;83            interrupts = <15 IRQ_TYPE_EDGE_RISING>;84            vdd-supply = <&ldo_3v3_gnss>;85            reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;86            mount-matrix = "-0.984807753012208",  /* x0 */87                           "0",                   /* y0 */88                           "-0.173648177666930",  /* z0 */89                           "0",                   /* x1 */90                           "-1",                  /* y1 */91                           "0",                   /* z1 */92                           "-0.173648177666930",  /* x2 */93                           "0",                   /* y2 */94                           "0.984807753012208";   /* z2 */95        };96    };97