summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/dwc3-generic.c38
-rw-r--r--drivers/usb/gadget/Kconfig3
2 files changed, 22 insertions, 19 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index acbf7acb19..66da5a8d6f 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -40,7 +40,7 @@ struct dwc3_generic_priv {
void *base;
struct dwc3 dwc3;
struct phy_bulk phys;
- struct gpio_desc ulpi_reset;
+ struct gpio_desc *ulpi_reset;
};
struct dwc3_generic_host_priv {
@@ -104,23 +104,23 @@ static int dwc3_generic_probe(struct udevice *dev,
if (CONFIG_IS_ENABLED(DM_GPIO) &&
device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
- rc = gpio_request_by_name(dev->parent, "reset-gpios", 0,
- &priv->ulpi_reset, GPIOD_ACTIVE_LOW);
- if (rc)
- return rc;
-
- /* Toggle ulpi to reset the phy. */
- rc = dm_gpio_set_value(&priv->ulpi_reset, 1);
- if (rc)
- return rc;
-
- mdelay(5);
-
- rc = dm_gpio_set_value(&priv->ulpi_reset, 0);
- if (rc)
- return rc;
-
- mdelay(5);
+ priv->ulpi_reset = devm_gpiod_get_optional(dev->parent, "reset",
+ GPIOD_ACTIVE_LOW);
+ /* property is optional, don't return error! */
+ if (priv->ulpi_reset) {
+ /* Toggle ulpi to reset the phy. */
+ rc = dm_gpio_set_value(priv->ulpi_reset, 1);
+ if (rc)
+ return rc;
+
+ mdelay(5);
+
+ rc = dm_gpio_set_value(priv->ulpi_reset, 0);
+ if (rc)
+ return rc;
+
+ mdelay(5);
+ }
}
if (device_is_compatible(dev->parent, "rockchip,rk3399-dwc3"))
@@ -146,7 +146,7 @@ static int dwc3_generic_remove(struct udevice *dev,
if (CONFIG_IS_ENABLED(DM_GPIO) &&
device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
- struct gpio_desc *ulpi_reset = &priv->ulpi_reset;
+ struct gpio_desc *ulpi_reset = priv->ulpi_reset;
dm_gpio_free(ulpi_reset->dev, ulpi_reset);
}
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index e120efeb00..941f97c96d 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -40,6 +40,7 @@ if USB_GADGET
config USB_GADGET_MANUFACTURER
string "Vendor name of the USB device"
+ default "NVIDIA" if ARCH_TEGRA
default "Allwinner Technology" if ARCH_SUNXI
default "Rockchip" if ARCH_ROCKCHIP
default "U-Boot"
@@ -49,6 +50,7 @@ config USB_GADGET_MANUFACTURER
config USB_GADGET_VENDOR_NUM
hex "Vendor ID of the USB device"
+ default 0x0955 if ARCH_TEGRA
default 0x1f3a if ARCH_SUNXI
default 0x2207 if ARCH_ROCKCHIP
default 0x0
@@ -59,6 +61,7 @@ config USB_GADGET_VENDOR_NUM
config USB_GADGET_PRODUCT_NUM
hex "Product ID of the USB device"
+ default 0x701a if ARCH_TEGRA
default 0x1010 if ARCH_SUNXI
default 0x310a if ROCKCHIP_RK3036
default 0x300a if ROCKCHIP_RK3066