Some PCB designs don't connect the USB hub port power control GPIO and
instead make use of a host controllable regulator. Add support for this
use-case by introducing portX-vbus-supply property.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
index 4e3901efed3fcd4fbbd8cb777f9df4fcadf2ca00..ac1e5f1a5ea2e66c61ce92154385952b15e78e55 100644
--- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
+++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
@@ -49,6 +49,12 @@ patternProperties:
$ref: /schemas/usb/usb-device.yaml
additionalProperties: true
+ "^port[1-7]-vbus-supply$":
+ type: object
+ description:
+ Regulator controlling the USB VBUS on portX. Only required if the host
+ controls the portX VBUS.
+
allOf:
- $ref: usb-device.yaml#
- if:
--
2.39.5
On Thu, Aug 21, 2025 at 06:31:57PM +0200, Marco Felsch wrote: > Some PCB designs don't connect the USB hub port power control GPIO and > instead make use of a host controllable regulator. Add support for this > use-case by introducing portX-vbus-supply property. > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > --- > Documentation/devicetree/bindings/usb/microchip,usb2514.yaml | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > index 4e3901efed3fcd4fbbd8cb777f9df4fcadf2ca00..ac1e5f1a5ea2e66c61ce92154385952b15e78e55 100644 > --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > @@ -49,6 +49,12 @@ patternProperties: > $ref: /schemas/usb/usb-device.yaml > additionalProperties: true > > + "^port[1-7]-vbus-supply$": > + type: object > + description: > + Regulator controlling the USB VBUS on portX. Only required if the host > + controls the portX VBUS. Your commit msg should briefly describe status of previous discussion: why Rob's comment was not applied. Otherwise we repeat: this looks like property of specific port. The binding does not list ports now, but lists hard-wired devices, so my question is now: is this per hard-wired device or per port (even if port is hot-pluggable)? Best regards, Krzysztof
On 25-08-22, Krzysztof Kozlowski wrote: > On Thu, Aug 21, 2025 at 06:31:57PM +0200, Marco Felsch wrote: > > Some PCB designs don't connect the USB hub port power control GPIO and > > instead make use of a host controllable regulator. Add support for this > > use-case by introducing portX-vbus-supply property. > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > --- > > Documentation/devicetree/bindings/usb/microchip,usb2514.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > index 4e3901efed3fcd4fbbd8cb777f9df4fcadf2ca00..ac1e5f1a5ea2e66c61ce92154385952b15e78e55 100644 > > --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > @@ -49,6 +49,12 @@ patternProperties: > > $ref: /schemas/usb/usb-device.yaml > > additionalProperties: true > > > > + "^port[1-7]-vbus-supply$": > > + type: object > > + description: > > + Regulator controlling the USB VBUS on portX. Only required if the host > > + controls the portX VBUS. > > Your commit msg should briefly describe status of previous discussion: > why Rob's comment was not applied. Otherwise we repeat: this looks like > property of specific port. I answered Rob on my v1 but got no feedback. My v2 caused an issue found by Rob's test bot. Therefore I thought he is okay and applied the patchset for testing. At least to me it's unclear when Rob's test bot is executed. > The binding does not list ports now, but lists hard-wired devices, so my > question is now: is this per hard-wired device or per port (even if port > is hot-pluggable)? Sorry but I don't get you. The binding lists the regulators required to enable/disable the hub downstream port VBUS. These regulators are controlled by an external party e.g. the CPU instead of the USB hub itself. The connection from the CPU to the regulator which controlls the +5V usb-connector pin is hard-wired, yes. Regards, Marco
On 22/08/2025 12:30, Marco Felsch wrote: >> The binding does not list ports now, but lists hard-wired devices, so my >> question is now: is this per hard-wired device or per port (even if port >> is hot-pluggable)? > > Sorry but I don't get you. The binding lists the regulators required to > enable/disable the hub downstream port VBUS. These regulators are Is the port an external facing connector or a hard-wired USB device (please read the binding)? > controlled by an external party e.g. the CPU instead of the USB hub > itself. The connection from the CPU to the regulator which controlls the > +5V usb-connector pin is hard-wired, yes. I speak about USB devices. Best regards, Krzysztof
On 25-08-24, Krzysztof Kozlowski wrote: > On 22/08/2025 12:30, Marco Felsch wrote: > >> The binding does not list ports now, but lists hard-wired devices, so my > >> question is now: is this per hard-wired device or per port (even if port > >> is hot-pluggable)? > > > > Sorry but I don't get you. The binding lists the regulators required to > > enable/disable the hub downstream port VBUS. These regulators are > > Is the port an external facing connector or a hard-wired USB device > (please read the binding)? It's completely irrelevant isn't it? The host is in charge of enabling the VBUS supply via a dedicated GPIO (e.g. a I2C GPIO expander). If the VBUS is off, no device appear, if it is on, the device gets powered and appears within the system. If no device is plugged yet and the VBUS is enabled, the device gets enumerated immediatly. Normally the VBUS supplies are controlled by the HUB control signals, but unfortunately our design didn't used these and yes in my case it's a hard-wired device. Generally speaking I don't see how this will make a difference for hard-wired or hot-pluggable devices. Regards, Marco
On Fri, Aug 22, 2025 at 12:30:05PM +0200, Marco Felsch wrote: > On 25-08-22, Krzysztof Kozlowski wrote: > > On Thu, Aug 21, 2025 at 06:31:57PM +0200, Marco Felsch wrote: > > > Some PCB designs don't connect the USB hub port power control GPIO and > > > instead make use of a host controllable regulator. Add support for this > > > use-case by introducing portX-vbus-supply property. > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > --- > > > Documentation/devicetree/bindings/usb/microchip,usb2514.yaml | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > index 4e3901efed3fcd4fbbd8cb777f9df4fcadf2ca00..ac1e5f1a5ea2e66c61ce92154385952b15e78e55 100644 > > > --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > @@ -49,6 +49,12 @@ patternProperties: > > > $ref: /schemas/usb/usb-device.yaml > > > additionalProperties: true > > > > > > + "^port[1-7]-vbus-supply$": > > > + type: object > > > + description: > > > + Regulator controlling the USB VBUS on portX. Only required if the host > > > + controls the portX VBUS. > > > > Your commit msg should briefly describe status of previous discussion: > > why Rob's comment was not applied. Otherwise we repeat: this looks like > > property of specific port. > > I answered Rob on my v1 but got no feedback. I just read it and don't understand. You don't have to have all properties for a driver in the node associated with the driver. The driver can freely look in the child nodes or anywhere else in the whole tree if needed. Is that what you meant? For USB hubs we generally define child nodes for each port. Some of the hub bindings don't because they are incomplete. If you have a per port property, then the DT property belongs in the port's node. > My v2 caused an issue found > by Rob's test bot. Therefore I thought he is okay and applied the > patchset for testing. Other way around. If it doesn't pass tests, I don't look at it. (Well, I do, but don't expect a reply.) > At least to me it's unclear when Rob's test bot is executed. When you submit something. It's all automatic, though sometimes the emails are delayed. Results are always in PW within 1-2 hours (unless someone patch bombs us with a large series). > > > The binding does not list ports now, but lists hard-wired devices, so my > > question is now: is this per hard-wired device or per port (even if port > > is hot-pluggable)? > > Sorry but I don't get you. The binding lists the regulators required to > enable/disable the hub downstream port VBUS. These regulators are > controlled by an external party e.g. the CPU instead of the USB hub > itself. The connection from the CPU to the regulator which controlls the > +5V usb-connector pin is hard-wired, yes. > > Regards, > Marco
On 25-08-22, Rob Herring wrote: > On Fri, Aug 22, 2025 at 12:30:05PM +0200, Marco Felsch wrote: > > On 25-08-22, Krzysztof Kozlowski wrote: > > > On Thu, Aug 21, 2025 at 06:31:57PM +0200, Marco Felsch wrote: > > > > Some PCB designs don't connect the USB hub port power control GPIO and > > > > instead make use of a host controllable regulator. Add support for this > > > > use-case by introducing portX-vbus-supply property. > > > > > > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > > > > --- > > > > Documentation/devicetree/bindings/usb/microchip,usb2514.yaml | 6 ++++++ > > > > 1 file changed, 6 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > > index 4e3901efed3fcd4fbbd8cb777f9df4fcadf2ca00..ac1e5f1a5ea2e66c61ce92154385952b15e78e55 100644 > > > > --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > > +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml > > > > @@ -49,6 +49,12 @@ patternProperties: > > > > $ref: /schemas/usb/usb-device.yaml > > > > additionalProperties: true > > > > > > > > + "^port[1-7]-vbus-supply$": > > > > + type: object > > > > + description: > > > > + Regulator controlling the USB VBUS on portX. Only required if the host > > > > + controls the portX VBUS. > > > > > > Your commit msg should briefly describe status of previous discussion: > > > why Rob's comment was not applied. Otherwise we repeat: this looks like > > > property of specific port. > > > > I answered Rob on my v1 but got no feedback. > > I just read it and don't understand. You don't have to have all > properties for a driver in the node associated with the driver. The > driver can freely look in the child nodes or anywhere else in the whole > tree if needed. Is that what you meant? > > For USB hubs we generally define child nodes for each port. Some of the > hub bindings don't because they are incomplete. If you have a per port > property, then the DT property belongs in the port's node. The problem was, that the regulator API didn't supported to search for regulators which don't belong to its own DT node. I wasn't sure if this is intented or not. Now I see that, the regulator API gained the support for this use-case else I would have pinged Mark if we need to add support for it. I will change the "vbus-supply" to be specified within the port DT nodes. > > My v2 caused an issue found > > by Rob's test bot. Therefore I thought he is okay and applied the > > patchset for testing. > > Other way around. If it doesn't pass tests, I don't look at it. (Well, I > do, but don't expect a reply.) Okay, thanks for the clarification. > > At least to me it's unclear when Rob's test bot is executed. > > When you submit something. It's all automatic, though sometimes the > emails are delayed. Results are always in PW within 1-2 hours (unless > someone patch bombs us with a large series). Thanks. Regards, Marco
© 2016 - 2025 Red Hat, Inc.