projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
[platform/kernel/u-boot.git]
/
drivers
/
usb
/
dwc3
/
dwc3-generic.c
diff --git
a/drivers/usb/dwc3/dwc3-generic.c
b/drivers/usb/dwc3/dwc3-generic.c
index
6cf844c
..
6e1a1d0
100644
(file)
--- 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 <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>
#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 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);
glue->regs = dev_read_addr(dev);
@@
-471,6
+483,12
@@
static int dwc3_glue_probe(struct udevice *dev)
if (ret)
return ret;
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;
ret = device_find_first_child(dev, &child);
if (ret)
return ret;