external ulpi vbus control
Subsystems (5)
Conor Dooley
maintainercover external ulpi vbus control
A customer sent me a patch adding a dt property to enable external vbus control as their phy didn't support it*. I was surprised to see that none of the other musb drivers made any use of this, but there is handling in the musb core for it - made me feel like I was missing something as to why it was not used by other drivers.
I've vendor prefixed the property for now, but I figure there may well be a bunch of other potential users since this isn't just an musb thing, given that there's a snps,ulpi-ext-vbus-drv used by an xHCI IP.
This is my third attempt to send these patches. I cannot find them on lore from either of my previous attempts, so I'm gonna treat this as v1. I think must've tried to send it from my kernel.org account from Microchip's corp network and that failed. Either way, apologies if this is #3 you've got from me..
* they didn't want to be identified, but said it was okay to post.
Conor Dooley (2):
dt-bindings: musb: mpfs: add ULPI external vbus support
usb: musb: mpfs: detect UPLI external vbus control requirement from DT
.../devicetree/bindings/usb/microchip,mpfs-musb.yaml | 7 +++++++ drivers/usb/musb/mpfs.c | 2 ++ 2 files changed, 9 insertions(+)
Signature · 1 line
2.43.2
Conor Dooley
maintainerPATCH 1/2 dt-bindings: musb: mpfs: add ULPI external vbus support
Add a property to allow configuring the musb controller on PolarFire SoC to use an external vbus for ULPI PHYs.
--- .../devicetree/bindings/usb/microchip,mpfs-musb.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml +7 -0
@@ -34,6 +34,13 @@ properties: clocks: maxItems: 1 + microchip,ext-vbus-drv: + description: + Some ULPI USB PHYs do not support an internal VBUS supply and driving + the CPEN pin requires the configuration of the UPLI_USE__EXTVBUS + bit in ULPI_BUSCONTROL. + $ref: /schemas/types.yaml#/definitions/flag + required: - compatible - reg
Signature · 1 line
2.43.2
Re: [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support
Quoted 5 lines · Conor Dooley
Add a property to allow configuring the musb controller on PolarFire SoC to use an external vbus for ULPI PHYs.
Signed-off-by Conor Dooley <[email protected]>---
Best regards,
Krzysztof
Conor Dooley
maintainerPATCH 2/2 usb: musb: mpfs: detect UPLI external vbus control requirement from DT
In reply to Conor DooleyThe musb driver core already supports external vbus control for ULPI PHYs, but none of the drivers actually enable it. A customer reported needing this for their device, and now that a DT property for detecting this configuration exists, read the property to enable the feature.
--- drivers/usb/musb/mpfs.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/musb/mpfs.c +2 -0
@@ -190,6 +190,8 @@ static int mpfs_probe(struct platform_device *pdev) pdata->config = &mpfs_musb_hdrc_config; pdata->platform_ops = &mpfs_ops; + pdata->extvbus =device_property_read_bool (dev,"microchip,ext-vbus-drv" ); + pdata->mode =usb_get_dr_mode (dev);if (pdata->mode ==USB_DR_MODE_UNKNOWN ) {dev_info (dev,"No dr_mode property found, defaulting to otg\n" );
Signature · 1 line
2.43.2