Re: [PATCH 1/2] dt-bindings: iio: magnetometer: add QST QMC6308

From: Siratul Islam

Date: Wed Jul 15 2026 - 14:33:41 EST


On Tue, 2026-07-14 at 22:28 +0200, Jorijn van der Graaf wrote:
> Add device tree bindings for the QST QMC6308, a 3-axis AMR
> magnetometer. It is an I2C device in a 4-pin WLCSP package with a
> single supply and no interrupt pin, at I2C address 0x2c.
>
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@xxxxxxxxxxxxx>
> ---
>
...
> +properties:
> +  compatible:
> +    enum:
> +      - qstcorp,qmc6308
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply: true
> +
> +  mount-matrix: true
You could add this prop to the existing QMC5883l binding. See the comment below.
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +
I usually don't bother with bindings. But here I have some thoughts.
You could reuse the QMC5883L binding. As for the device lacking both 
interrupt and vddio pins, you could exclude them like


allOf:
- if:
properties:
compatible:
contains:
const: qstcorp,qmc6308
then:
properties:
interrupts: false
vddio-supply: false

But you would also need to remove the global required vddio-supply and make it required for qmc5883l.
Or flip the logic of allOf. Considering a lot of the magnetometer bindings look very similar anyway, 
I'm not sure if it's worth combining them. Maybe Jonathan or DT maintainers would have a better opinion.


> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        magnetometer@2c {
> +            compatible = "qstcorp,qmc6308";
> +            reg = <0x2c>;
> +            vdd-supply = <&vdd_1v8_reg>;
> +        };
> +    };
>
--
Best regards,
Sirat