1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 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 sensor 8 9maintainers: 10 - Jonathan Albrieux <jonathan.albrieux@gmail.com> 11 12properties: 13 compatible: 14 oneOf: 15 - enum: 16 - asahi-kasei,ak8975 17 - asahi-kasei,ak8963 18 - asahi-kasei,ak09911 19 - asahi-kasei,ak09912 20 - asahi-kasei,ak09916 21 - enum: 22 - ak8975 23 - ak8963 24 - ak09911 25 - ak09912 26 deprecated: true 27 28 reg: 29 maxItems: 1 30 31 gpios: 32 maxItems: 1 33 description: | 34 AK8975 has a "Data ready" pin (DRDY) which informs that data 35 is ready to be read and is possible to listen on it. If used, 36 this should be active high. Prefer interrupt over this. 37 38 interrupts: 39 maxItems: 1 40 description: interrupt for DRDY pin. Triggered on rising edge. 41 42 vdd-supply: 43 description: | 44 an optional regulator that needs to be on to provide VDD power to 45 the sensor. 46 47 vid-supply: 48 description: | 49 an optional regulator that needs to be on to provide VID power to 50 the sensor. 51 52 mount-matrix: 53 description: an optional 3x3 mounting rotation matrix. 54 55 reset-gpios: 56 maxItems: 1 57 description: | 58 an optional pin needed for AK09911 to set the reset state. This should 59 be usually active low 60 61required: 62 - compatible 63 - reg 64 65additionalProperties: false 66 67examples: 68 - | 69 #include <dt-bindings/interrupt-controller/irq.h> 70 #include <dt-bindings/gpio/gpio.h> 71 i2c { 72 #address-cells = <1>; 73 #size-cells = <0>; 74 75 magnetometer@c { 76 compatible = "asahi-kasei,ak8975"; 77 reg = <0x0c>; 78 interrupt-parent = <&gpio6>; 79 interrupts = <15 IRQ_TYPE_EDGE_RISING>; 80 vdd-supply = <&ldo_3v3_gnss>; 81 reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>; 82 mount-matrix = "-0.984807753012208", /* x0 */ 83 "0", /* y0 */ 84 "-0.173648177666930", /* z0 */ 85 "0", /* x1 */ 86 "-1", /* y1 */ 87 "0", /* z1 */ 88 "-0.173648177666930", /* x2 */ 89 "0", /* y2 */ 90 "0.984807753012208"; /* z2 */ 91 }; 92 }; 93