mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: magnetometer: Add MEMSIC MMC5603
@ 2026-11-22  9:34 Gerard Marull-Paretas
  2026-11-22 18:26 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Gerard Marull-Paretas @ 2026-11-22  9:34 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: David Lechner, Nuno Sá,
	Andy Shevchenko, linux-iio, devicetree, linux-kernel

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.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
---

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@teslabs.com>
+
+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
-- 
2.45.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-22 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22  9:34 [PATCH] dt-bindings: iio: magnetometer: Add MEMSIC MMC5603 Gerard Marull-Paretas
2026-11-22 18:26 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®