linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DWC3 USB hub issue
@ 2019-06-14 18:32 Manivannan Sadhasivam
  2019-06-17  7:13 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Manivannan Sadhasivam @ 2019-06-14 18:32 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Greg Kroah-Hartman, linux-usb, linux-actions, afaerber

Hello,

I'm trying to upstream Designware USB3 host driver present in the Actions
Semi S900 SoC. It can successfully detect the USB hub but when any of the
USB device got plugged in, it fails with following error:

[    4.365566] usb usb1-port1: connect-debounce failed

Full log can be found here: https://pastebin.ubuntu.com/p/PNff5fZkn6/

Below is the output of, lsusb -v:

Bus 002 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            5.02
  iManufacturer           3 Linux 5.2.0-rc3-00032-gbd970cfc7a82-dirty xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 xhci-hcd.0.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 0x000a
    No power switching (usb 1.0)
    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 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Devicetree snippet:

                usbdrd3_0: usb@e0400000 {
                        compatible = "actions,s900-dwc3";
                        clocks = <&cmu CLK_USB3_480MPLL0>,
                                 <&cmu CLK_USB3_480MPHY0>,
                                 <&cmu CLK_USB3_5GPHY>,
                                 <&cmu CLK_USB3_CCE>,
                                 <&cmu CLK_USB3_MAC>;
                        clock-names = "usb3_480mpll0", "usb3_480mphy0",
                                      "usb3_5gphy", "usb3_cce",
                                      "usb3_mac";
                        resets  = <&cmu RESET_USB3>;
                        reset-names = "usb3";
                        power-domains = <&sps S900_PD_USB3>;
                        #address-cells = <2>;
                        #size-cells = <2>;
                        ranges;

                        usbdrd_dwc3_0: dwc3 {
                                compatible = "snps,dwc3";
                                reg = <0x0 0xe0400000 0x0 0x100000>;
                                interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                                usb-phy = <&usb2_phy>, <&usb3_phy>;
                                dr_mode = "host";
                                power-domains = <&sps S900_PD_USB3>;
                                snps,hsphy_interface = "utmi";
                        };
                };

After going through the mailing list looking for similar issue, found that
some host controllers works with following quirk:

snps,dis_u3_susphy_quirk;

I tried that also but it didn't work. Can anyone shed some light on this?

PS: USB3 is working fine with vendor kernel 3.10.

Thanks,
Mani

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DWC3 USB hub issue
  2019-06-14 18:32 DWC3 USB hub issue Manivannan Sadhasivam
@ 2019-06-17  7:13 ` Felipe Balbi
  2019-06-17  9:08   ` Roger Quadros
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2019-06-17  7:13 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Greg Kroah-Hartman, linux-usb, linux-actions, afaerber

[-- Attachment #1: Type: text/plain, Size: 5510 bytes --]


Hi,

Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:
> Hello,
>
> I'm trying to upstream Designware USB3 host driver present in the Actions
> Semi S900 SoC. It can successfully detect the USB hub but when any of the
> USB device got plugged in, it fails with following error:
>
> [    4.365566] usb usb1-port1: connect-debounce failed
>
> Full log can be found here: https://pastebin.ubuntu.com/p/PNff5fZkn6/
>
> Below is the output of, lsusb -v:
>
> Bus 002 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            5.02
>   iManufacturer           3 Linux 5.2.0-rc3-00032-gbd970cfc7a82-dirty xhci-hcd
>   iProduct                2 xHCI Host Controller
>   iSerial                 1 xhci-hcd.0.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 0x000a
>     No power switching (usb 1.0)
>     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 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> Devicetree snippet:
>
>                 usbdrd3_0: usb@e0400000 {
>                         compatible = "actions,s900-dwc3";
>                         clocks = <&cmu CLK_USB3_480MPLL0>,
>                                  <&cmu CLK_USB3_480MPHY0>,
>                                  <&cmu CLK_USB3_5GPHY>,
>                                  <&cmu CLK_USB3_CCE>,
>                                  <&cmu CLK_USB3_MAC>;
>                         clock-names = "usb3_480mpll0", "usb3_480mphy0",
>                                       "usb3_5gphy", "usb3_cce",
>                                       "usb3_mac";
>                         resets  = <&cmu RESET_USB3>;
>                         reset-names = "usb3";
>                         power-domains = <&sps S900_PD_USB3>;
>                         #address-cells = <2>;
>                         #size-cells = <2>;
>                         ranges;
>
>                         usbdrd_dwc3_0: dwc3 {
>                                 compatible = "snps,dwc3";
>                                 reg = <0x0 0xe0400000 0x0 0x100000>;
>                                 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
>                                 usb-phy = <&usb2_phy>, <&usb3_phy>;
>                                 dr_mode = "host";
>                                 power-domains = <&sps S900_PD_USB3>;
>                                 snps,hsphy_interface = "utmi";
>                         };
>                 };
>
> After going through the mailing list looking for similar issue, found that
> some host controllers works with following quirk:
>
> snps,dis_u3_susphy_quirk;
>
> I tried that also but it didn't work. Can anyone shed some light on this?
>
> PS: USB3 is working fine with vendor kernel 3.10.

Check what's different between mainline and your v3.10 code. Specially
look for changes in xhci and usbcore.

Good luck

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DWC3 USB hub issue
  2019-06-17  7:13 ` Felipe Balbi
@ 2019-06-17  9:08   ` Roger Quadros
  0 siblings, 0 replies; 3+ messages in thread
From: Roger Quadros @ 2019-06-17  9:08 UTC (permalink / raw)
  To: Felipe Balbi, Manivannan Sadhasivam
  Cc: Greg Kroah-Hartman, linux-usb, linux-actions, afaerber



On 17/06/2019 10:13, Felipe Balbi wrote:
> 
> Hi,
> 
> Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:
>> Hello,
>>
>> I'm trying to upstream Designware USB3 host driver present in the Actions
>> Semi S900 SoC. It can successfully detect the USB hub but when any of the
>> USB device got plugged in, it fails with following error:
>>
>> [    4.365566] usb usb1-port1: connect-debounce failed
>>
>> Full log can be found here: https://pastebin.ubuntu.com/p/PNff5fZkn6/
>>
>> Below is the output of, lsusb -v:
>>
>> Bus 002 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            5.02
>>   iManufacturer           3 Linux 5.2.0-rc3-00032-gbd970cfc7a82-dirty xhci-hcd
>>   iProduct                2 xHCI Host Controller
>>   iSerial                 1 xhci-hcd.0.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 0x000a
>>     No power switching (usb 1.0)
>>     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 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>
>> Devicetree snippet:
>>
>>                 usbdrd3_0: usb@e0400000 {
>>                         compatible = "actions,s900-dwc3";
>>                         clocks = <&cmu CLK_USB3_480MPLL0>,
>>                                  <&cmu CLK_USB3_480MPHY0>,
>>                                  <&cmu CLK_USB3_5GPHY>,
>>                                  <&cmu CLK_USB3_CCE>,
>>                                  <&cmu CLK_USB3_MAC>;
>>                         clock-names = "usb3_480mpll0", "usb3_480mphy0",
>>                                       "usb3_5gphy", "usb3_cce",
>>                                       "usb3_mac";
>>                         resets  = <&cmu RESET_USB3>;
>>                         reset-names = "usb3";
>>                         power-domains = <&sps S900_PD_USB3>;
>>                         #address-cells = <2>;
>>                         #size-cells = <2>;
>>                         ranges;
>>
>>                         usbdrd_dwc3_0: dwc3 {
>>                                 compatible = "snps,dwc3";
>>                                 reg = <0x0 0xe0400000 0x0 0x100000>;
>>                                 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
>>                                 usb-phy = <&usb2_phy>, <&usb3_phy>;
>>                                 dr_mode = "host";
>>                                 power-domains = <&sps S900_PD_USB3>;
>>                                 snps,hsphy_interface = "utmi";
>>                         };
>>                 };
>>
>> After going through the mailing list looking for similar issue, found that
>> some host controllers works with following quirk:
>>
>> snps,dis_u3_susphy_quirk;
>>
>> I tried that also but it didn't work. Can anyone shed some light on this?
>>
>> PS: USB3 is working fine with vendor kernel 3.10.
> 
> Check what's different between mainline and your v3.10 code. Specially
> look for changes in xhci and usbcore.

This kind of error usually happen when the PHY is not working correctly.
I would check that all USB analog power supplies are enabled, PHY is
clocked and powered ON.

Good luck!

-- 
cheers,
-roger

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-17  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 18:32 DWC3 USB hub issue Manivannan Sadhasivam
2019-06-17  7:13 ` Felipe Balbi
2019-06-17  9:08   ` Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).