0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8975.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: AsahiKASEI AK8975 magnetometer sensor
0008
0009 maintainers:
0010 - Jonathan Albrieux <jonathan.albrieux@gmail.com>
0011
0012 properties:
0013 compatible:
0014 oneOf:
0015 - enum:
0016 - asahi-kasei,ak8975
0017 - asahi-kasei,ak8963
0018 - asahi-kasei,ak09911
0019 - asahi-kasei,ak09912
0020 - asahi-kasei,ak09916
0021 - enum:
0022 - ak8975
0023 - ak8963
0024 - ak09911
0025 - ak09912
0026 - ak09916
0027 deprecated: true
0028
0029 reg:
0030 maxItems: 1
0031
0032 gpios:
0033 maxItems: 1
0034 description: |
0035 AK8975 has a "Data ready" pin (DRDY) which informs that data
0036 is ready to be read and is possible to listen on it. If used,
0037 this should be active high. Prefer interrupt over this.
0038
0039 interrupts:
0040 maxItems: 1
0041 description: interrupt for DRDY pin. Triggered on rising edge.
0042
0043 vdd-supply:
0044 description: |
0045 an optional regulator that needs to be on to provide VDD power to
0046 the sensor.
0047
0048 vid-supply:
0049 description: |
0050 an optional regulator that needs to be on to provide VID power to
0051 the sensor.
0052
0053 mount-matrix:
0054 description: an optional 3x3 mounting rotation matrix.
0055
0056 reset-gpios:
0057 maxItems: 1
0058 description: |
0059 an optional pin needed for AK09911 to set the reset state. This should
0060 be usually active low
0061
0062 required:
0063 - compatible
0064 - reg
0065
0066 additionalProperties: false
0067
0068 examples:
0069 - |
0070 #include <dt-bindings/interrupt-controller/irq.h>
0071 #include <dt-bindings/gpio/gpio.h>
0072 i2c {
0073 #address-cells = <1>;
0074 #size-cells = <0>;
0075
0076 magnetometer@c {
0077 compatible = "asahi-kasei,ak8975";
0078 reg = <0x0c>;
0079 interrupt-parent = <&gpio6>;
0080 interrupts = <15 IRQ_TYPE_EDGE_RISING>;
0081 vdd-supply = <&ldo_3v3_gnss>;
0082 reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;
0083 mount-matrix = "-0.984807753012208", /* x0 */
0084 "0", /* y0 */
0085 "-0.173648177666930", /* z0 */
0086 "0", /* x1 */
0087 "-1", /* y1 */
0088 "0", /* z1 */
0089 "-0.173648177666930", /* x2 */
0090 "0", /* y2 */
0091 "0.984807753012208"; /* z2 */
0092 };
0093 };