* [PATCH v1 0/2] external ulpi vbus control
@ 2024-05-31 7:04 Conor Dooley
2024-05-31 7:04 ` [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support Conor Dooley
2024-05-31 7:04 ` [PATCH v1 2/2] usb: musb: mpfs: detect UPLI external vbus control requirement from DT Conor Dooley
0 siblings, 2 replies; 4+ messages in thread
From: Conor Dooley @ 2024-05-31 7:04 UTC (permalink / raw)
To: linux-usb
Cc: conor, conor.dooley, Daire McNamara, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Bin Liu, linux-riscv,
devicetree, linux-kernel
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.
CC: Conor Dooley <conor.dooley@microchip.com>
CC: Daire McNamara <daire.mcnamara@microchip.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
CC: Bin Liu <b-liu@ti.com>
CC: linux-riscv@lists.infradead.org
CC: linux-usb@vger.kernel.org
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
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(+)
--
2.43.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support
2024-05-31 7:04 [PATCH v1 0/2] external ulpi vbus control Conor Dooley
@ 2024-05-31 7:04 ` Conor Dooley
2024-06-01 15:52 ` Krzysztof Kozlowski
2024-05-31 7:04 ` [PATCH v1 2/2] usb: musb: mpfs: detect UPLI external vbus control requirement from DT Conor Dooley
1 sibling, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2024-05-31 7:04 UTC (permalink / raw)
To: linux-usb
Cc: conor, conor.dooley, Daire McNamara, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Bin Liu, linux-riscv,
devicetree, linux-kernel
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 <conor.dooley@microchip.com>
---
.../devicetree/bindings/usb/microchip,mpfs-musb.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml b/Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
index c5e9ce2e7bc2a..27b909de49922 100644
--- a/Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
+++ b/Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
@@ -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
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] usb: musb: mpfs: detect UPLI external vbus control requirement from DT
2024-05-31 7:04 [PATCH v1 0/2] external ulpi vbus control Conor Dooley
2024-05-31 7:04 ` [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support Conor Dooley
@ 2024-05-31 7:04 ` Conor Dooley
1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-05-31 7:04 UTC (permalink / raw)
To: linux-usb
Cc: conor, conor.dooley, Daire McNamara, Greg Kroah-Hartman,
Rob Herring, Krzysztof Kozlowski, Bin Liu, linux-riscv,
devicetree, linux-kernel
The 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.
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
drivers/usb/musb/mpfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c
index f0f56df388355..29c7e5cdb230e 100644
--- a/drivers/usb/musb/mpfs.c
+++ b/drivers/usb/musb/mpfs.c
@@ -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");
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support
2024-05-31 7:04 ` [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support Conor Dooley
@ 2024-06-01 15:52 ` Krzysztof Kozlowski
0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-01 15:52 UTC (permalink / raw)
To: Conor Dooley, linux-usb
Cc: conor, Daire McNamara, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Bin Liu, linux-riscv, devicetree,
linux-kernel
On 31/05/2024 09:04, Conor Dooley wrote:
> 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 <conor.dooley@microchip.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-01 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 7:04 [PATCH v1 0/2] external ulpi vbus control Conor Dooley
2024-05-31 7:04 ` [PATCH v1 1/2] dt-bindings: musb: mpfs: add ULPI external vbus support Conor Dooley
2024-06-01 15:52 ` Krzysztof Kozlowski
2024-05-31 7:04 ` [PATCH v1 2/2] usb: musb: mpfs: detect UPLI external vbus control requirement from DT Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox