]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: dwc3: Add support for usb3-phy PHY configuration
authorMichal Simek <michal.simek@xilinx.com>
Thu, 21 Oct 2021 14:54:17 +0000 (16:54 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 6 Dec 2021 12:32:48 +0000 (13:32 +0100)
When usb3-phy label is found, PHY driver is called and serdes line is
initialized. This is preparation for serdes/psgtr driver to configure GT
lines based on description in DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/dwc3/dwc3-generic.c

index 22c01ca392b723b42f629782ef200ff1c5020b36..0a8a776b1b89ca2e219899e80eb0bfdae9783923 100644 (file)
@@ -443,6 +443,18 @@ static int dwc3_glue_probe(struct udevice *dev)
        struct udevice *child = NULL;
        int index = 0;
        int ret;
+       struct phy phy;
+
+       ret = generic_phy_get_by_name(dev, "usb3-phy", &phy);
+       if (!ret) {
+               ret = generic_phy_init(&phy);
+               if (ret)
+                       return ret;
+
+               ret = generic_phy_power_on(&phy);
+               if (ret)
+                       return ret;
+       }
 
        glue->regs = dev_read_addr(dev);