xref: /linux/Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5983.yaml (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/magnetometer/memsic,mmc5983.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: MEMSIC MMC5983MA 3-axis magnetic sensor
8
9maintainers:
10  - Vladislav Kulikov <vlad.kulikov.c@gmail.com>
11
12properties:
13  compatible:
14    const: memsic,mmc5983
15
16  reg:
17    maxItems: 1
18
19  interrupts:
20    maxItems: 1
21
22  vdd-supply:
23    description: Regulator that provides power to the sensor
24
25  vddio-supply:
26    description: Regulator that provides power to the digital interface and INT pin
27
28required:
29  - compatible
30  - reg
31  - vdd-supply
32
33allOf:
34  - $ref: /schemas/spi/spi-peripheral-props.yaml#
35
36unevaluatedProperties: false
37
38examples:
39  - |
40    i2c {
41        #address-cells = <1>;
42        #size-cells = <0>;
43
44        magnetometer@30 {
45            compatible = "memsic,mmc5983";
46            reg = <0x30>;
47            vdd-supply = <&vdd_3v3_reg>;
48            vddio-supply = <&vdd_3v3_reg>;
49        };
50    };
51  - |
52    spi {
53        #address-cells = <1>;
54        #size-cells = <0>;
55
56        magnetometer@0 {
57            compatible = "memsic,mmc5983";
58            reg = <0>;
59            spi-max-frequency = <10000000>;
60            vdd-supply = <&vdd_3v3_reg>;
61            vddio-supply = <&vdd_3v3_reg>;
62        };
63    };
64