Yamaha YAS530 family of magnetometer sensors
Schema identifier ($id): "http://devicetree.org/schemas/iio/magnetometer/yamaha,yas530.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"
The Yamaha YAS530 magnetometers is a line of 3-axis magnetometers first introduced by Yamaha in 2009 with the YAS530. They are successors of Yamaha's first magnetometer YAS529. Over the years this magnetometer has been miniaturized and appeared in a number of different variants.
Properties and child nodes (properties) #
$nodename — not listed as required here #
String pattern (pattern): "^magnetometer@[0-9a-f]+$"
compatible — required here #
Array item rules (items) #
Item 1
Allowed values (
enum):"yamaha,yas530","yamaha,yas532","yamaha,yas533","yamaha,yas535","yamaha,yas536","yamaha,yas537","yamaha,yas539"
reg — required here #
Maximum number of items (maxItems): 1
reset-gpios — not listed as required here #
Maximum number of items (maxItems): 1
The YAS530 sensor has a RSTN pin used to reset the logic inside the sensor. This GPIO line should connect to that pin and be marked as GPIO_ACTIVE_LOW.
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
Interrupt for INT pin for interrupt generation. The polarity, whether the interrupt is active on the rising or the falling edge, is software-configurable in the hardware.
vdd-supply — not listed as required here #
An optional regulator providing core power supply on the VDD pin, typically 1.8 V or 3.0 V.
iovdd-supply — not listed as required here #
An optional regulator providing I/O power supply for the I2C interface on the IOVDD pin, typically 1.8 V.
mount-matrix — not listed as required here #
An optional 3x3 mounting rotation matrix.
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereArray item rules (
items)Exact value (
const):"yamaha,yas530"When the condition matches (
then) #Properties and child nodes (
properties)
reset-gpios— not listed as required here
false— Not permitted by this property rule.
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereArray item rules (
items)Exact value (
const):"yamaha,yas539"When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required here
false— Not permitted by this property rule.
Required in this object (required): "compatible", "reg"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
i2c-0 {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@2e {
compatible = "yamaha,yas530";
reg = <0x2e>;
vdd-supply = <&ldo1_reg>;
iovdd-supply = <&ldo2_reg>;
reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
interrupts = <13 IRQ_TYPE_EDGE_RISING>;
};
};
i2c-1 {
#address-cells = <1>;
#size-cells = <0>;
magnetometer@2e {
compatible = "yamaha,yas539";
reg = <0x2e>;
vdd-supply = <&ldo1_reg>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)