usb: dwc3: Enable GBit Ethernet on Odroid XU4
Subsystems (2)
PATCH 1/1 usb: dwc3: Enable GBit Ethernet on Odroid XU4
Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard reset when coming from an unpatched kernel.
This was included in the original patch in
https://patchwork.kernel.org/patch/9992809/ but got dropped when accepted in d8c80bb3b55b phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800.
Old behaviour:
$ lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480MNew behaviour:
$ lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000MTested on Debian unstable using u-boot-exynos (2018.11+dfsg-2) and Linux 4.19.14.
---
Hi,
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
Cheers Jochen
drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/dwc3/core.c +2 -1
@@ -1169,7 +1169,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)dev_err (dev,"failed to initialize host\n" );return ret; } -phy_calibrate (dwc->usb2_generic_phy); +if (dwc->usb2_generic_phy) +phy_calibrate (dwc->usb2_generic_phy);break ;case USB_DR_MODE_OTG :INIT_WORK (&dwc->drd_work, __dwc3_set_mode);
hi,
Quoted 44 lines · Jochen Sprickerhof
Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard reset when coming from an unpatched kernel.
This was included in the original patch in
https://patchwork.kernel.org/patch/9992809/ but got dropped when accepted ind8c80bb3b55bphy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800.Old behaviour:
$ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480MNew behaviour:
$ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000MTested on Debian unstable using u-boot-exynos (2018.11+dfsg-2) and Linux 4.19.14.
Signed-off-by Jochen Sprickerhof <[email protected]>---
Hi,
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
Cheers Jochen
drivers/usb/dwc3/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/usb/dwc3/core.c +0
-0
drivers/usb/dwc3/core.c static int dwc3_core_init_mode(struct dwc3 *dwc) · line 1173
Quoted 6 lines
drivers/usb/dwc3/core.c +2
-1@@ -1169,7 +1169,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)dev_err (dev,"failed to initialize host\n" );return ret; } -phy_calibrate (dwc->usb2_generic_phy); +if (dwc->usb2_generic_phy) +phy_calibrate (dwc->usb2_generic_phy);
I can't see why this is necessary. What's really going on? Why is this branch helping?
Hi,
Quoted 25 lines · Jochen Sprickerhof
Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard reset when coming from an unpatched kernel.
This was included in the original patch in
https://patchwork.kernel.org/patch/9992809/ but got dropped when accepted ind8c80bb3b55bphy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800.Old behaviour:
$ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480MNew behaviour:
$ lsusb -t /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000MTested on Debian unstable using u-boot-exynos (2018.11+dfsg-2) and Linux 4.19.14.
Signed-off-by Jochen Sprickerhof <[email protected]>
Quoted 8 lines
---
Hi,
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
cheers,
-roger
Quoted 20 lines
Cheers Jochen
drivers/usb/dwc3/core.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/usb/dwc3/core.c +2
-1@@ -1169,7 +1169,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)dev_err (dev,"failed to initialize host\n" );return ret; } -phy_calibrate (dwc->usb2_generic_phy); +if (dwc->usb2_generic_phy) +phy_calibrate (dwc->usb2_generic_phy);break ;case USB_DR_MODE_OTG :INIT_WORK (&dwc->drd_work, __dwc3_set_mode);
Quoted 3 lines · Roger Quadros
Hi,
On 21/01/19 16:02, Jochen Sprickerhof wrote:
[..]
Quoted 7 lines
Quoted 4 lines
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
Only CONFIG_USB_PHY=y (I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).
Cheers Jochen
+Marek
As Vivek's and Andrzej's Samsung IDs bounced back.
Quoted 15 lines · Jochen Sprickerhof
Quoted 3 lines · Roger Quadros
Hi,
On 21/01/19 16:02, Jochen Sprickerhof wrote:
[..]
Quoted 7 lines
Quoted 4 lines
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).
Hi Roger,
Quoted 17 lines · Roger Quadros
+Marek
As Vivek's and Andrzej's Samsung IDs bounced back.
Quoted 12 lines · Jochen Sprickerhof
Quoted 3 lines · Roger Quadros
Hi,
On 21/01/19 16:02, Jochen Sprickerhof wrote:
[..]
Quoted 6 lines
Quoted 4 lines
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).
I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything.
Best regards
Hi,
Quoted 6 lines · Marek Szyprowski
Quoted 6 lines
Quoted 6 lines
Quoted 1 line · Jochen Sprickerhof
[..]
Quoted 4 lines
Quoted 4 lines
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything.
cool, thanks. So the problem is elsewhere.
Hi Marek,
Quoted 6 lines · Marek Szyprowski
Quoted 6 lines
Quoted 6 lines
Quoted 1 line · Jochen Sprickerhof
[..]
Quoted 4 lines
Quoted 4 lines
I'm not sure why this it only works with the driver compiled into the kernel nor why it needs a hard reset or why it was the line was dropped when the patch was accepted. Would be great to get some feedback of the authors.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
When XHCI driver is compiled into the kernel are the relevant PHY drivers compiled in as well?
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything.
I've just tried Linux v5.0-rc5 with the Debian config and USB_XHCI_PLATFORM=y and it works, thanks!
Is there a way to make it work with xhci compiled as a module, so it would work in Debian out of the box?
Cheers Jochen
Hi Jochen,
Quoted 24 lines · Jochen Sprickerhof
Hi Marek,
Quoted 12 lines · Marek Szyprowski
Quoted 12 lines
Quoted 12 lines
Quoted 1 line · Jochen Sprickerhof
[..]
Quoted 10 lines
Quoted 7 lines
I'm not sure why this it only works with the driver compiled into the
kernel nor why it needs a hard reset or why it was the line was dropped
when the patch was accepted. Would be great to get some feedback of the
authors.When XHCI driver is compiled into the kernel are the relevant PHY drivers
compiled in as well?Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything.
Quoted 5 lines
I've just tried Linux v5.0-rc5 with the Debian config and USB_XHCI_PLATFORM=y and it works, thanks!
Is there a way to make it work with xhci compiled as a module, so it would work in Debian out of the box?
One more comment - 5000M mode will also work with everything compiled as modules (dwc3, exynos5 drd phy and xhci-plat) too. Just make sure that xhci-plat is loaded before dwc3. This would require some manual configuration, because autoloading will load xhci-plat after dwc3 probe and switch to host mode.
Best regards
Hi Marek,
Quoted 30 lines · Marek Szyprowski
Hi Jochen,
Quoted 27 lines · Jochen Sprickerhof
Hi Marek,
Quoted 12 lines · Marek Szyprowski
Quoted 12 lines
Quoted 12 lines
Quoted 1 line · Jochen Sprickerhof
[..]
Quoted 10 lines
Quoted 7 lines
I'm not sure why this it only works with the driver compiled into the
kernel nor why it needs a hard reset or why it was the line was dropped
when the patch was accepted. Would be great to get some feedback of the
authors.When XHCI driver is compiled into the kernel are the relevant PHY drivers
compiled in as well?Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Only
CONFIG_USB_PHY=y(I took the config from the linux-image-4.19.0-1-armmp_4.19.13-1_armhf.deb Debian package as a basis where this is the default).I confirm that on Odroid XU4 USB 3.0 works only when all related drivers (dwc3, xhci and exynos5 drd phy) are compiled into the kernel. If they are compiled as modules, USB 3.0 calibration doesn't work. The mentioned patch doesn't fix anything.
I've just tried Linux v5.0-rc5 with the Debian config and USB_XHCI_PLATFORM=y and it works, thanks!
Quoted 8 lines
Quoted 2 lines
Is there a way to make it work with xhci compiled as a module, so it would work in Debian out of the box?
One more comment - 5000M mode will also work with everything compiled as modules (dwc3, exynos5 drd phy and xhci-plat) too. Just make sure that xhci-plat is loaded before dwc3. This would require some manual configuration, because autoloading will load xhci-plat after dwc3 probe and switch to host mode.
Thanks so much for the hint, this made it working :). I opened a bug with Debian:
https://bugs.debian.org/925167
Cheers Jochen