[PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor

Siratul Islam posted 2 patches 2 weeks, 3 days ago
There is a newer version of this series
[PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Siratul Islam 2 weeks, 3 days ago
Add device tree binding documentation for the STMicroelectronics
VL53L1X Time-of-Flight ranging sensor connected via I2C.

Signed-off-by: Siratul Islam <email@sirat.me>
---
 .../bindings/iio/proximity/st,vl53l0x.yaml      | 17 +++++++++++++----
 MAINTAINERS                                     |  6 ++++++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml b/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
index 322befc41de6..de09f709850d 100644
--- a/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
+++ b/Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
@@ -4,14 +4,17 @@
 $id: http://devicetree.org/schemas/iio/proximity/st,vl53l0x.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: ST VL53L0X ToF ranging sensor
+title: ST VL53L0X/VL53L1X ToF ranging sensor
 
 maintainers:
   - Song Qiang <songqiang1304521@gmail.com>
+  - Siratul Islam <email@sirat.me>
 
 properties:
   compatible:
-    const: st,vl53l0x
+    enum:
+      - st,vl53l0x
+      - st,vl53l1x
 
   reg:
     maxItems: 1
@@ -21,12 +24,17 @@ properties:
 
   reset-gpios:
     maxItems: 1
+    description:
+      Phandle to the XSHUT GPIO. Used for hardware reset.
 
-  vdd-supply: true
+  vdd-supply:
+    description:
+      Phandle to the vdd input voltage. This is physically required for operation.
 
 required:
   - compatible
   - reg
+  - vdd-supply
 
 additionalProperties: false
 
@@ -38,8 +46,9 @@ examples:
         #size-cells = <0>;
 
         proximity@29 {
-            compatible = "st,vl53l0x";
+            compatible = "st,vl53l1x";
             reg = <0x29>;
+            vdd-supply = <&reg_3v3>;
             interrupt-parent = <&gpio>;
             interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
         };
diff --git a/MAINTAINERS b/MAINTAINERS
index 61bf550fd37c..a142a97be4cb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25093,6 +25093,12 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
 F:	drivers/iio/proximity/vl53l0x-i2c.c
 
+ST VL53L1X ToF RANGER(I2C) IIO DRIVER
+M:	Siratul Islam <email@sirat.me>
+L:	linux-iio@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml
+
 STABLE BRANCH
 M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 M:	Sasha Levin <sashal@kernel.org>
-- 
2.53.0
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Krzysztof Kozlowski 2 weeks, 2 days ago
On 19/03/2026 20:07, Siratul Islam wrote:
>  
>  properties:
>    compatible:
> -    const: st,vl53l0x
> +    enum:
> +      - st,vl53l0x
> +      - st,vl53l1x
>  
>    reg:
>      maxItems: 1
> @@ -21,12 +24,17 @@ properties:
>  
>    reset-gpios:
>      maxItems: 1
> +    description:
> +      Phandle to the XSHUT GPIO. Used for hardware reset.
>  
> -  vdd-supply: true
> +  vdd-supply:
> +    description:
> +      Phandle to the vdd input voltage. This is physically required for operation.

Drop the description. Schema tells that.

>  
>  required:
>    - compatible
>    - reg
> +  - vdd-supply

That's an ABI break and nothing in commit msg explains why. You need
rationale for this, but most likely everything was working fine before,
so supply should not be required.

Best regards,
Krzysztof
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Sirat 2 weeks, 2 days ago
On Fri, Mar 20, 2026 at 6:52 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 19/03/2026 20:07, Siratul Islam wrote:
> >
> >  properties:
> >    compatible:
> > -    const: st,vl53l0x
> > +    enum:
> > +      - st,vl53l0x
> > +      - st,vl53l1x
> >
> >    reg:
> >      maxItems: 1
> > @@ -21,12 +24,17 @@ properties:
> >
> >    reset-gpios:
> >      maxItems: 1
> > +    description:
> > +      Phandle to the XSHUT GPIO. Used for hardware reset.
> >
> > -  vdd-supply: true
> > +  vdd-supply:
> > +    description:
> > +      Phandle to the vdd input voltage. This is physically required for operation.
>
> Drop the description. Schema tells that.
>
> >
> >  required:
> >    - compatible
> >    - reg
> > +  - vdd-supply
>
> That's an ABI break and nothing in commit msg explains why. You need
> rationale for this, but most likely everything was working fine before,
> so supply should not be required.
>
The vdd-supply is practically required by both the drivers depending
on this binding,
But the original driver author did not specify the requirement on the binding.
The driver works with or without the binding (it falls back to a dummy
regulator when not specified),
but specifying it makes the intent clear.

Upon discussion, Jonathan and I agreed that we make it required while
making sure that
the driver gracefully handles older DTs that omit it. If you feel this
is still not appropriate,
I'm happy to revert to optional.

Thanks,
Sirat
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Krzysztof Kozlowski 2 weeks, 1 day ago
On 20/03/2026 14:28, Sirat wrote:
> On Fri, Mar 20, 2026 at 6:52 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 19/03/2026 20:07, Siratul Islam wrote:
>>>
>>>  properties:
>>>    compatible:
>>> -    const: st,vl53l0x
>>> +    enum:
>>> +      - st,vl53l0x
>>> +      - st,vl53l1x
>>>
>>>    reg:
>>>      maxItems: 1
>>> @@ -21,12 +24,17 @@ properties:
>>>
>>>    reset-gpios:
>>>      maxItems: 1
>>> +    description:
>>> +      Phandle to the XSHUT GPIO. Used for hardware reset.
>>>
>>> -  vdd-supply: true
>>> +  vdd-supply:
>>> +    description:
>>> +      Phandle to the vdd input voltage. This is physically required for operation.
>>
>> Drop the description. Schema tells that.
>>
>>>
>>>  required:
>>>    - compatible
>>>    - reg
>>> +  - vdd-supply
>>
>> That's an ABI break and nothing in commit msg explains why. You need
>> rationale for this, but most likely everything was working fine before,
>> so supply should not be required.
>>
> The vdd-supply is practically required by both the drivers depending
> on this binding,
> But the original driver author did not specify the requirement on the binding.
> The driver works with or without the binding (it falls back to a dummy
> regulator when not specified),
> but specifying it makes the intent clear.

"That's an ABI break and nothing in commit msg explains why. "

Please don't ask me to quote it third time... See also writing-bindings
doc. You must provide rationale for ABI changes.

Best regards,
Krzysztof
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Krzysztof Kozlowski 2 weeks, 3 days ago
On 19/03/2026 20:07, Siratul Islam wrote:
> Add device tree binding documentation for the STMicroelectronics
> VL53L1X Time-of-Flight ranging sensor connected via I2C.
> 
> Signed-off-by: Siratul Islam <email@sirat.me>
> ---
>  .../bindings/iio/proximity/st,vl53l0x.yaml      | 17 +++++++++++++----
>  MAINTAINERS                                     |  6 ++++++
>  2 files changed, 19 insertions(+), 4 deletions(-)
> 

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state why and what changed.

Best regards,
Krzysztof
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Sirat 2 weeks, 2 days ago
On Fri, Mar 20, 2026 at 3:05 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 19/03/2026 20:07, Siratul Islam wrote:
> > Add device tree binding documentation for the STMicroelectronics
> > VL53L1X Time-of-Flight ranging sensor connected via I2C.
> >
> > Signed-off-by: Siratul Islam <email@sirat.me>
> > ---
> >  .../bindings/iio/proximity/st,vl53l0x.yaml      | 17 +++++++++++++----
> >  MAINTAINERS                                     |  6 ++++++
> >  2 files changed, 19 insertions(+), 4 deletions(-)
> >
>
> Please read:
> https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577
>
> If a tag was not added on purpose, please state why and what changed.
>
> Best regards,
> Krzysztof
>

Hi!

The vdd-supply requirement and the pin descriptions changed.
I was not sure if it was a substantial change or not so I did not add
the tag on purpose.

Thanks,
Sirat
Re: [PATCH v6 1/2] dt-bindings: iio: proximity: add ST VL53L1X ToF sensor
Posted by Krzysztof Kozlowski 2 weeks, 2 days ago
On 20/03/2026 13:10, Sirat wrote:
> On Fri, Mar 20, 2026 at 3:05 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 19/03/2026 20:07, Siratul Islam wrote:
>>> Add device tree binding documentation for the STMicroelectronics
>>> VL53L1X Time-of-Flight ranging sensor connected via I2C.
>>>
>>> Signed-off-by: Siratul Islam <email@sirat.me>
>>> ---
>>>  .../bindings/iio/proximity/st,vl53l0x.yaml      | 17 +++++++++++++----
>>>  MAINTAINERS                                     |  6 ++++++
>>>  2 files changed, 19 insertions(+), 4 deletions(-)
>>>
>>
>> Please read:
>> https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577
>>
>> If a tag was not added on purpose, please state why and what changed.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Hi!
> 
> The vdd-supply requirement and the pin descriptions changed.
> I was not sure if it was a substantial change or not so I did not add
> the tag on purpose.

And this must be stated clearly. I linked a document, please read it.

Best regards,
Krzysztof