2016-10-04 06:02:29

by Vivek Gautam

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Michael,


On Tue, Aug 30, 2016 at 10:32 AM, Anand Moon <[email protected]> wrote:
> Hi All
>
> Adding Vivek Gautam.

Sorry for missing out this conversation. I am no longer part of Samsung.

>
> On 29 August 2016 at 16:35, Michael Niewöhner <[email protected]> wrote:
>> Hi Mathias,
>> On Mo, 2016-08-29 at 13:59 +0300, Mathias Nyman wrote:
>>> On 29.08.2016 10:28, Felipe Balbi wrote:
>>> >
>>> >
>>> > Hi,
>>> >
>>> > Michael Niewöhner <[email protected]> writes:
>>> > >
>>> > > [1.] One line summary of the problem:
>>> > > DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422
>>> > >
>>> > > [2.] Full description of the problem/report:
>>> > > No usb 3.0 devices are being detected when attached while USB 2.0
>>> > > devices work on the same port.
>>> > > USB 3.0 works after applying patches [9.1] and [9.2], but seems
>>> > > to be
>>> > > buggy. The usb hub is redetected every time an usb device is
>>> > > attached.

[snip]

>>> >
>>> > >
>>> > > [9.] Other notes, patches, fixes, workarounds:
>>> > > [9.1] https://lkml.org/lkml/2014/4/28/234
>>> > > [9.2] https://lkml.org/lkml/2015/2/2/259

These patches are required to get USB super-speed working on Exynos5420/5800.
But they did not make to upstream. There was resistance on adding new
phy_calibrate()
callback.

Without these patches the Exynos5420/5800 will enumerate all
super-speed capable devices
as high-speed devices.
Last time we checked with exynos542x smdk boards and peach-* boards,
we could get the
Super - speed devices working. I have not tested odroid anytime so
don't have much idea about the
its intricacies.
I guess Anand was able to use these patches to get his kernel working in past.

When you have a downstream on-board usb hub, ideally it should be able
to detect the devices
and not reset everytime you connect a new device (like you mentioned earlier).
There can be two possible reasons why the hub keeps getting reset ever
after applying the above
mentioned patches:
1) the clock rates are not proper.
2) the regulator load setting is not enough to drive the hub.

Anand, can you please point Michael to an older kernel with which you
could test usb on odroid successfully ?
You can compare the clocks with an older version and see if there'a
any difference.

Any possibility of any other framework (such as, bus-freq) trimming
down the clock - rates ?


[snip]

>
> There are two dwc3 ports in the SoC : one for Gbit Ethernet another
> one for on-board GL3521 USB 3.0 hub controller.
>
> 3.10.x kernel
> odroid@odroid:~$ 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, 5000M
> /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
>
> 4.x kernel
> odroid@odroid:~$ 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, 480M
> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
> |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M

[snip]

Michael, please paste the output of lsusb -t and/or lsusb -v as well.


Best regards
Vivek

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


2016-10-04 10:58:24

by Michael Niewöhner

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Vivek,

On Di, 2016-10-04 at 11:32 +0530, Vivek Gautam wrote:
> Hi Michael,
>
>
> On Tue, Aug 30, 2016 at 10:32 AM, Anand Moon <[email protected]> wrote:
> >
> > Hi All
> >
> > Adding Vivek Gautam.
>
> Sorry for missing out this conversation. I am no longer part of Samsung.
>
> >
> >
> > On 29 August 2016 at 16:35, Michael Niewöhner <[email protected]> wrote:
> > >
> > > Hi Mathias,
> > > On Mo, 2016-08-29 at 13:59 +0300, Mathias Nyman wrote:
> > > >
> > > > On 29.08.2016 10:28, Felipe Balbi wrote:
> > > > >
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Michael Niewöhner <[email protected]> writes:
> > > > > >
> > > > > >
> > > > > > [1.] One line summary of the problem:
> > > > > > DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422
> > > > > >
> > > > > > [2.] Full description of the problem/report:
> > > > > > No usb 3.0 devices are being detected when attached while USB 2.0
> > > > > > devices work on the same port.
> > > > > > USB 3.0 works after applying patches [9.1] and [9.2], but seems
> > > > > > to be
> > > > > > buggy. The usb hub is redetected every time an usb device is
> > > > > > attached.
>
> [snip]
>
> >
> > >
> > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > [9.] Other notes, patches, fixes, workarounds:
> > > > > > [9.1] https://lkml.org/lkml/2014/4/28/234
> > > > > > [9.2] https://lkml.org/lkml/2015/2/2/259
>
> These patches are required to get USB super-speed working on Exynos5420/5800.
> But they did not make to upstream. There was resistance on adding new
> phy_calibrate()
> callback.
>
> Without these patches the Exynos5420/5800 will enumerate all
> super-speed capable devices
> as high-speed devices.
> Last time we checked with exynos542x smdk boards and peach-* boards,
> we could get the
> Super - speed devices working. I have not tested odroid anytime so
> don't have much idea about the
> its intricacies.
> I guess Anand was able to use these patches to get his kernel working in past.


The patches don't work anymore with 4.8-rc* / 4.8. They worked - but very
unstable - with 4.7.

One more problem appeared since one of the 4.8-RCs: reboot hangs when the dwc3
module is loaded. If I unload it before reboot / shutdown everything is fine.


>
> When you have a downstream on-board usb hub, ideally it should be able
> to detect the devices
> and not reset everytime you connect a new device (like you mentioned earlier).
> There can be two possible reasons why the hub keeps getting reset ever
> after applying the above
> mentioned patches:
> 1) the clock rates are not proper.
> 2) the regulator load setting is not enough to drive the hub.
>
> Anand, can you please point Michael to an older kernel with which you
> could test usb on odroid successfully ?
> You can compare the clocks with an older version and see if there'a
> any difference.
>
> Any possibility of any other framework (such as, bus-freq) trimming
> down the clock - rates ?


################################
# v4.7.5
################################

$ cat /sys/kernel/debug/clk/clk_summary | grep usb     
 sclk_usbh20_scan_clk                     0            0   480000000          0 
 sclk_usbh20                              0            0    48000
000          0 
    mout_usbd300                          1            1    24000000          0 
       dout_usbd300                       0            0    24000000          0 
          sclk_usbd300   
                 0            0    24000000          0 
       dout_usbphy300                     1            1    24000000          0 
          sclk_usbphy300                  4            4    24000
000          0 
    mout_usbd301                          1            1    24000000          0 
       dout_usbd301                       0            0    24000000          0 
          sclk_usbd301   
                 0            0    24000000          0 
       dout_usbphy301                     1            1    24000000          0 
          sclk_usbphy301                  3            3    24000
000          0 
                         usbd301           1            1   100000000           
                         usbd300           1            1   100000000           
                         
usbh20           3            3   100000000          0

$ cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 3              
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0002 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ ehci_hcd                                          
S:  Product=EHCI Host Controller                                                
S:  SerialNumber=12110000.usb:                                                  
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms                                   
                                                                                
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 3              
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0001 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ ohci_hcd                                          
S:  Product=USB Host Controller                                                 
S:  SerialNumber=12120000.usb:                                                  
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms                                   
                                                                                
T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1              
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0002 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ xhci-hcd                                          
S:  Product=xHCI Host Controller                                                
S:  SerialNumber=xhci-hcd.4.auto                                                
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms                                   
                                                                                
T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 2              
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=02 MxPS=64 #Cfgs=  1                    
P:  Vendor=05e3 ProdID=0610 Rev=92.22                                           
S:  Manufacturer=GenesysLogic                                                   
S:  Product=USB2.0 Hub                                                          
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA                                          
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=01 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms                                   
I:* If#= 0 Alt= 1 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=02 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms                                   
                                                                                
T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1              
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0003 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ xhci-hcd                                          
S:  Product=xHCI Host Controller                                                
S:  SerialNumber=xhci-hcd.4.auto                                                
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms                                   
                                                                                
T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 2              
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1                    
P:  Vendor=05e3 ProdID=0616 Rev=92.22                                           
S:  Manufacturer=GenesysLogic                                                   
S:  Product=USB3.0 Hub                                                          
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=83(I) Atr=13(Int.) MxPS=   2 Ivl=16ms                                    
                                                                                
T:  Bus=04 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=5000 MxCh= 0              
D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1                    
P:  Vendor=1e68 ProdID=008a Rev= 1.00                                           
S:  Manufacturer=TrekStor                                                       
S:  Product=DS picco SSD                                                        
S:  SerialNumber=20151111311B                                                   
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage       
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
I:  If#= 0 Alt= 1 #EPs= 4 Cls=08(stor.) Sub=06 Prot=62 Driver=usb-storage       
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
                                                                                
T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1              
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0002 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ xhci-hcd                                          
S:  Product=xHCI Host Controller                                                
S:  SerialNumber=xhci-hcd.5.auto                                                
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms                                   
                                                                                
T:  Bus=06 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1              
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0                                  
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1                    
P:  Vendor=1d6b ProdID=0003 Rev= 4.07                                           
S:  Manufacturer=Linux 4.7.5+ xhci-hcd                                          
S:  Product=xHCI Host Controller                                                
S:  SerialNumber=xhci-hcd.5.auto                                                
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA                                          
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub               
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms                                   
                                                                                
T:  Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0              
D:  Ver= 3.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  2                    
P:  Vendor=0bda ProdID=8153 Rev=30.00                                           
S:  Manufacturer=Realtek                                                        
S:  Product=USB 10/100/1000 LAN                                                 
S:  SerialNumber=000001000000                                                   
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA                                          
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152             
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=16ms                                    
C:  #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA                                          
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=                  
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=16ms                                    
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=                  
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=                  
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms                                     
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms


################################
# v4.8.0
################################

$ cat /sys/kernel/debug/clk/clk_summary | grep usb
 sclk_usbh20_scan_clk                     0            0   480000000          0 
 sclk_usbh20                              0            0    48000000  
        0 
    mout_usbd300                          1            1    24000000          0 
       dout_usbd300                       0            0    24000000          0 
          sclk_usbd300        
            0            0    24000000          0 
       dout_usbphy300                     1            1    24000000          0 
          sclk_usbphy300                  4            4    24000000  
        0 
    mout_usbd301                          1            1    24000000          0 
       dout_usbd301                       0            0    24000000          0 
          sclk_usbd301        
            0            0    24000000          0 
       dout_usbphy301                     1            1    24000000          0 
          sclk_usbphy301                  3            3    24000000  
        0 
                         usbd301           1            1   100000000           
                         usbd300           1            1   100000000           
                         usbh2
0           3            3   100000000          0 

$ cat /sys/kernel/debug/usb/devices
<<system hangs>>



>
>
> [snip]
>
> >
> >
> > There are two dwc3 ports in the SoC : one for Gbit Ethernet another
> > one for on-board GL3521 USB 3.0 hub controller.
> >
> > 3.10.x kernel
> > odroid@odroid:~$ 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, 5000M
> > /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> > /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
> > /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
> >
> > 4.x kernel
> > odroid@odroid:~$ 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, 480M
> > /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
> >         |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> >         |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> > /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
>
> [snip]
>
> Michael, please paste the output of lsusb -t and/or lsusb -v as well.


################################
# v4.7.5 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, 5000M   
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M              
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M             
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M                    
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M  
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M              
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M                     
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M            
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M 



################################
# v4.8.0 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              
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M             
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M              
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M            
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M 


################################
# v4.7.5 lsusb -v
################################

Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.                    
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            0 (Defined at Interface level)                        
  bDeviceSubClass         0                                                     
  bDeviceProtocol         0                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x0bda Realtek Semiconductor Corp.                         
  idProduct          0x8153                                                     
  bcdDevice           30.00                                                     
  iManufacturer           1 Realtek                                             
  iProduct                2 USB 10/100/1000 LAN                                 
  iSerial                 6 000001000000                                        
  bNumConfigurations      2                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           57                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xa0                                                   
      (Bus Powered)                                                             
      Remote Wakeup                                                             
    MaxPower               64mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           3                                                 
      bInterfaceClass       255 Vendor Specific Class                           
      bInterfaceSubClass    255 Vendor Specific Subclass                        
      bInterfaceProtocol      0                                                 
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst               3                                               
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x02  EP 2 OUT                                     
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst               3                                               
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x83  EP 3 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0002  1x 2 bytes                                   
        bInterval               8                                               
        bMaxBurst               0                                               
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           98                                                   
    bNumInterfaces          2                                                   
    bConfigurationValue     2                                                   
    iConfiguration          0                                                   
    bmAttributes         0xa0                                                   
      (Bus Powered)                                                             
      Remote Wakeup                                                             
    MaxPower               64mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         2 Communications                                  
      bInterfaceSubClass      6 Ethernet Networking                             
      bInterfaceProtocol      0                                                 
      iInterface              5 CDC Communications Control                      
      CDC Header:                                                               
        bcdCDC               1.10                                               
      CDC Union:                                                                
        bMasterInterface        0                                               
        bSlaveInterface         1                                               
      CDC Ethernet:                                                             
        iMacAddress                      3 001E06321EFF                         
        bmEthernetStatistics    0x00000000                                      
        wMaxSegmentSize               1514                                      
        wNumberMCFilters            0x0000                                      
        bNumberPowerFilters              0                                      
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x83  EP 3 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0010  1x 16 bytes                                  
        bInterval               8                                               
        bMaxBurst               0                                               
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        1                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           0                                                 
      bInterfaceClass        10 CDC Data                                        
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0                                                 
      iInterface              0                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        1                                                 
      bAlternateSetting       1                                                 
      bNumEndpoints           2                                                 
      bInterfaceClass        10 CDC Data                                        
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0                                                 
      iInterface              4 Ethernet Data                                   
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst               3                                               
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x02  EP 2 OUT                                     
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst               3                                               
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           22                                                     
  bNumDeviceCaps          2                                                     
  USB 2.0 Extension Device Capability:                                          
    bLength                 7                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      2                                                   
    bmAttributes   0x00000002                                                   
      Link Power Management (LPM) Supported                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x02                                                   
      Latency Tolerance Messages (LTM) Supported                                
    wSpeedsSupported   0x000e                                                   
      Device can operate at Full Speed (12Mbps)                                 
      Device can operate at High Speed (480Mbps)                                
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   2                                                   
      Lowest fully-functional device speed is High Speed (480Mbps)              
    bU1DevExitLat          10 micro seconds                                     
    bU2DevExitLat        2047 micro seconds                                     
Device Status:     0x0010                                                       
  (Bus Powered)                                                                 
  Latency Tolerance Messaging (LTM) Enabled                                     
                                                                                
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         3                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0003 3.0 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ xhci-hcd                               
  iProduct                2 xHCI Host Controller                                
  iSerial                 1 xhci-hcd.5.auto                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           31                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
        bMaxBurst               0                                               
Hub Descriptor:                                                                 
  bLength              12                                                       
  bDescriptorType      42                                                       
  nNbrPorts             1                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  bHubDecLat          0.0 micro seconds                                         
  wHubDelay             0 nano seconds                                          
  DeviceRemovable    0x00                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0203 5Gbps power U0 enable connect                              
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           15                                                     
  bNumDeviceCaps          1                                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x02                                                   
      Latency Tolerance Messages (LTM) Supported                                
    wSpeedsSupported   0x0008                                                   
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   3                                                   
      Lowest fully-functional device speed is SuperSpeed (5Gbps)                
    bU1DevExitLat           0 micro seconds                                     
    bU2DevExitLat           0 micro seconds                                     
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               2.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         1 Single TT                                           
  bMaxPacketSize0        64                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0002 2.0 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ xhci-hcd                               
  iProduct                2 xHCI Host Controller                                
  iSerial                 1 xhci-hcd.5.auto                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           25                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
Hub Descriptor:                                                                 
  bLength               9                                                       
  bDescriptorType      41                                                       
  nNbrPorts             1                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
    TT think time 8 FS bits                                                     
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  DeviceRemovable    0x00                                                       
  PortPwrCtrlMask    0xff                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0100 power                                                      
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 004 Device 003: ID 1e68:008a TrekStor GmbH & Co. KG                         
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            0 (Defined at Interface level)                        
  bDeviceSubClass         0                                                     
  bDeviceProtocol         0                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x1e68 TrekStor GmbH & Co. KG                              
  idProduct          0x008a                                                     
  bcdDevice            1.00                                                     
  iManufacturer           2 TrekStor                                            
  iProduct                3 DS picco SSD                                        
  iSerial                 1 20151111311B                                        
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength          121                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xc0                                                   
      Self Powered                                                              
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           2                                                 
      bInterfaceClass         8 Mass Storage                                    
      bInterfaceSubClass      6 SCSI                                            
      bInterfaceProtocol     80 Bulk-Only                                       
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst              15                                               
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x02  EP 2 OUT                                     
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst              15                                               
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       1                                                 
      bNumEndpoints           4                                                 
      bInterfaceClass         8 Mass Storage                                    
      bInterfaceSubClass      6 SCSI                                            
      bInterfaceProtocol     98                                                 
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst              15                                               
        MaxStreams             32                                               
        Data-in pipe (0x03)                                                     
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x02  EP 2 OUT                                     
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst              15                                               
        MaxStreams             32                                               
        Data-out pipe (0x04)                                                    
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x83  EP 3 IN                                      
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst              15                                               
        MaxStreams             32                                               
        Status pipe (0x02)                                                      
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x04  EP 4 OUT                                     
        bmAttributes            2                                               
          Transfer Type            Bulk                                         
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0400  1x 1024 bytes                                
        bInterval               0                                               
        bMaxBurst               0                                               
        Command pipe (0x01)                                                     
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           22                                                     
  bNumDeviceCaps          2                                                     
  USB 2.0 Extension Device Capability:                                          
    bLength                 7                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      2                                                   
    bmAttributes   0x0000f41e                                                   
      Link Power Management (LPM) Supported                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x00                                                   
    wSpeedsSupported   0x000e                                                   
      Device can operate at Full Speed (12Mbps)                                 
      Device can operate at High Speed (480Mbps)                                
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   1                                                   
      Lowest fully-functional device speed is Full Speed (12Mbps)               
    bU1DevExitLat          10 micro seconds                                     
    bU2DevExitLat        2047 micro seconds                                     
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc.                            
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         3                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x05e3 Genesys Logic, Inc.                                 
  idProduct          0x0616                                                     
  bcdDevice           92.22                                                     
  iManufacturer           1 GenesysLogic                                        
  iProduct                2 USB3.0 Hub                                          
  iSerial                 0                                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           31                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              1 GenesysLogic                                    
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x83  EP 3 IN                                      
        bmAttributes           19                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Feedback                                     
        wMaxPacketSize     0x0002  1x 2 bytes                                   
        bInterval               8                                               
        bMaxBurst               0                                               
Hub Descriptor:                                                                 
  bLength              12                                                       
  bDescriptorType      42                                                       
  nNbrPorts             2                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
  bPwrOn2PwrGood       50 * 2 milli seconds                                     
  bHubContrCurrent    576 milli Ampere                                          
  bHubDecLat          0.0 micro seconds                                         
  wHubDelay          1248 nano seconds                                          
  DeviceRemovable    0x00                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0203 5Gbps power U0 enable connect                              
   Port 2: 0000.02a0 5Gbps power Rx.Detect                                      
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           42                                                     
  bNumDeviceCaps          3                                                     
  USB 2.0 Extension Device Capability:                                          
    bLength                 7                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      2                                                   
    bmAttributes   0x00000006                                                   
      Link Power Management (LPM) Supported                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x00                                                   
    wSpeedsSupported   0x000e                                                   
      Device can operate at Full Speed (12Mbps)                                 
      Device can operate at High Speed (480Mbps)                                
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   1                                                   
      Lowest fully-functional device speed is Full Speed (12Mbps)               
    bU1DevExitLat           8 micro seconds                                     
    bU2DevExitLat         190 micro seconds                                     
  Container ID Device Capability:                                               
    bLength                20                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      4                                                   
    bReserved               0                                                   
    ContainerID             {f0564b9f-f61d-e011-ac64-0800200c9a66}              
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         3                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0003 3.0 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ xhci-hcd                               
  iProduct                2 xHCI Host Controller                                
  iSerial                 1 xhci-hcd.4.auto                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           31                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
        bMaxBurst               0                                               
Hub Descriptor:                                                                 
  bLength              12                                                       
  bDescriptorType      42                                                       
  nNbrPorts             1                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  bHubDecLat          0.0 micro seconds                                         
  wHubDelay             0 nano seconds                                          
  DeviceRemovable    0x00                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0203 5Gbps power U0 enable connect                              
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           15                                                     
  bNumDeviceCaps          1                                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x02                                                   
      Latency Tolerance Messages (LTM) Supported                                
    wSpeedsSupported   0x0008                                                   
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   3                                                   
      Lowest fully-functional device speed is SuperSpeed (5Gbps)                
    bU1DevExitLat           0 micro seconds                                     
    bU2DevExitLat           0 micro seconds                                     
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub                 
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               2.10                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         2 TT per port                                         
  bMaxPacketSize0        64                                                     
  idVendor           0x05e3 Genesys Logic, Inc.                                 
  idProduct          0x0610 4-port hub                                          
  bcdDevice           92.22                                                     
  iManufacturer           1 GenesysLogic                                        
  iProduct                2 USB2.0 Hub                                          
  iSerial                 0                                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           41                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower              100mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      1 Single TT                                       
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0001  1x 1 bytes                                   
        bInterval              12                                               
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       1                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      2 TT per port                                     
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0001  1x 1 bytes                                   
        bInterval              12                                               
Hub Descriptor:                                                                 
  bLength               9                                                       
  bDescriptorType      41                                                       
  nNbrPorts             2                                                       
  wHubCharacteristic 0x00e9                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
    TT think time 32 FS bits                                                    
    Port indicators                                                             
  bPwrOn2PwrGood       50 * 2 milli seconds                                     
  bHubContrCurrent    100 milli Ampere                                          
  DeviceRemovable    0x00                                                       
  PortPwrCtrlMask    0xff                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0100 power                                                      
   Port 2: 0000.0100 power                                                      
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           42                                                     
  bNumDeviceCaps          3                                                     
  USB 2.0 Extension Device Capability:                                          
    bLength                 7                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      2                                                   
    bmAttributes   0x00000006                                                   
      Link Power Management (LPM) Supported                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x00                                                   
    wSpeedsSupported   0x000e                                                   
      Device can operate at Full Speed (12Mbps)                                 
      Device can operate at High Speed (480Mbps)                                
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   1                                                   
      Lowest fully-functional device speed is Full Speed (12Mbps)               
    bU1DevExitLat           8 micro seconds                                     
    bU2DevExitLat         190 micro seconds                                     
  Container ID Device Capability:                                               
    bLength                20                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      4                                                   
    bReserved               0                                                   
    ContainerID             {f0564b9f-f61d-e011-ac64-0800200c9a66}              
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               2.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         1 Single TT                                           
  bMaxPacketSize0        64                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0002 2.0 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ xhci-hcd                               
  iProduct                2 xHCI Host Controller                                
  iSerial                 1 xhci-hcd.4.auto                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           25                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
Hub Descriptor:                                                                 
  bLength               9                                                       
  bDescriptorType      41                                                       
  nNbrPorts             1                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
    TT think time 8 FS bits                                                     
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  DeviceRemovable    0x00                                                       
  PortPwrCtrlMask    0xff                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0507 highspeed power suspend enable connect                     
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               1.10                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         0 Full speed (or root) hub                            
  bMaxPacketSize0        64                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0001 1.1 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ ohci_hcd                               
  iProduct                2 USB Host Controller                                 
  iSerial                 1 12120000.usb:                                       
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           25                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0002  1x 2 bytes                                   
        bInterval             255                                               
Hub Descriptor:                                                                 
  bLength               9                                                       
  bDescriptorType      41                                                       
  nNbrPorts             3                                                       
  wHubCharacteristic 0x0002                                                     
    No power switching (usb 1.0)                                                
    Ganged overcurrent protection                                               
  bPwrOn2PwrGood        2 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  DeviceRemovable    0x00                                                       
  PortPwrCtrlMask    0xff                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0100 power                                                      
   Port 2: 0000.0100 power                                                      
   Port 3: 0000.0100 power                                                      
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               2.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         0 Full speed (or root) hub                            
  bMaxPacketSize0        64                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0002 2.0 root hub                                        
  bcdDevice            4.07                                                     
  iManufacturer           3 Linux 4.7.5+ ehci_hcd                               
  iProduct                2 EHCI Host Controller                                
  iSerial                 1 12110000.usb:                                       
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           25                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
Hub Descriptor:                                                                 
  bLength               9                                                       
  bDescriptorType      41                                                       
  nNbrPorts             3                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  DeviceRemovable    0x00                                                       
  PortPwrCtrlMask    0xff                                                       
 Hub Port Status:                                                               
   Port 1: 0000.0100 power                                                      
   Port 2: 0000.0100 power                                                      
   Port 3: 0000.0100 power                                                      
Device Status:     0x0001                                                       
  Self Powered                                                                  


################################
# v4.8.0 lsusb -v
################################

Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub                  
Device Descriptor:                                                              
  bLength                18                                                     
  bDescriptorType         1                                                     
  bcdUSB               3.00                                                     
  bDeviceClass            9 Hub                                                 
  bDeviceSubClass         0 Unused                                              
  bDeviceProtocol         3                                                     
  bMaxPacketSize0         9                                                     
  idVendor           0x1d6b Linux Foundation                                    
  idProduct          0x0003 3.0 root hub                                        
  bcdDevice            4.08                                                     
  iManufacturer           3 Linux 4.8.0+ xhci-hcd                               
  iProduct                2 xHCI Host Controller                                
  iSerial                 1 xhci-hcd.5.auto                                     
  bNumConfigurations      1                                                     
  Configuration Descriptor:                                                     
    bLength                 9                                                   
    bDescriptorType         2                                                   
    wTotalLength           31                                                   
    bNumInterfaces          1                                                   
    bConfigurationValue     1                                                   
    iConfiguration          0                                                   
    bmAttributes         0xe0                                                   
      Self Powered                                                              
      Remote Wakeup                                                             
    MaxPower                0mA                                                 
    Interface Descriptor:                                                       
      bLength                 9                                                 
      bDescriptorType         4                                                 
      bInterfaceNumber        0                                                 
      bAlternateSetting       0                                                 
      bNumEndpoints           1                                                 
      bInterfaceClass         9 Hub                                             
      bInterfaceSubClass      0 Unused                                          
      bInterfaceProtocol      0 Full speed (or root) hub                        
      iInterface              0                                                 
      Endpoint Descriptor:                                                      
        bLength                 7                                               
        bDescriptorType         5                                               
        bEndpointAddress     0x81  EP 1 IN                                      
        bmAttributes            3                                               
          Transfer Type            Interrupt                                    
          Synch Type               None                                         
          Usage Type               Data                                         
        wMaxPacketSize     0x0004  1x 4 bytes                                   
        bInterval              12                                               
        bMaxBurst               0                                               
Hub Descriptor:                                                                 
  bLength              12                                                       
  bDescriptorType      42                                                       
  nNbrPorts             1                                                       
  wHubCharacteristic 0x0009                                                     
    Per-port power switching                                                    
    Per-port overcurrent protection                                             
  bPwrOn2PwrGood       10 * 2 milli seconds                                     
  bHubContrCurrent      0 milli Ampere                                          
  bHubDecLat          0.0 micro seconds                                         
  wHubDelay             0 nano seconds                                          
  DeviceRemovable    0x00                                                       
 Hub Port Status:                                                               
   Port 1: 0000.02a0 5Gbps power Rx.Detect                                      
Binary Object Store Descriptor:                                                 
  bLength                 5                                                     
  bDescriptorType        15                                                     
  wTotalLength           15                                                     
  bNumDeviceCaps          1                                                     
  SuperSpeed USB Device Capability:                                             
    bLength                10                                                   
    bDescriptorType        16                                                   
    bDevCapabilityType      3                                                   
    bmAttributes         0x02                                                   
      Latency Tolerance Messages (LTM) Supported                                
    wSpeedsSupported   0x0008                                                   
      Device can operate at SuperSpeed (5Gbps)                                  
    bFunctionalitySupport   3                                                   
      Lowest fully-functional device speed is SuperSpeed (5Gbps)                
    bU1DevExitLat           0 micro seconds                                     
    bU2DevExitLat           0 micro seconds                                     
Device Status:     0x0001                                                       
  Self Powered                                                                  
                                                                                
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

<< lsusb hangs here, system is completely blocked >>


>
>
> Best regards
> Vivek
>


Best regards
Michael

2016-10-04 12:02:45

by Vivek Gautam

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Michael,


On Tue, Oct 4, 2016 at 4:28 PM, Michael Niewöhner <[email protected]> wrote:

> > > > > > [1.] One line summary of the problem:
> > > > > > DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422
> > > > > >
> > > > > > [2.] Full description of the problem/report:
> > > > > > No usb 3.0 devices are being detected when attached while USB 2.0
> > > > > > devices work on the same port.
> > > > > > USB 3.0 works after applying patches [9.1] and [9.2], but seems
> > > > > > to be
> > > > > > buggy. The usb hub is redetected every time an usb device is
> > > > > > attached.

[snip]

>> > > > > > [9.] Other notes, patches, fixes, workarounds:
>> > > > > > [9.1] https://lkml.org/lkml/2014/4/28/234
>> > > > > > [9.2] https://lkml.org/lkml/2015/2/2/259
>>
>> These patches are required to get USB super-speed working on Exynos5420/5800.
>> But they did not make to upstream. There was resistance on adding new
>> phy_calibrate()
>> callback.
>>
>> Without these patches the Exynos5420/5800 will enumerate all
>> super-speed capable devices
>> as high-speed devices.
>> Last time we checked with exynos542x smdk boards and peach-* boards,
>> we could get the
>> Super - speed devices working. I have not tested odroid anytime so
>> don't have much idea about the
>> its intricacies.
>> I guess Anand was able to use these patches to get his kernel working in past.
>
>
> The patches don't work anymore with 4.8-rc* / 4.8. They worked - but very
> unstable - with 4.7.
>
> One more problem appeared since one of the 4.8-RCs: reboot hangs when the dwc3
> module is loaded. If I unload it before reboot / shutdown everything is fine.
>
>
>>
>> When you have a downstream on-board usb hub, ideally it should be able
>> to detect the devices
>> and not reset everytime you connect a new device (like you mentioned earlier).
>> There can be two possible reasons why the hub keeps getting reset ever
>> after applying the above
>> mentioned patches:
>> 1) the clock rates are not proper.
>> 2) the regulator load setting is not enough to drive the hub.
>>
>> Anand, can you please point Michael to an older kernel with which you
>> could test usb on odroid successfully ?
>> You can compare the clocks with an older version and see if there'a
>> any difference.
>>
>> Any possibility of any other framework (such as, bus-freq) trimming
>> down the clock - rates ?
>
>
> ################################
> # v4.7.5
> ################################
>
> $ cat /sys/kernel/debug/clk/clk_summary | grep usb
> sclk_usbh20_scan_clk 0 0 480000000 0
> sclk_usbh20 0 0 48000
> 000 0
> mout_usbd300 1 1 24000000 0
> dout_usbd300 0 0 24000000 0
> sclk_usbd300
> 0 0 24000000 0
> dout_usbphy300 1 1 24000000 0
> sclk_usbphy300 4 4 24000
> 000 0
> mout_usbd301 1 1 24000000 0
> dout_usbd301 0 0 24000000 0
> sclk_usbd301
> 0 0 24000000 0
> dout_usbphy301 1 1 24000000 0
> sclk_usbphy301 3 3 24000
> 000 0
> usbd301 1 1 100000000
> usbd300 1 1 100000000
>
> usbh20 3 3 100000000 0

>
> ################################
> # v4.8.0
> ################################
>
> $ cat /sys/kernel/debug/clk/clk_summary | grep usb
> sclk_usbh20_scan_clk 0 0 480000000 0
> sclk_usbh20 0 0 48000000
> 0
> mout_usbd300 1 1 24000000 0
> dout_usbd300 0 0 24000000 0
> sclk_usbd300
> 0 0 24000000 0
> dout_usbphy300 1 1 24000000 0
> sclk_usbphy300 4 4 24000000
> 0
> mout_usbd301 1 1 24000000 0
> dout_usbd301 0 0 24000000 0
> sclk_usbd301
> 0 0 24000000 0
> dout_usbphy301 1 1 24000000 0
> sclk_usbphy301 3 3 24000000
> 0
> usbd301 1 1 100000000

This clock should have been 200MHz.

> usbd300 1 1 100000000
> usbh2
> 0 3 3 100000000 0
>
> $ cat /sys/kernel/debug/usb/devices
> <<system hangs>>
>

The clocks are same across working/non-working.
Is it possible to bisect the commit that's causing hang for 4.8x ?

Adding few of the folks from Samsung who can test dwc3 usb on smdk/peach boards.
+Alim, Pankaj

Hi Alim, Pankaj,
can you please give a try with 4.8 kernel on peach/smdk542x board and
see if dwc3 usb works or not.
You may need to the patches mentioned in [9.1] and [9.2] mentioned above.


[snip]


Thanks
Vivek

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

2016-10-04 15:09:47

by Anand Moon

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Vivek,

On 4 October 2016 at 17:32, Vivek Gautam <[email protected]> wrote:
> Hi Michael,
>
>
> On Tue, Oct 4, 2016 at 4:28 PM, Michael Niewöhner <[email protected]> wrote:
>
>> > > > > > [1.] One line summary of the problem:
>> > > > > > DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422
>> > > > > >
>> > > > > > [2.] Full description of the problem/report:
>> > > > > > No usb 3.0 devices are being detected when attached while USB 2.0
>> > > > > > devices work on the same port.
>> > > > > > USB 3.0 works after applying patches [9.1] and [9.2], but seems
>> > > > > > to be
>> > > > > > buggy. The usb hub is redetected every time an usb device is
>> > > > > > attached.
>
> [snip]
>
>>> > > > > > [9.] Other notes, patches, fixes, workarounds:
>>> > > > > > [9.1] https://lkml.org/lkml/2014/4/28/234
>>> > > > > > [9.2] https://lkml.org/lkml/2015/2/2/259
>>>
>>> These patches are required to get USB super-speed working on Exynos5420/5800.
>>> But they did not make to upstream. There was resistance on adding new
>>> phy_calibrate()
>>> callback.
>>>
>>> Without these patches the Exynos5420/5800 will enumerate all
>>> super-speed capable devices
>>> as high-speed devices.
>>> Last time we checked with exynos542x smdk boards and peach-* boards,
>>> we could get the
>>> Super - speed devices working. I have not tested odroid anytime so
>>> don't have much idea about the
>>> its intricacies.
>>> I guess Anand was able to use these patches to get his kernel working in past.
>>
>>
>> The patches don't work anymore with 4.8-rc* / 4.8. They worked - but very
>> unstable - with 4.7.
>>
>> One more problem appeared since one of the 4.8-RCs: reboot hangs when the dwc3
>> module is loaded. If I unload it before reboot / shutdown everything is fine.
>>
>>
>>>
>>> When you have a downstream on-board usb hub, ideally it should be able
>>> to detect the devices
>>> and not reset everytime you connect a new device (like you mentioned earlier).
>>> There can be two possible reasons why the hub keeps getting reset ever
>>> after applying the above
>>> mentioned patches:
>>> 1) the clock rates are not proper.
>>> 2) the regulator load setting is not enough to drive the hub.
>>>
>>> Anand, can you please point Michael to an older kernel with which you
>>> could test usb on odroid successfully ?
>>> You can compare the clocks with an older version and see if there'a
>>> any difference.
>>>
>>> Any possibility of any other framework (such as, bus-freq) trimming
>>> down the clock - rates ?
>>
>>
>> ################################
>> # v4.7.5
>> ################################
>>
>> $ cat /sys/kernel/debug/clk/clk_summary | grep usb
>> sclk_usbh20_scan_clk 0 0 480000000 0
>> sclk_usbh20 0 0 48000
>> 000 0
>> mout_usbd300 1 1 24000000 0
>> dout_usbd300 0 0 24000000 0
>> sclk_usbd300
>> 0 0 24000000 0
>> dout_usbphy300 1 1 24000000 0
>> sclk_usbphy300 4 4 24000
>> 000 0
>> mout_usbd301 1 1 24000000 0
>> dout_usbd301 0 0 24000000 0
>> sclk_usbd301
>> 0 0 24000000 0
>> dout_usbphy301 1 1 24000000 0
>> sclk_usbphy301 3 3 24000
>> 000 0
>> usbd301 1 1 100000000
>> usbd300 1 1 100000000
>>
>> usbh20 3 3 100000000 0
>
>>
>> ################################
>> # v4.8.0
>> ################################
>>
>> $ cat /sys/kernel/debug/clk/clk_summary | grep usb
>> sclk_usbh20_scan_clk 0 0 480000000 0
>> sclk_usbh20 0 0 48000000
>> 0
>> mout_usbd300 1 1 24000000 0
>> dout_usbd300 0 0 24000000 0
>> sclk_usbd300
>> 0 0 24000000 0
>> dout_usbphy300 1 1 24000000 0
>> sclk_usbphy300 4 4 24000000
>> 0
>> mout_usbd301 1 1 24000000 0
>> dout_usbd301 0 0 24000000 0
>> sclk_usbd301
>> 0 0 24000000 0
>> dout_usbphy301 1 1 24000000 0
>> sclk_usbphy301 3 3 24000000
>> 0
>> usbd301 1 1 100000000
>
> This clock should have been 200MHz.
>
>> usbd300 1 1 100000000
>> usbh2
>> 0 3 3 100000000 0
>>
>> $ cat /sys/kernel/debug/usb/devices
>> <<system hangs>>
>>
>
> The clocks are same across working/non-working.
> Is it possible to bisect the commit that's causing hang for 4.8x ?
>
> Adding few of the folks from Samsung who can test dwc3 usb on smdk/peach boards.
> +Alim, Pankaj
>
> Hi Alim, Pankaj,
> can you please give a try with 4.8 kernel on peach/smdk542x board and
> see if dwc3 usb works or not.
> You may need to the patches mentioned in [9.1] and [9.2] mentioned above.
>
>

[9.1] https://lkml.org/lkml/2014/4/28/234 base: platform: name the
device already during allocation

Dose not help. it's not useful at all.

What I feel is that their need to be some reset of usb phy so that
device are assigned to respective bus ports.
odroid@odroid:~$ 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 3, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M


Bus 06.Port should register the Realtek Ethernet r8153 device.
But I am not able to trace out how it's should happen.

-Best Regards
Anand Moon

> [snip]
>
>
> Thanks
> Vivek
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

2016-10-05 04:45:50

by Vivek Gautam

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Anand,


On Tue, Oct 4, 2016 at 8:39 PM, Anand Moon <[email protected]> wrote:
> Hi Vivek,
>

[snip]

>
> What I feel is that their need to be some reset of usb phy so that
> device are assigned to respective bus ports.

The phy resets are what we do in the phy-exynos5-usbdrd driver. In
addition to what we
have currently in this phy driver, we just need the phy calibration
patch [1] for phy configurations.

[1] https://lkml.org/lkml/2015/2/2/259

> odroid@odroid:~$ 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 3, If 0, Class=Vendor Specific Class, Driver=r8152, 480M

This shows the ethernet device gets detected on the high-speed port of one
of the controller.
The lsusb output for kernel v4.7.x posted by Michael show that the
ethernet device got detected on super-speed port of the controller.
So, there seems to be a difference between the two.
Or, is this how it is behaving ?

Is this lsusb output on 4.8 kernel with the patch [1] ?

> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
> |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
> |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>
>
> Bus 06.Port should register the Realtek Ethernet r8153 device.
> But I am not able to trace out how it's should happen.

If i understand, below is how the configuration looks like on the board?

+-----------------------+
+------>| |
| | Bus 6 |-------+
+-----------+ | (super-speed) | |
| | +-----------------------+ |
|Controller | | --------> Ethernet device
| 2 | |
| | +-----------------------+ |
+-----------+ | | |
| | Bus 5 |-------+
+------>| (high-speed) |
+-----------------------+


+-----------------------+
+------>| |
| | Bus 4 |-------+
+-----------+ | (super-speed) | |
| | +-----------------------+ |
|Controller | | --------> (On board
hub ?? _OR_ external hub with downstream devices) ???
| 1 | |
| | +-----------------------+ |
+-----------+ | | |
| | Bus 3 |-------+
+------>| (high-speed) |
+-----------------------+


Thanks
Vivek


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

2016-10-05 07:48:32

by Anand Moon

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Vivek,

On 5 October 2016 at 10:15, Vivek Gautam <[email protected]> wrote:
> Hi Anand,
>
>
> On Tue, Oct 4, 2016 at 8:39 PM, Anand Moon <[email protected]> wrote:
>> Hi Vivek,
>>
>
> [snip]
>
>>
>> What I feel is that their need to be some reset of usb phy so that
>> device are assigned to respective bus ports.
>
> The phy resets are what we do in the phy-exynos5-usbdrd driver. In
> addition to what we
> have currently in this phy driver, we just need the phy calibration
> patch [1] for phy configurations.
>
> [1] https://lkml.org/lkml/2015/2/2/259

Yes I am only using the above patch.
If you dont mind please resend this patch again.

>
>> odroid@odroid:~$ 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 3, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
>
> This shows the ethernet device gets detected on the high-speed port of one
> of the controller.
> The lsusb output for kernel v4.7.x posted by Michael show that the
> ethernet device got detected on super-speed port of the controller.
> So, there seems to be a difference between the two.
> Or, is this how it is behaving ?

With other patches it miss behaves and the ethernet land onto another bus
port
.


> Is this lsusb output on 4.8 kernel with the patch [1] ?

Yes correct.

>
>> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
>> |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
>> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
>> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
>> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
>> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
>> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
>> |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>>
>>
>> Bus 06.Port should register the Realtek Ethernet r8153 device.
>> But I am not able to trace out how it's should happen.
>
> If i understand, below is how the configuration looks like on the board?
>
> +-----------------------+
> +------>| |
> | | Bus 6 |-------+
> +-----------+ | (super-speed) | |
> | | +-----------------------+ |
> |Controller | | --------> Ethernet device
> | 2 | |
> | | +-----------------------+ |
> +-----------+ | | |
> | | Bus 5 |-------+
> +------>| (high-speed) |
> +-----------------------+
>
>
> +-----------------------+
> +------>| |
> | | Bus 4 |-------+
> +-----------+ | (super-speed) | |
> | | +-----------------------+ |
> |Controller | | --------> (On board
> hub ?? _OR_ external hub with downstream devices) ???
> | 1 | |
> | | +-----------------------+ |
> +-----------+ | | |
> | | Bus 3 |-------+
> +------>| (high-speed) |
> +-----------------------+
>
[snip]

Yes this is correct mapping of usb ports and ethernet on the board.

Below is the schematic of the board.

http://dn.odroid.com/5422/ODROID-XU4/Schematics/XU4_MAIN_REV0.1_20151202.pdf

I have couple of questions so if you can help me out.

1 > Their is no vbus pin connector to the usb ports ?

2 > I have also tried to configure usbdrd_dwc3_0/1 nodes with no luck
snps,usb3_lpm_capable;
snps,dis_u3_susphy_quirk;
snps,dis_u2_susphy_quirk;

3 > do you feel their could be way to reset the USB PHY (ethenet)
either though the DTS using gpio and pincrt

4 > how should be the port mapping done to the usb hub.
Odroid XU4 has 2 usb 3.0 and 1 ehci port.
Odroid XU3 has 1 usb 3.0 and 1 usb 3.0 otg port and 4 ehci
port


I would like to know how to debug low level debug of USB connection.
so that we could solve the issue.

Thanks for you help in looking to this, please guide me.
Attach is the logs of lsusb -v and console output.

-Best Regards
Anand Moon


Attachments:
odroidxu4_lsusb.txt (65.43 kB)

2016-10-06 16:30:00

by Michael Niewöhner

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Vivek,
On Di, 2016-10-04 at 17:32 +0530, Vivek Gautam wrote:
> Hi Michael,
>
>
> On Tue, Oct 4, 2016 at 4:28 PM, Michael Niewöhner <[email protected]> wrote:
>
> >
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > [1.] One line summary of the problem:
> > > > > > > DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422
> > > > > > >
> > > > > > > [2.] Full description of the problem/report:
> > > > > > > No usb 3.0 devices are being detected when attached while USB 2.0
> > > > > > > devices work on the same port.
> > > > > > > USB 3.0 works after applying patches [9.1] and [9.2], but seems
> > > > > > > to be
> > > > > > > buggy. The usb hub is redetected every time an usb device is
> > > > > > > attached.
>
> [snip]
>
> >
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > [9.] Other notes, patches, fixes, workarounds:
> > > > > > > > [9.1] https://lkml.org/lkml/2014/4/28/234
> > > > > > > > [9.2] https://lkml.org/lkml/2015/2/2/259
> > >
> > > These patches are required to get USB super-speed working on Exynos5420/5800.
> > > But they did not make to upstream. There was resistance on adding new
> > > phy_calibrate()
> > > callback.
> > >
> > > Without these patches the Exynos5420/5800 will enumerate all
> > > super-speed capable devices
> > > as high-speed devices.
> > > Last time we checked with exynos542x smdk boards and peach-* boards,
> > > we could get the
> > > Super - speed devices working. I have not tested odroid anytime so
> > > don't have much idea about the
> > > its intricacies.
> > > I guess Anand was able to use these patches to get his kernel working in past.
> >
> >
> > The patches don't work anymore with 4.8-rc* / 4.8. They worked - but very
> > unstable - with 4.7.
> >
> > One more problem appeared since one of the 4.8-RCs: reboot hangs when the dwc3
> > module is loaded. If I unload it before reboot / shutdown everything is fine.
> >
> >
> > >
> > >
> > > When you have a downstream on-board usb hub, ideally it should be able
> > > to detect the devices
> > > and not reset everytime you connect a new device (like you mentioned earlier).
> > > There can be two possible reasons why the hub keeps getting reset ever
> > > after applying the above
> > > mentioned patches:
> > > 1) the clock rates are not proper.
> > > 2) the regulator load setting is not enough to drive the hub.
> > >
> > > Anand, can you please point Michael to an older kernel with which you
> > > could test usb on odroid successfully ?
> > > You can compare the clocks with an older version and see if there'a
> > > any difference.
> > >
> > > Any possibility of any other framework (such as, bus-freq) trimming
> > > down the clock - rates ?
> >
> >
> > ################################
> > # v4.7.5
> > ################################
> >
> > $ cat /sys/kernel/debug/clk/clk_summary | grep usb
> >  sclk_usbh20_scan_clk                     0            0   480000000          0
> >  sclk_usbh20                              0            0    48000
> > 000          0
> >     mout_usbd300                          1            1    24000000          0
> >        dout_usbd300                       0            0    24000000          0
> >           sclk_usbd300
> >                  0            0    24000000          0
> >        dout_usbphy300                     1            1    24000000          0
> >           sclk_usbphy300                  4            4    24000
> > 000          0
> >     mout_usbd301                          1            1    24000000          0
> >        dout_usbd301                       0            0    24000000          0
> >           sclk_usbd301
> >                  0            0    24000000          0
> >        dout_usbphy301                     1            1    24000000          0
> >           sclk_usbphy301                  3            3    24000
> > 000          0
> >                          usbd301           1            1   100000000
> >                          usbd300           1            1   100000000
> >
> > usbh20           3            3   100000000          0
>
> >
> >
> > ################################
> > # v4.8.0
> > ################################
> >
> > $ cat /sys/kernel/debug/clk/clk_summary | grep usb
> >  sclk_usbh20_scan_clk                     0            0   480000000          0
> >  sclk_usbh20                              0            0    48000000
> >         0
> >     mout_usbd300                          1            1    24000000          0
> >        dout_usbd300                       0            0    24000000          0
> >           sclk_usbd300
> >             0            0    24000000          0
> >        dout_usbphy300                     1            1    24000000          0
> >           sclk_usbphy300                  4            4    24000000
> >         0
> >     mout_usbd301                          1            1    24000000          0
> >        dout_usbd301                       0            0    24000000          0
> >           sclk_usbd301
> >             0            0    24000000          0
> >        dout_usbphy301                     1            1    24000000          0
> >           sclk_usbphy301                  3            3    24000000
> >         0
> >                          usbd301           1            1   100000000
>
> This clock should have been 200MHz.
>
> >
> >                          usbd300           1            1   100000000
> >                          usbh2
> > 0           3            3   100000000          0
> >
> > $ cat /sys/kernel/debug/usb/devices
> > <<system hangs>>
> >
>
> The clocks are same across working/non-working.
> Is it possible to bisect the commit that's causing hang for 4.8x ?


[c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
This patch causes both the hang on reboot and the lsusb hang.


>
> Adding few of the folks from Samsung who can test dwc3 usb on smdk/peach boards.
> +Alim, Pankaj
>
> Hi Alim, Pankaj,
> can you please give a try with 4.8 kernel on peach/smdk542x board and
> see if dwc3 usb works or not.
> You may need to the patches mentioned in [9.1] and [9.2] mentioned above.
>
>
> [snip]
>
>
> Thanks
> Vivek
>

Best regards
Michael

2016-10-07 07:43:02

by Felipe Balbi

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422


Hi,

Michael Niewöhner <[email protected]> writes:
>> The clocks are same across working/non-working.
>> Is it possible to bisect the commit that's causing hang for 4.8x ?
>
>
> [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
> This patch causes both the hang on reboot and the lsusb hang.

How to reproduce? Why don't we see this on x86 and TI boards? I'm
guessing this is failed bisection, as I can't see anything in that
commit that would cause reboot hang. Also, that code path is *NOT*
executed when you run lsusb.

--
balbi


Attachments:
signature.asc (800.00 B)

2016-10-07 20:26:24

by Michael Niewöhner

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Felipe,

On Fr, 2016-10-07 at 10:42 +0300, Felipe Balbi wrote:
> Hi,
>
> Michael Niewöhner <[email protected]> writes:
> >
> > >
> > > The clocks are same across working/non-working.
> > > Is it possible to bisect the commit that's causing hang for 4.8x ?
> >
> >
> > [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
> > This patch causes both the hang on reboot and the lsusb hang.
>
> How to reproduce? Why don't we see this on x86 and TI boards? I'm
> guessing this is failed bisection, as I can't see anything in that
> commit that would cause reboot hang. Also, that code path is *NOT*
> executed when you run lsusb.
>

I've tested this procedure multiple times to be sure:

- checkout c499ff71, compile, boot the odroid
- run lsusb -v => lsusb hangs, can't terminate with ctrl-c
- hard reset, after boot run poweroff or reboot => board does not completely power off / reboot (see log below)
- revert c499ff71, mrproper, compile, boot the odroid
- run lsusb -v => shows full output, not hanging
- run reboot or poweroff => board powers off / reboots just fine


dmesg poweroff not working:
...
[  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
[  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
[  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
[  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
[  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
[  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
[  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
[  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
[  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
[  121.126395] systemd-shutdown[1]: All loop devices detached.                  
[  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
[  121.135824] systemd-shutdown[1]: All DM devices detached.                    
[  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
[  121.171739] systemd-shutdown[1]: Powering off.

=> at this point removing the sd card would show a message 
"removed mmc0" (not sure what the real message was...) so the board is not completely off.


dmesg poweroff working:
...
[  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
[  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
[  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
[  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
[  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
[  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
[  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
[  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
[  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
[  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
[  121.126395] systemd-shutdown[1]: All loop devices detached.                  
[  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
[  121.135824] systemd-shutdown[1]: All DM devices detached.                    
[  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
[  121.171739] systemd-shutdown[1]: Powering off.
[  121.182331] rebo�



Best regards
Michael

2016-10-16 14:20:55

by Michael Niewöhner

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi Felipe,
On Fri, 2016-10-07 at 22:26 +0200, Michael Niewöhner wrote:
> Hi Felipe,
>
> On Fr, 2016-10-07 at 10:42 +0300, Felipe Balbi wrote:
> > Hi,
> >
> > Michael Niewöhner <[email protected]> writes:
> > >
> > > >
> > > > The clocks are same across working/non-working.
> > > > Is it possible to bisect the commit that's causing hang for 4.8x ?
> > >
> > >
> > > [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
> > > This patch causes both the hang on reboot and the lsusb hang.
> >
> > How to reproduce? Why don't we see this on x86 and TI boards? I'm
> > guessing this is failed bisection, as I can't see anything in that
> > commit that would cause reboot hang. Also, that code path is *NOT*
> > executed when you run lsusb.
> >
>
> I've tested this procedure multiple times to be sure:
>
> - checkout c499ff71, compile, boot the odroid
> - run lsusb -v => lsusb hangs, can't terminate with ctrl-c
> - hard reset, after boot run poweroff or reboot => board does not completely power off / reboot (see log below)
> - revert c499ff71, mrproper, compile, boot the odroid
> - run lsusb -v => shows full output, not hanging
> - run reboot or poweroff => board powers off / reboots just fine
>
>
> dmesg poweroff not working:
> ...
> [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
> [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
> [  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
> [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
> [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
> [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
> [  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
> [  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
> [  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
> [  121.126395] systemd-shutdown[1]: All loop devices detached.                  
> [  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
> [  121.135824] systemd-shutdown[1]: All DM devices detached.                    
> [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
> [  121.171739] systemd-shutdown[1]: Powering off.
>
> => at this point removing the sd card would show a message 
> "removed mmc0" (not sure what the real message was...) so the board is not completely off.
>
>
> dmesg poweroff working:
> ...
> [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
> [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
> [  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
> [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
> [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
> [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
> [  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
> [  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
> [  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
> [  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
> [  121.126395] systemd-shutdown[1]: All loop devices detached.                  
> [  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
> [  121.135824] systemd-shutdown[1]: All DM devices detached.                    
> [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
> [  121.171739] systemd-shutdown[1]: Powering off.
> [  121.182331] rebo�
>
>
>
> Best regards
> Michael Niewöhner


I did some more tests with next-20161016. Reverting / commenting out
one part of your patch "solves" the lsusb hang, the reboot problem
and also the "debounce failed" message. [1]
Another "solution" is to call phy_power_off before phy_power_on. [2]

Disclaimer: I have no idea what I was doing ;-) These were just some
simple trial-and-error attempts that maybe help to find the real
cause of the problems.

[1]
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..5ef589d 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -724,6 +724,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
  /* Adjust Frame Length */
  dwc3_frame_length_adjustment(dwc);
 
+/*
  usb_phy_set_suspend(dwc->usb2_phy, 0);
  usb_phy_set_suspend(dwc->usb3_phy, 0);
  ret = phy_power_on(dwc->usb2_generic_phy);
@@ -733,6 +734,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
  ret = phy_power_on(dwc->usb3_generic_phy);
  if (ret < 0)
  goto err3;
+*/
 
  ret = dwc3_event_buffers_setup(dwc);
  if (ret) {

[2]
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 7287a76..f6c8e13 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -726,6 +726,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
 
        usb_phy_set_suspend(dwc->usb2_phy, 0);
        usb_phy_set_suspend(dwc->usb3_phy, 0);
+       phy_power_off(dwc->usb2_generic_phy);
+       phy_power_off(dwc->usb3_generic_phy);
        ret = phy_power_on(dwc->usb2_generic_phy);
        if (ret < 0)
                goto err2;


Best regards
Michael

2016-10-17 08:12:35

by Felipe Balbi

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422


Hi,

Michael Niewöhner <[email protected]> writes:
> Hi Felipe,
> On Fri, 2016-10-07 at 22:26 +0200, Michael Niewöhner wrote:
>> Hi Felipe,
>>
>> On Fr, 2016-10-07 at 10:42 +0300, Felipe Balbi wrote:
>> > Hi,
>> >
>> > Michael Niewöhner <[email protected]> writes:
>> > >
>> > > >
>> > > > The clocks are same across working/non-working.
>> > > > Is it possible to bisect the commit that's causing hang for 4.8x ?
>> > >
>> > >
>> > > [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
>> > > This patch causes both the hang on reboot and the lsusb hang.
>> >
>> > How to reproduce? Why don't we see this on x86 and TI boards? I'm
>> > guessing this is failed bisection, as I can't see anything in that
>> > commit that would cause reboot hang. Also, that code path is *NOT*
>> > executed when you run lsusb.
>> >
>>
>> I've tested this procedure multiple times to be sure:
>>
>> - checkout c499ff71, compile, boot the odroid
>> - run lsusb -v => lsusb hangs, can't terminate with ctrl-c
>> - hard reset, after boot run poweroff or reboot => board does not completely power off / reboot (see log below)
>> - revert c499ff71, mrproper, compile, boot the odroid
>> - run lsusb -v => shows full output, not hanging
>> - run reboot or poweroff => board powers off / reboots just fine
>>
>>
>> dmesg poweroff not working:
>> ...
>> [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
>> [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
>> [  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
>> [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
>> [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
>> [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
>> [  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
>> [  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
>> [  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
>> [  121.126395] systemd-shutdown[1]: All loop devices detached.                  
>> [  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
>> [  121.135824] systemd-shutdown[1]: All DM devices detached.                    
>> [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
>> [  121.171739] systemd-shutdown[1]: Powering off.
>>
>> => at this point removing the sd card would show a message 
>> "removed mmc0" (not sure what the real message was...) so the board is not completely off.
>>
>>
>> dmesg poweroff working:
>> ...
>> [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144       
>> [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...   
>> [  120.769212] systemd-shutdown[1]: Unmounting file systems.                    
>> [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.               
>> [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.                     
>> [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)                    
>> [  121.101014] systemd-shutdown[1]: All filesystems unmounted.                  
>> [  121.106523] systemd-shutdown[1]: Deactivating swaps.                         
>> [  121.111585] systemd-shutdown[1]: All swaps deactivated.                      
>> [  121.116661] systemd-shutdown[1]: Detaching loop devices.                     
>> [  121.126395] systemd-shutdown[1]: All loop devices detached.                  
>> [  121.130525] systemd-shutdown[1]: Detaching DM devices.                       
>> [  121.135824] systemd-shutdown[1]: All DM devices detached.                    
>> [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.     
>> [  121.171739] systemd-shutdown[1]: Powering off.
>> [  121.182331] rebo�
>>
>>
>>
>> Best regards
>> Michael Niewöhner
>
>
> I did some more tests with next-20161016. Reverting / commenting out
> one part of your patch "solves" the lsusb hang, the reboot problem
> and also the "debounce failed" message. [1]
> Another "solution" is to call phy_power_off before phy_power_on. [2]
>
> Disclaimer: I have no idea what I was doing ;-) These were just some
> simple trial-and-error attempts that maybe help to find the real
> cause of the problems.
>
> [1]
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 7287a76..5ef589d 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -724,6 +724,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
>   /* Adjust Frame Length */
>   dwc3_frame_length_adjustment(dwc);
>  
> +/*
>   usb_phy_set_suspend(dwc->usb2_phy, 0);
>   usb_phy_set_suspend(dwc->usb3_phy, 0);
>   ret = phy_power_on(dwc->usb2_generic_phy);
> @@ -733,6 +734,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
>   ret = phy_power_on(dwc->usb3_generic_phy);
>   if (ret < 0)
>   goto err3;
> +*/
>  
>   ret = dwc3_event_buffers_setup(dwc);
>   if (ret) {
>
> [2]
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 7287a76..f6c8e13 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -726,6 +726,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
>  
>         usb_phy_set_suspend(dwc->usb2_phy, 0);
>         usb_phy_set_suspend(dwc->usb3_phy, 0);
> +       phy_power_off(dwc->usb2_generic_phy);
> +       phy_power_off(dwc->usb3_generic_phy);

This looks like a PHY driver bug to me. Which PHY driver are you using?

--
balbi


Attachments:
signature.asc (800.00 B)

2016-10-17 09:52:17

by Vivek Gautam

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422



On 10/17/2016 01:38 PM, Felipe Balbi wrote:
> Hi,
>
> Michael Niewöhner <[email protected]> writes:
>> Hi Felipe,
>> On Fri, 2016-10-07 at 22:26 +0200, Michael Niewöhner wrote:
>>> Hi Felipe,
>>>
>>> On Fr, 2016-10-07 at 10:42 +0300, Felipe Balbi wrote:
>>>> Hi,
>>>>
>>>> Michael Niewöhner <[email protected]> writes:
>>>>>> The clocks are same across working/non-working.
>>>>>> Is it possible to bisect the commit that's causing hang for 4.8x ?
>>>>>
>>>>> [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
>>>>> This patch causes both the hang on reboot and the lsusb hang.
>>>> How to reproduce? Why don't we see this on x86 and TI boards? I'm
>>>> guessing this is failed bisection, as I can't see anything in that
>>>> commit that would cause reboot hang. Also, that code path is *NOT*
>>>> executed when you run lsusb.
>>>>
>>> I've tested this procedure multiple times to be sure:
>>>
>>> - checkout c499ff71, compile, boot the odroid
>>> - run lsusb -v => lsusb hangs, can't terminate with ctrl-c
>>> - hard reset, after boot run poweroff or reboot => board does not completely power off / reboot (see log below)
>>> - revert c499ff71, mrproper, compile, boot the odroid
>>> - run lsusb -v => shows full output, not hanging
>>> - run reboot or poweroff => board powers off / reboots just fine
>>>
>>>
>>> dmesg poweroff not working:
>>> ...
>>> [ 120.733519] systemd-journald[144]: systemd-journald stopped as pid 144
>>> [ 120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
>>> [ 120.769212] systemd-shutdown[1]: Unmounting file systems.
>>> [ 120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.
>>> [ 120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.
>>> [ 121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.101014] systemd-shutdown[1]: All filesystems unmounted.
>>> [ 121.106523] systemd-shutdown[1]: Deactivating swaps.
>>> [ 121.111585] systemd-shutdown[1]: All swaps deactivated.
>>> [ 121.116661] systemd-shutdown[1]: Detaching loop devices.
>>> [ 121.126395] systemd-shutdown[1]: All loop devices detached.
>>> [ 121.130525] systemd-shutdown[1]: Detaching DM devices.
>>> [ 121.135824] systemd-shutdown[1]: All DM devices detached.
>>> [ 121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.
>>> [ 121.171739] systemd-shutdown[1]: Powering off.
>>>
>>> => at this point removing the sd card would show a message
>>> "removed mmc0" (not sure what the real message was...) so the board is not completely off.
>>>
>>>
>>> dmesg poweroff working:
>>> ...
>>> [ 120.733519] systemd-journald[144]: systemd-journald stopped as pid 144
>>> [ 120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
>>> [ 120.769212] systemd-shutdown[1]: Unmounting file systems.
>>> [ 120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.
>>> [ 120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.
>>> [ 121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
>>> [ 121.101014] systemd-shutdown[1]: All filesystems unmounted.
>>> [ 121.106523] systemd-shutdown[1]: Deactivating swaps.
>>> [ 121.111585] systemd-shutdown[1]: All swaps deactivated.
>>> [ 121.116661] systemd-shutdown[1]: Detaching loop devices.
>>> [ 121.126395] systemd-shutdown[1]: All loop devices detached.
>>> [ 121.130525] systemd-shutdown[1]: Detaching DM devices.
>>> [ 121.135824] systemd-shutdown[1]: All DM devices detached.
>>> [ 121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.
>>> [ 121.171739] systemd-shutdown[1]: Powering off.
>>> [ 121.182331] rebo�
>>>
>>>
>>>
>>> Best regards
>>> Michael Niewöhner
>>
>> I did some more tests with next-20161016. Reverting / commenting out
>> one part of your patch "solves" the lsusb hang, the reboot problem
>> and also the "debounce failed" message. [1]
>> Another "solution" is to call phy_power_off before phy_power_on. [2]
>>
>> Disclaimer: I have no idea what I was doing ;-) These were just some
>> simple trial-and-error attempts that maybe help to find the real
>> cause of the problems.
>>
>> [1]
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 7287a76..5ef589d 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -724,6 +724,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
>> /* Adjust Frame Length */
>> dwc3_frame_length_adjustment(dwc);
>>
>> +/*
>> usb_phy_set_suspend(dwc->usb2_phy, 0);
>> usb_phy_set_suspend(dwc->usb3_phy, 0);
>> ret = phy_power_on(dwc->usb2_generic_phy);
>> @@ -733,6 +734,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
>> ret = phy_power_on(dwc->usb3_generic_phy);
>> if (ret < 0)
>> goto err3;
>> +*/
>>
>> ret = dwc3_event_buffers_setup(dwc);
>> if (ret) {
>>
>> [2]
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 7287a76..f6c8e13 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -726,6 +726,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
>>
>> usb_phy_set_suspend(dwc->usb2_phy, 0);
>> usb_phy_set_suspend(dwc->usb3_phy, 0);
>> + phy_power_off(dwc->usb2_generic_phy);
>> + phy_power_off(dwc->usb3_generic_phy);
> This looks like a PHY driver bug to me. Which PHY driver are you using?
>

The exynos5-usbdrd phy driver is used for exynos platforms.
Looks like something is not right with the phy driver even
after applying the phy_calibrate patches.

Michael, are you using the last set of patches for phy calibration [1]?
[1] https://lkml.org/lkml/2015/2/2/257.


Thanks
Vivek

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

2016-10-18 12:20:49

by Michael Niewöhner

[permalink] [raw]
Subject: Re: PROBLEM: DWC3 USB 3.0 not working on Odroid-XU4 with Exynos 5422

Hi,
On Mon, 2016-10-17 at 15:21 +0530, Vivek Gautam wrote:
>
> On 10/17/2016 01:38 PM, Felipe Balbi wrote:
> > Hi,
> >
> > Michael Niewöhner <[email protected]> writes:
> > > Hi Felipe,
> > > On Fri, 2016-10-07 at 22:26 +0200, Michael Niewöhner wrote:
> > > > Hi Felipe,
> > > >
> > > > On Fr, 2016-10-07 at 10:42 +0300, Felipe Balbi wrote:
> > > > > Hi,
> > > > >
> > > > > Michael Niewöhner <[email protected]> writes:
> > > > > > > The clocks are same across working/non-working.
> > > > > > > Is it possible to bisect the commit that's causing hang for 4.8x ?
> > > > > >
> > > > > > [c499ff71ff2a281366c6ec7a904c547d806cbcd1] usb: dwc3: core: re-factor init and exit paths
> > > > > > This patch causes both the hang on reboot and the lsusb hang.
> > > > >
> > > > > How to reproduce? Why don't we see this on x86 and TI boards? I'm
> > > > > guessing this is failed bisection, as I can't see anything in that
> > > > > commit that would cause reboot hang. Also, that code path is *NOT*
> > > > > executed when you run lsusb.
> > > > >
> > > >
> > > > I've tested this procedure multiple times to be sure:
> > > >
> > > > - checkout c499ff71, compile, boot the odroid
> > > > - run lsusb -v => lsusb hangs, can't terminate with ctrl-c
> > > > - hard reset, after boot run poweroff or reboot => board does not completely power off / reboot (see log below)
> > > > - revert c499ff71, mrproper, compile, boot the odroid
> > > > - run lsusb -v => shows full output, not hanging
> > > > - run reboot or poweroff => board powers off / reboots just fine
> > > >
> > > >
> > > > dmesg poweroff not working:
> > > > ...
> > > > [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144
> > > > [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
> > > > [  120.769212] systemd-shutdown[1]: Unmounting file systems.
> > > > [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.
> > > > [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.
> > > > [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.101014] systemd-shutdown[1]: All filesystems unmounted.
> > > > [  121.106523] systemd-shutdown[1]: Deactivating swaps.
> > > > [  121.111585] systemd-shutdown[1]: All swaps deactivated.
> > > > [  121.116661] systemd-shutdown[1]: Detaching loop devices.
> > > > [  121.126395] systemd-shutdown[1]: All loop devices detached.
> > > > [  121.130525] systemd-shutdown[1]: Detaching DM devices.
> > > > [  121.135824] systemd-shutdown[1]: All DM devices detached.
> > > > [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.
> > > > [  121.171739] systemd-shutdown[1]: Powering off.
> > > >
> > > > => at this point removing the sd card would show a message
> > > > "removed mmc0" (not sure what the real message was...) so the board is not completely off.
> > > >
> > > >
> > > > dmesg poweroff working:
> > > > ...
> > > > [  120.733519] systemd-journald[144]: systemd-journald stopped as pid 144
> > > > [  120.742663] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
> > > > [  120.769212] systemd-shutdown[1]: Unmounting file systems.
> > > > [  120.773713] systemd-shutdown[1]: Unmounting /sys/kernel/debug.
> > > > [  120.827211] systemd-shutdown[1]: Unmounting /dev/mqueue.
> > > > [  121.081672] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.091687] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.095608] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
> > > > [  121.101014] systemd-shutdown[1]: All filesystems unmounted.
> > > > [  121.106523] systemd-shutdown[1]: Deactivating swaps.
> > > > [  121.111585] systemd-shutdown[1]: All swaps deactivated.
> > > > [  121.116661] systemd-shutdown[1]: Detaching loop devices.
> > > > [  121.126395] systemd-shutdown[1]: All loop devices detached.
> > > > [  121.130525] systemd-shutdown[1]: Detaching DM devices.
> > > > [  121.135824] systemd-shutdown[1]: All DM devices detached.
> > > > [  121.166327] systemd-shutdown[1]: /lib/systemd/system-shutdown succeeded.
> > > > [  121.171739] systemd-shutdown[1]: Powering off.
> > > > [  121.182331] rebo�
> > > >
> > > >
> > > >
> > > > Best regards
> > > > Michael Niewöhner
> > >
> > > I did some more tests with next-20161016. Reverting / commenting out
> > > one part of your patch "solves" the lsusb hang, the reboot problem
> > > and also the "debounce failed" message. [1]
> > > Another "solution" is to call phy_power_off before phy_power_on. [2]
> > >
> > > Disclaimer: I have no idea what I was doing ;-) These were just some
> > > simple trial-and-error attempts that maybe help to find the real
> > > cause of the problems.
> > >
> > > [1]
> > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > > index 7287a76..5ef589d 100644
> > > --- a/drivers/usb/dwc3/core.c
> > > +++ b/drivers/usb/dwc3/core.c
> > > @@ -724,6 +724,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
> > >    /* Adjust Frame Length */
> > >    dwc3_frame_length_adjustment(dwc);
> > >   
> > > +/*
> > >    usb_phy_set_suspend(dwc->usb2_phy, 0);
> > >    usb_phy_set_suspend(dwc->usb3_phy, 0);
> > >    ret = phy_power_on(dwc->usb2_generic_phy);
> > > @@ -733,6 +734,7 @@ static int dwc3_core_init(struct dwc3 *dwc)
> > >    ret = phy_power_on(dwc->usb3_generic_phy);
> > >    if (ret < 0)
> > >    goto err3;
> > > +*/
> > >   
> > >    ret = dwc3_event_buffers_setup(dwc);
> > >    if (ret) {
> > >
> > > [2]
> > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > > index 7287a76..f6c8e13 100644
> > > --- a/drivers/usb/dwc3/core.c
> > > +++ b/drivers/usb/dwc3/core.c
> > > @@ -726,6 +726,8 @@ static int dwc3_core_init(struct dwc3 *dwc)
> > >   
> > >          usb_phy_set_suspend(dwc->usb2_phy, 0);
> > >          usb_phy_set_suspend(dwc->usb3_phy, 0);
> > > +       phy_power_off(dwc->usb2_generic_phy);
> > > +       phy_power_off(dwc->usb3_generic_phy);
> >
> > This looks like a PHY driver bug to me. Which PHY driver are you using?
> >
>
> The exynos5-usbdrd phy driver is used for exynos platforms.
> Looks like something is not right with the phy driver even
> after applying the phy_calibrate patches.
>
> Michael, are you using the last set of patches for phy calibration [1]?
> [1] https://lkml.org/lkml/2015/2/2/257.

yes, I'm using the original LOS level patch.
The phy patch doesn't apply to next, so I use this adapted patch:
https://github.com/c0d3z3r0/linux/commit/8b7a0b2a19e235c308b9082a14ffe73477e2c9ed

>
>
> Thanks
> Vivek
>


Michael