Re: [PATCH] dt-bindings: iio: magnetometer: Add MEMSIC MMC5603
From: Jonathan Cameron
Date: Sun Nov 22 2026 - 13:26:43 EST
On Sun, 22 Nov 2026 10:34:12 +0100
Gerard Marull-Paretas <gerard@xxxxxxxxxxx> wrote:
> 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.
>
> 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.
> Signed-off-by: Gerard Marull-Paretas <gerard@xxxxxxxxxxx>
> ---
>
> 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
>
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml b/Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml
> new file mode 100644
> index 000000000000..039f53a5f912
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/memsic,mmc5603.yaml
> @@ -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 <gerard@xxxxxxxxxxx>
> +
> +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";
> + };
> + };
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index a8b2b9deade4..17a32dd8772e 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -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