2023-02-15 09:32:41

by Mehta, Piyush

[permalink] [raw]
Subject: [PATCH 0/2] usb: dwc3: core: add external vBus supply support for ulpi phy

Some ULPI USB PHY does not support internal VBUS supply, they worked on
with an external supply. To support the external vBus supply for ULPI PHY,
added 'snps,ulpi-ext-vbus-drv' quirk and based on quirk configure the ULPI
PHY in the phy configuration setup.
---
Reference for dwc3 register data-base Link: GUSB2PHYCFG (USB3_XHCI) Register [:ULPIEXTVBUSDRV]
https://www.xilinx.com/htmldocs/registers/ug1087/ug1087-zynq-ultrascale-registers.html
---
Piyush Mehta (2):
dt-bindings: usb: dwc3: Add snps,ulpi-ext-vbus-drv quirk
usb: dwc3: core: add external vBus supply support for ulpi phy

Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 8 ++++++++
drivers/usb/dwc3/core.c | 12 ++++++++++++
drivers/usb/dwc3/core.h | 4 ++++
3 files changed, 24 insertions(+)

--
2.17.1



2023-02-15 09:32:44

by Mehta, Piyush

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: usb: dwc3: Add snps,ulpi-ext-vbus-drv quirk

Some ULPI USB PHYs do not support an internal vBus supply, to drive the
CPEN pin properly, it requires configuration of the ULPI DRVVBUSEXTERNAL
bit of the USB ULPI PHY OTG_CTRL register.

Added 'snps,ulpi-ext-vbus-drv' DT property to configure the USB2 PHY to
drives VBUS with an external supply.

When the ULPIEXTVBUSDRV bit is set to '1' in the Global USB2 PHY
Configuration registers, PHY drive vBus with an external 5V supply source.

Signed-off-by: Piyush Mehta <[email protected]>
---
Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
index 6d78048c4613..4e4a2dfb77b1 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
@@ -246,6 +246,14 @@ properties:
of resume. This option is to support certain legacy ULPI PHYs.
type: boolean

+ snps,ulpi-ext-vbus-drv:
+ description:
+ Some ULPI USB PHY does not support internal VBUS supply, and driving
+ the CPEN pin, requires the configuration of the ulpi DRVVBUSEXTERNAL
+ bit. When set, the xhci host will configure the USB2 PHY drives VBUS
+ with an external supply.
+ type: boolean
+
snps,is-utmi-l1-suspend:
description:
True when DWC3 asserts output signal utmi_l1_suspend_n, false when
--
2.17.1


2023-02-16 09:20:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: usb: dwc3: Add snps,ulpi-ext-vbus-drv quirk

On 15/02/2023 10:31, Piyush Mehta wrote:
> Some ULPI USB PHYs do not support an internal vBus supply, to drive the
> CPEN pin properly, it requires configuration of the ULPI DRVVBUSEXTERNAL
> bit of the USB ULPI PHY OTG_CTRL register.
>
> Added 'snps,ulpi-ext-vbus-drv' DT property to configure the USB2 PHY to
> drives VBUS with an external supply.
>
> When the ULPIEXTVBUSDRV bit is set to '1' in the Global USB2 PHY
> Configuration registers, PHY drive vBus with an external 5V supply source.
>
> Signed-off-by: Piyush Mehta <[email protected]>
> ---


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof