From 570eaadac05c131288335248e4611e663b85c278 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 4 Mar 2022 16:59:02 -0600 Subject: usb: gadget: ci: Make various ops const ci_udc_ops and ci_ep_ops do not change their operations. Mark them as const. Signed-off-by: Adam Ford --- drivers/usb/gadget/ci_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 542684c..d9a89a1 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, -- cgit v1.1 From e81782ab883552dd48f5109ba41327b879a92498 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 9 Mar 2022 10:05:44 +0100 Subject: generic-phy: s/CONFIG_PHY/CONFIG_IS_ENABLED(PHY)/ Allow to disable PHY driver in SPL because it checks the CONFIG_SPL_PHY variable for SPL builds. The same change was done for usb by commit fd09c205fc57 ("usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/"). Signed-off-by: Michal Simek --- include/generic-phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/generic-phy.h b/include/generic-phy.h index ff48b37..d40ce58 100644 --- a/include/generic-phy.h +++ b/include/generic-phy.h @@ -155,7 +155,7 @@ struct phy_bulk { unsigned int count; }; -#ifdef CONFIG_PHY +#if CONFIG_IS_ENABLED(PHY) /** * generic_phy_init() - initialize the PHY port -- cgit v1.1 From 142d50fbce7c364a74f5e8204dba491b9f066e6c Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 9 Mar 2022 10:05:45 +0100 Subject: usb: dwc3: Add support for usb3-phy PHY configuration 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 --- drivers/usb/dwc3/dwc3-generic.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 01bd0ca..2c5205d 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -409,6 +410,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); @@ -420,6 +432,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; -- cgit v1.1 From 6674d2d9fe563258fdc89b25eb46cccdb388b678 Mon Sep 17 00:00:00 2001 From: Oleksii Titov Date: Wed, 20 Apr 2022 11:23:25 +0300 Subject: Add support for TP-Link UE200 dongle Reviewed-by: Ramon Fried Signed-off-by: Oleksii Titov --- drivers/usb/eth/r8152.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c index d21fc68..1aaa5a7 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) }, -- cgit v1.1