[PATCH v2 1/3] dt-bindings: usb: usb251xb: make reg optional for no I2C ctrl use case

Jisheng Zhang posted 2 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v2 1/3] dt-bindings: usb: usb251xb: make reg optional for no I2C ctrl use case
Posted by Jisheng Zhang 1 month, 2 weeks ago
Make "reg" optional to allow the driver to be used to manage GPIO
based control of the device.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 Documentation/devicetree/bindings/usb/usb251xb.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/usb251xb.yaml b/Documentation/devicetree/bindings/usb/usb251xb.yaml
index ac5b99710332..4b676c010f3e 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml
@@ -240,7 +240,6 @@ additionalProperties: false
 
 required:
   - compatible
-  - reg
 
 examples:
   - |
-- 
2.50.0
Re: [PATCH v2 1/3] dt-bindings: usb: usb251xb: make reg optional for no I2C ctrl use case
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On Tue, Aug 19, 2025 at 08:22:15AM +0800, Jisheng Zhang wrote:
> Make "reg" optional to allow the driver to be used to manage GPIO
> based control of the device.

I don't understand how optional reg allows or disallows anything for the
driver. It's really not relevant to GPIO at all.

Also feels wrong, but maybe you just lack proper, reasonable
justification. Just explain carefully the hardware, not drivers.

Best regards,
Krzysztof
Re: [PATCH v2 1/3] dt-bindings: usb: usb251xb: make reg optional for no I2C ctrl use case
Posted by Jisheng Zhang 1 month, 2 weeks ago
On Tue, Aug 19, 2025 at 11:22:51AM +0200, Krzysztof Kozlowski wrote:
> On Tue, Aug 19, 2025 at 08:22:15AM +0800, Jisheng Zhang wrote:
> > Make "reg" optional to allow the driver to be used to manage GPIO
> > based control of the device.
> 
> I don't understand how optional reg allows or disallows anything for the
> driver. It's really not relevant to GPIO at all.

w/o this patch, then there will be DT check complains for the following
usb251xb usage:

usb-hub {
	compatible = "microchip,usb2512b";
	reset-gpios = <&porta 2 GPIO_ACTIVE_LOW>;
};


> 
> Also feels wrong, but maybe you just lack proper, reasonable
> justification. Just explain carefully the hardware, not drivers.

It's simple, the hub allows usage w/o connecting to any i2c, see above
example for reference. But current dt-binding make the reg required.

Regards.