0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/magnetometer/yamaha,yas530.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Yamaha YAS530 family of magnetometer sensors
0008
0009 maintainers:
0010 - Linus Walleij <linus.walleij@linaro.org>
0011
0012 description:
0013 The Yamaha YAS530 magnetometers is a line of 3-axis magnetometers
0014 first introduced by Yamaha in 2009 with the YAS530. They are successors
0015 of Yamaha's first magnetometer YAS529. Over the years this magnetometer
0016 has been miniaturized and appeared in a number of different variants.
0017
0018 properties:
0019 $nodename:
0020 pattern: '^magnetometer@[0-9a-f]+$'
0021
0022 compatible:
0023 items:
0024 - enum:
0025 - yamaha,yas530
0026 - yamaha,yas532
0027 - yamaha,yas533
0028 - yamaha,yas535
0029 - yamaha,yas536
0030 - yamaha,yas537
0031 - yamaha,yas539
0032
0033 reg:
0034 maxItems: 1
0035
0036 reset-gpios:
0037 maxItems: 1
0038 description: The YAS530 sensor has a RSTN pin used to reset
0039 the logic inside the sensor. This GPIO line should connect
0040 to that pin and be marked as GPIO_ACTIVE_LOW.
0041
0042 interrupts:
0043 maxItems: 1
0044 description: Interrupt for INT pin for interrupt generation.
0045 The polarity, whether the interrupt is active on the rising
0046 or the falling edge, is software-configurable in the hardware.
0047
0048 vdd-supply:
0049 description: An optional regulator providing core power supply
0050 on the VDD pin, typically 1.8 V or 3.0 V.
0051
0052 iovdd-supply:
0053 description: An optional regulator providing I/O power supply
0054 for the I2C interface on the IOVDD pin, typically 1.8 V.
0055
0056 mount-matrix:
0057 description: An optional 3x3 mounting rotation matrix.
0058
0059 allOf:
0060 - if:
0061 not:
0062 properties:
0063 compatible:
0064 items:
0065 const: yamaha,yas530
0066 then:
0067 properties:
0068 reset-gpios: false
0069
0070 - if:
0071 properties:
0072 compatible:
0073 items:
0074 const: yamaha,yas539
0075 then:
0076 properties:
0077 interrupts: false
0078
0079 required:
0080 - compatible
0081 - reg
0082
0083 additionalProperties: false
0084
0085 examples:
0086 - |
0087 #include <dt-bindings/interrupt-controller/irq.h>
0088 #include <dt-bindings/gpio/gpio.h>
0089 i2c-0 {
0090 #address-cells = <1>;
0091 #size-cells = <0>;
0092
0093 magnetometer@2e {
0094 compatible = "yamaha,yas530";
0095 reg = <0x2e>;
0096 vdd-supply = <&ldo1_reg>;
0097 iovdd-supply = <&ldo2_reg>;
0098 reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
0099 interrupts = <13 IRQ_TYPE_EDGE_RISING>;
0100 };
0101 };
0102
0103 i2c-1 {
0104 #address-cells = <1>;
0105 #size-cells = <0>;
0106
0107 magnetometer@2e {
0108 compatible = "yamaha,yas539";
0109 reg = <0x2e>;
0110 vdd-supply = <&ldo1_reg>;
0111 };
0112 };