Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml
26309 views
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
7
title: AsahiKASEI AK8975 magnetometer sensor
8
9
maintainers:
10
- Jonathan Albrieux <jonathan.albrieux@gmail.com>
11
12
properties:
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
- items:
22
# ak09918 is register compatible with ak09912.
23
- const: asahi-kasei,ak09918
24
- const: asahi-kasei,ak09912
25
- enum:
26
- ak8975
27
- ak8963
28
- ak09911
29
- ak09912
30
deprecated: true
31
32
reg:
33
maxItems: 1
34
35
gpios:
36
maxItems: 1
37
description: |
38
AK8975 has a "Data ready" pin (DRDY) which informs that data
39
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: 1
44
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 to
49
the sensor.
50
51
vid-supply:
52
description: |
53
an optional regulator that needs to be on to provide VID power to
54
the sensor.
55
56
mount-matrix:
57
description: an optional 3x3 mounting rotation matrix.
58
59
reset-gpios:
60
maxItems: 1
61
description: |
62
an optional pin needed for AK09911 to set the reset state. This should
63
be usually active low
64
65
required:
66
- compatible
67
- reg
68
69
additionalProperties: false
70
71
examples:
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
98