2021-03-17 16:15:08

by Amelie Delaunay

[permalink] [raw]
Subject: [PATCH 0/2] STM32 USBPHYC vbus-supply property support

STM32 USBPHYC provides two USB High-Speed ports which are used by controllers
with Host capabilities. That's why vbus-supply has to be supported on each
phy node.

Amelie Delaunay (2):
dt-bindings: phy: add vbus-supply optional property to
phy-stm32-usbphyc
phy: stm32: manage optional vbus regulator on phy_power_on/off

.../bindings/phy/phy-stm32-usbphyc.yaml | 3 ++
drivers/phy/st/phy-stm32-usbphyc.c | 31 +++++++++++++++++++
2 files changed, 34 insertions(+)

--
2.17.1


2021-03-17 17:21:46

by Amelie Delaunay

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: phy: add vbus-supply optional property to phy-stm32-usbphyc

This patch adds vbus-supply optional property to phy sub-nodes.
A regulator for USB VBUS may be needed for host mode.

Signed-off-by: Amelie Delaunay <[email protected]>
---
Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
index 018cc1246ee1..ad2378c30334 100644
--- a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
@@ -71,6 +71,9 @@ patternProperties:
phy-supply:
description: regulator providing 3V3 power supply to the PHY.

+ vbus-supply:
+ description: regulator providing 5V Vbus to the USB connector.
+
"#phy-cells":
enum: [ 0x0, 0x1 ]

--
2.17.1

2021-03-26 00:30:52

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: phy: add vbus-supply optional property to phy-stm32-usbphyc

On Wed, Mar 17, 2021 at 05:09:53PM +0100, Amelie Delaunay wrote:
> This patch adds vbus-supply optional property to phy sub-nodes.
> A regulator for USB VBUS may be needed for host mode.
>
> Signed-off-by: Amelie Delaunay <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
> index 018cc1246ee1..ad2378c30334 100644
> --- a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
> @@ -71,6 +71,9 @@ patternProperties:
> phy-supply:
> description: regulator providing 3V3 power supply to the PHY.
>
> + vbus-supply:
> + description: regulator providing 5V Vbus to the USB connector.

Unless Vbus is powering the phy, then this only belongs in the USB
connector node.

> +
> "#phy-cells":
> enum: [ 0x0, 0x1 ]
>
> --
> 2.17.1
>

2021-03-26 09:07:41

by Amelie Delaunay

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: phy: add vbus-supply optional property to phy-stm32-usbphyc

Hi Rob,

On 3/26/21 1:28 AM, Rob Herring wrote:
> On Wed, Mar 17, 2021 at 05:09:53PM +0100, Amelie Delaunay wrote:
>> This patch adds vbus-supply optional property to phy sub-nodes.
>> A regulator for USB VBUS may be needed for host mode.
>>
>> Signed-off-by: Amelie Delaunay <[email protected]>
>> ---
>> Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
>> index 018cc1246ee1..ad2378c30334 100644
>> --- a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
>> +++ b/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.yaml
>> @@ -71,6 +71,9 @@ patternProperties:
>> phy-supply:
>> description: regulator providing 3V3 power supply to the PHY.
>>
>> + vbus-supply:
>> + description: regulator providing 5V Vbus to the USB connector.
>
> Unless Vbus is powering the phy, then this only belongs in the USB
> connector node.
>

Do you mean I should declare a connector node as a child of the phy node
and get the vbus-supply property from this connector node ?

In case of a on-board autonomous hub between the phy and the connectors,
so no driver to drive it nor to get the vbus-supply property to provide
VBUS to the hub, then the connectors, how to use connector ?

[USB controller]===[USB PHY]===[(USB HUB)]===|> USB A connector
/ |> USB A connector
VBUS |> USB A connector
|> USB A connector

Please advise.

Regards,
Amelie

>> +
>> "#phy-cells":
>> enum: [ 0x0, 0x1 ]
>>
>> --
>> 2.17.1
>>