diff options
author | Tom Rini | 2022-04-22 11:06:31 -0400 |
---|---|---|
committer | Tom Rini | 2022-04-22 11:06:31 -0400 |
commit | 6d73175b1f407fefc6c5a0b81ac30c6b18bcc191 (patch) | |
tree | 73bba002759e8d1455dbff1f96eb6f22d8b5f3cc /drivers | |
parent | bfdb30559c763b74199666dfb20e1d9f207b917a (diff) | |
parent | 6674d2d9fe563258fdc89b25eb46cccdb388b678 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 18 | ||||
-rw-r--r-- | drivers/usb/eth/r8152.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/ci_udc.c | 4 |
3 files changed, 22 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 6cf844cb483..6e1a1d066b4 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -14,6 +14,7 @@ #include <dm/device-internal.h> #include <dm/lists.h> #include <dwc3-uboot.h> +#include <generic-phy.h> #include <linux/bitops.h> #include <linux/delay.h> #include <linux/usb/ch9.h> @@ -460,6 +461,17 @@ 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; + } else if (ret != -ENOENT) { + debug("could not get phy (err %d)\n", ret); + return ret; + } glue->regs = dev_read_addr(dev); @@ -471,6 +483,12 @@ static int dwc3_glue_probe(struct udevice *dev) if (ret) return ret; + if (phy.dev) { + ret = generic_phy_power_on(&phy); + if (ret) + return ret; + } + ret = device_find_first_child(dev, &child); if (ret) return ret; diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c index d21fc682b03..1aaa5a79b3f 100644 --- a/drivers/usb/eth/r8152.c +++ b/drivers/usb/eth/r8152.c @@ -48,6 +48,7 @@ static const struct r8152_dongle r8152_dongles[] = { /* TP-LINK */ { 0x2357, 0x0601 }, + { 0x2357, 0x0602 }, /* Nvidia */ { 0x0955, 0x09ff }, @@ -1885,6 +1886,7 @@ static const struct usb_device_id r8152_eth_id_table[] = { /* TP-LINK */ { USB_DEVICE(0x2357, 0x0601) }, + { USB_DEVICE(0x2357, 0x0602) }, /* Nvidia */ { USB_DEVICE(0x0955, 0x09ff) }, diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 542684c1c30..d9a89a17b27 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -94,11 +94,11 @@ static struct usb_request * ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags); static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *_req); -static struct usb_gadget_ops ci_udc_ops = { +static const struct usb_gadget_ops ci_udc_ops = { .pullup = ci_pullup, }; -static struct usb_ep_ops ci_ep_ops = { +static const struct usb_ep_ops ci_ep_ops = { .enable = ci_ep_enable, .disable = ci_ep_disable, .queue = ci_ep_queue, |