]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: musb: mpfs: detect UPLI external vbus control requirement from DT
authorConor Dooley <conor.dooley@microchip.com>
Fri, 31 May 2024 07:04:32 +0000 (08:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 13:42:45 +0000 (15:42 +0200)
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>
Link: https://lore.kernel.org/r/20240531-spilt-garage-ed2113d628e8@wendy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/mpfs.c

index f0f56df3883553713a32a8883571e712937c25b1..29c7e5cdb230e0d23e86d02b482c53b522a7a98f 100644 (file)
@@ -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");