Re: USB3-OTG on OMAP5EVM (and Pyra)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Roger,

> Am 05.12.2018 um 16:27 schrieb Roger Quadros <rogerq@xxxxxx>:
> 
> Nikolaus,
> 
> On 05/12/18 17:21, H. Nikolaus Schaller wrote:
>> Hi Roger,
>> 
>>> Am 30.11.2018 um 15:36 schrieb Roger Quadros <rogerq@xxxxxx>:
>>> 
>>> On 30/11/18 15:38, H. Nikolaus Schaller wrote:
>>>> Hi Roger,
>>>> 
>>>>> Am 30.11.2018 um 13:40 schrieb Roger Quadros <rogerq@xxxxxx>:
>>>>> 
>>>>> Nikolaus,
>>>>> 
>>>>> On 29/11/18 12:00, H. Nikolaus Schaller wrote:
>>>>>> Hi,
>>>>>> I finally got some USB3 OTG cable (said to be compatible with Samsung Galaxy Note 3).
>>>>>> Unfortunately devices do not enumerate (don't show up in lsusb -t) and don't even
>>>>>> fall back to USB2 speed.
>>>>>> If I use a pure USB2 OTG cable all devices work in USB2 mode.
>>>>>> 
>>>>>> This is all the same on OMAP5EVM and Pyra.
>>>>>> 
>>>>>> Is this known or does USB3-OTG work for someone?
>>>>> 
>>>>> I can give it a try. Do you have any patches to enable the VBUS regulator on omap5-uevm?
>>>> 
>>>> I think everything is already upstream and I have not used a special patch for it.
>>>> See extcon_usb3 and &usb in omap5-board-common.dtsi. This seems to connect the ID pin to the smps10.
>>>> 
>>>> The dwc3 role patch is also upstream
>>>> 
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.20-rc4&id=656c1a65ab555ee5c7cd0d6aee8ab82ca3c1795f
>>>> 
>>>> so that it should work out of the box for USB2 (or 3) with mainline kernel
>>>> Unless I did miss something important I am not aware of.
>>> 
>>> I think I found the problem.
>>> 
>>> Can you please try with the below patch? Super-speed host works for me [1].
>>> 
>>> diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi
>>> index bf7ca00..bc853eb 100644
>>> --- a/arch/arm/boot/dts/omap5-board-common.dtsi
>>> +++ b/arch/arm/boot/dts/omap5-board-common.dtsi
>>> @@ -701,6 +701,7 @@
>>> };
>>> 
>>> &dwc3 {
>>> +	extcon = <&extcon_usb3>;
>>> 	dr_mode = "otg";
>>> };
>>> 
>>> cheers,
>>> -roger
>>> 
>>> 
>>> [1]
>>> 
>>> [ 115.105743] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
>>> [ 115.111384] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
>>> [ 115.120903] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x0000000002010010
>>> [ 115.130545] xhci-hcd xhci-hcd.2.auto: irq 166, io mem 0x4a030000
>>> [ 115.139082] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.20
>>> [ 115.147491] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>>> [ 115.154783] usb usb3: Product: xHCI Host Controller
>>> [ 115.159757] usb usb3: Manufacturer: Linux 4.20.0-rc1-00048-gd8e2769-dirty xhci-hcd
>>> [ 115.167401] usb usb3: SerialNumber: xhci-hcd.2.auto
>>> [ 115.173794] hub 3-0:1.0: USB hub found
>>> [ 115.177959] hub 3-0:1.0: 1 port detected
>>> [ 115.183078] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
>>> [ 115.188707] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
>>> [ 115.196513] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
>>> [ 115.203304] omap-dwc3 4a020000.omap_dwc3: mailbox: VBUS valid
>>> [ 115.209465] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
>>> [ 115.218228] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.20
>>> [ 115.226691] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>>> [ 115.234052] usb usb4: Product: xHCI Host Controller
>>> [ 115.239118] usb usb4: Manufacturer: Linux 4.20.0-rc1-00048-gd8e2769-dirty xhci-hcd
>>> [ 115.246871] usb usb4: SerialNumber: xhci-hcd.2.auto
>>> [ 115.252711] hub 4-0:1.0: USB hub found
>>> [ 115.256697] hub 4-0:1.0: 1 port detected
>>> [ 115.626660] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
>>> [ 115.662809] usb 4-1: New USB device found, idVendor=8564, idProduct=1000, bcdDevice=11.00
>>> [ 115.671093] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>>> [ 115.678346] usb 4-1: Product: Mass Storage Device
>>> [ 115.683082] usb 4-1: Manufacturer: JetFlash
>>> [ 115.687362] usb 4-1: SerialNumber: 04NWK12LVFGUCOCZ
>>> [ 115.696634] usb-storage 4-1:1.0: USB Mass Storage device detected
>>> [ 115.703795] scsi host1: usb-storage 4-1:1.0
>>> [ 117.070850] scsi 1:0:0:0: Direct-Access JetFlash Transcend 32GB 1100 PQ: 0 ANSI: 6
>>> [ 117.082607] sd 1:0:0:0: [sda] 61702144 512-byte logical blocks: (31.6 GB/29.4 GiB)
>>> [ 117.091254] sd 1:0:0:0: [sda] Write Protect is off
>>> [ 117.097436] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
>>> [ 117.113372] sda: sda1 sda2 sda3
>>> [ 117.121578] sd 1:0:0:0: [sda] Attached SCSI removable disk
>>> 
>>> root@rockdesk:~# lsusb -t
>>> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>>> |__ Port 1: Dev 2, If 0, Class=stor., Driver=usb-storage, 5000M
>> 
>> 5000M looks good!
>> 
>>> /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
>>> /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/3p, 12M
>>> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-omap/3p, 480M
>>> |__ Port 2: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
>>> |__ Port 3: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
>> 
>> I stil could not get more than on the Pyra (haven't tried on OMAP5EVM yet):
>> 
>> [  262.100006] bq24296_otg_enable(1)
>> [  262.182273] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
>> [  262.188886] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 2
>> [  262.198343] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x0000000002010010
>> [  262.208389] xhci-hcd xhci-hcd.2.auto: irq 187, io mem 0x4a030000
>> [  262.215165] bq24296_usb_detect: r8=c0 OTG r9=00
>> [  262.220610] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.20
>> [  262.229383] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>> [  262.237027] usb usb2: Product: xHCI Host Controller
>> [  262.242248] usb usb2: Manufacturer: Linux 4.20.0-rc5-letux+ xhci-hcd
>> [  262.248979] usb usb2: SerialNumber: xhci-hcd.2.auto
>> [  262.266002] hub 2-0:1.0: USB hub found
>> [  262.269957] hub 2-0:1.0: 1 port detected
>> [  262.286712] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
>> [  262.292760] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
>> [  262.300847] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0  SuperSpeed
>> [  262.307990] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
>> [  262.316739] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.20
>> [  262.325481] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>> [  262.333134] usb usb3: Product: xHCI Host Controller
>> [  262.338335] usb usb3: Manufacturer: Linux 4.20.0-rc5-letux+ xhci-hcd
>> [  262.345206] usb usb3: SerialNumber: xhci-hcd.2.auto
>> [  262.362092] hub 3-0:1.0: USB hub found
>> [  262.366095] hub 3-0:1.0: 1 port detected
>> [  266.903658] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
>> [  271.222539] usb usb3-port1: Cannot enable. Maybe the USB cable is bad?
>> 
>> At least the mesaage about the bad USB cable is new. So the patch has some effect.
>> 
>> What I am missing is something like
>> 
>> [ 115.203304] omap-dwc3 4a020000.omap_dwc3: mailbox: VBUS valid
> 
> This was from my local debug patch so you won't see it.

Ah, I see. Maybe I should add a similar debug command...

>> 
>> Maybe this is just different on the Pyra. We do not use the SMPS10 but an
>> external bq24297 with an out-of tree driver we have hacked together and
>> it might have to send some mail.
> 
> Were you able to get High-speed devices working on the xhci port?

No, they simply don't appear in lsusb besides the above shown log (unless I use an USB2 only cable where devices fall back to 480M)
So I think the USB PHY recognizes that there is a device and also that there is an USB3 cable - but can't establish communication.

I have never seen something like:

>>> [ 115.626660] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd


Maybe the cable is really bad.

I still have to do the test with the OMAP5EVM.

BR,
Nikolaus



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux