dt-bindings: iio: magnetometer: Add MEMSIC MMC5603
Subsystems (2)
PATCH 1/1 dt-bindings: iio: magnetometer: Add MEMSIC MMC5603
The MMC5603NJ is listed in trivial-devices.yaml, which allows no properties besides the register address and interrupts. Boards need to describe how the sensor is oriented, and the supply it runs from, which is often switched on wearables.
Give it a binding of its own with a mount-matrix and its single VDD supply, the package having no separate I/O supply pin.
---
Notes:
Checked with dtschema 2026.9: the steps of dt_binding_check run by hand (host make too old), yamllint and dt-check-style --mode=strict.
.../iio/magnetometer/memsic,mmc5603.yaml | 45 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml
Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/memsic,mmc5603.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MEMSIC MMC5603NJ 3-axis magnetic sensor + +maintainers: + - Gerard Marull-Paretas <[email protected]> + +properties: + compatible: + const: memsic,mmc5603 + + reg: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor + + mount-matrix: + description: an optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@30 { + compatible = "memsic,mmc5603"; + reg = <0x30>; + vdd-supply = <&vdd_1v8_reg>; + mount-matrix = "-1", "0", "0", + "0", "1", "0", + "0", "0", "-1"; + }; + };
Documentation/devicetree/bindings/trivial-devices.yaml +0 -2
@@ -261,8 +261,6 @@ properties: - meas,tsys01 # MEMSIC magnetometer - memsic,mmc35240 - # MEMSIC 3-axis magnetometer - - memsic,mmc5603 # MEMSIC 3-axis magnetometer (Support I3C HDR) - memsic,mmc5633 # MEMSIC 3-axis accelerometer
base-commit: c44104f3642da720164042623e4832836aefdd8e
Signature · 1 line
2.45.2
Jonathan Cameron
maintainerQuoted 4 lines · On Sun, 22 Nov 2026 10:34:12 +0100 Gerard Marull-Paretas <[email protected]>…
The MMC5603NJ is listed in
trivial-devices.yaml, which allows no properties besides the register address and interrupts. Boards need to describe how the sensor is oriented, and the supply it runs from, which is often switched on wearables.
Why this part but not the mmc5633 that is in the same driver so I assume similar enough to cover with this binding?
That part is a little more complex because it can also be connected over i3c but I'd still expect them in the same binding doc.
Quoted 4 lines
Give it a binding of its own with a mount-matrix and its single VDD supply, the package having no separate I/O supply pin.
I'm not seeing support in the driver for mount matrix or supply. Normally if the argument is to move it out of trivial devices because it needs those I'd expect to see it as part of a series adding that support.
Or do you care about this for a non Linux usecase?
Also no need to talk about what it doesn't have.
Quoted 77 lines
Signed-off-by Gerard Marull-Paretas <[email protected]>---
Notes:
Checked with dtschema 2026.9: the steps ofdt_binding_checkrun by hand (host make too old), yamllint and dt-check-style --mode=strict..../iio/magnetometer/memsic,mmc5603.yaml | 45 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yamlDocumentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml new file +45
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/memsic,mmc5603.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MEMSIC MMC5603NJ 3-axis magnetic sensor + +maintainers: + - Gerard Marull-Paretas <[email protected]> + +properties: + compatible: + const: memsic,mmc5603 + + reg: + maxItems: 1 + + vdd-supply: + description: Regulator that provides power to the sensor + + mount-matrix: + description: an optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@30 { + compatible = "memsic,mmc5603"; + reg = <0x30>; + vdd-supply = <&vdd_1v8_reg>; + mount-matrix = "-1", "0", "0", + "0", "1", "0", + "0", "0", "-1"; + }; + };Documentation/devicetree/bindings/trivial-devices.yaml +0
-2@@ -261,8 +261,6 @@ properties: - meas,tsys01 # MEMSIC magnetometer - memsic,mmc35240 - # MEMSIC 3-axis magnetometer - - memsic,mmc5603 # MEMSIC 3-axis magnetometer (Support I3C HDR) - memsic,mmc5633 # MEMSIC 3-axis accelerometerbase-commit:
c44104f3642da720164042623e4832836aefdd8e