USB mass storage device identification failure on nxp-ls2088ardb with LSDK20.04 v4.19 kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB mass storage device identification failure on nxp-ls2088ardb with LSDK20.04 v4.19 kernel

1,361 Views
hittzt
Senior Contributor I

Hi exports,

 

When I test nxp-ls2088ardb board with LSDK20.04 v4.19 kernel and lsdk rootfs, I found that the 

mass storage usb device can not be identified when plug in the usb port 1 on the board , and there is nothing in dmesg related with the pluged usb device.

The details as followings:

root@localhost:~# uname -a
Linux localhost 4.19.90-yocto-standard #6 SMP PREEMPT Sat Aug 29 22:16:27 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:~#
root@localhost:~#
root@localhost:~# dmesg | grep usb
[ 1.836446] usbcore: registered new interface driver usbfs
[ 1.840665] usbcore: registered new interface driver hub
[ 1.844725] usbcore: registered new device driver usb
[ 2.472521] iommu: Adding device 3100000.usb3 to group 2
[ 2.476633] dwc3 3100000.usb3: Failed to get clk 'ref': -2
[ 2.480835] dwc3 3100000.usb3: Configuration mismatch. dr_mode forced to gadget
[ 2.487173] iommu: Adding device 3110000.usb3 to group 3
[ 2.491271] dwc3 3110000.usb3: Failed to get clk 'ref': -2
[ 2.495463] dwc3 3110000.usb3: Configuration mismatch. dr_mode forced to gadget
[ 2.502007] usbcore: registered new interface driver usb-storage
[ 2.513166] usb0: HOST MAC 02:a4:2b:15:86:ae
[ 2.516143] usb0: MAC aa:c8:20:f5:ad:04
[ 2.759856] usbcore: registered new interface driver usbhid
[ 2.764125] usbhid: USB HID core driver
[ 3.500915] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
root@localhost:~#
root@localhost:~#
root@localhost:~#

 

It seems that the usb ports forced to gadget, but when link the port to linux host PC, the PC can not identify the device.

Is there any known issue for usb ports on ls2088?

 

Thanks,

Zhantao

 

0 Kudos
5 Replies

1,303 Views
hittzt
Senior Contributor I

Hi Yiping

 

Sorry for replay so late.

I just check the boot image and dtb files for usb mass storage device.

You are right, the usb device will be identified by the image, 

but I found that:

root@localhost:~# zcat /proc/config.gz | grep PASSTH
CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y

the CONFIG_IOMMU_DEFAULT_PASSTHROUGH config is set.

I wander why this config should be set?

If this config not set, the usb device seems can not identified, that is, when I

plug in a usb device to the usb hub, it can not be identified.

Would you please help to verify why this config is set?

 

Thanks,

Zhantao

 

0 Kudos

1,331 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Zhantao,

It seems that there is problem in your Kernel configuration file or dtb file.

I downloaded prebuilt image tar ball with the following command

wget https://www.nxp.com/lgfiles/sdk/lsdk2004/bootpartition_LS_arm64_lts_4.19.tgz

Then boot the target board with Image and dtb file fsl-ls2088a-rdb.dtb provided in this tar ball.

I got the following result, didn't reproduce your problem.

root@localhost:~# uname -a
Linux localhost 4.19.90 #1 SMP PREEMPT Thu Apr 9 10:42:19 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
root@localhost:~# dmesg | grep usb
[ 2.069566] usbcore: registered new interface driver usbfs
[ 2.075103] usbcore: registered new interface driver hub
[ 2.080480] usbcore: registered new device driver usb
[ 3.238433] usbcore: registered new interface driver r8152
[ 3.243933] usbcore: registered new interface driver asix
[ 3.249343] usbcore: registered new interface driver ax88179_178a
[ 3.260977] iommu: Adding device 3100000.usb3 to group 3
[ 3.266425] dwc3 3100000.usb3: Failed to get clk 'ref': -2
[ 3.272232] iommu: Adding device 3110000.usb3 to group 4
[ 3.277637] dwc3 3110000.usb3: Failed to get clk 'ref': -2
[ 3.384936] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.457458] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.473645] usbcore: registered new interface driver usb-storage
[ 3.734689] usbcore: registered new interface driver usbhid
[ 3.740278] usbhid: USB HID core driver
[ 3.744118] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 3.819441] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 3.918521] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 3.924904] scsi host2: usb-storage 2-1:1.0
[ 3.986134] usb-storage 4-1:1.0: USB Mass Storage device detected
[ 3.992414] scsi host3: usb-storage 4-1:1.0
root@localhost:~#

 

Thanks,

Yiping

0 Kudos

1,283 Views
hittzt
Senior Contributor I

Hi Yiping

 

Sorry for replay so late.

I just check the boot image and dtb files for usb mass storage device.

You are right, the usb device will be identified by the image, 

but I found that:

root@localhost:~# zcat /proc/config.gz | grep PASSTH
CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y

the CONFIG_IOMMU_DEFAULT_PASSTHROUGH config is set.

I wander why this config should be set?

If this config not set, the usb device seems can not identified, that is, when I

plug in a usb device to the usb hub, it can not be identified.

Moreover, there will be a fault like the following:

 

arm-smmu 5000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffffb000, fsynr=0x0, cbfrsynra=0xc01, cb=2

 

Would you please help to verify why this config is set?

 

Thanks,

Zhantao

0 Kudos

1,255 Views
hittzt
Senior Contributor I

Hi Yiping,

 

And I found that, if IOMMU PASSTHROUGH is not set for kernel,

the following error message will show:

 

root@nxp-ls20xx:~#
:" -A 5 -B 5 0xx:~# dmesg | grep "arm-smmu 5000000.iommu: Unhandled context fault:
[ 3.856860] hub 1-0:1.0: USB hub found
[ 3.860610] hub 1-0:1.0: 1 port detected
[ 3.864642] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 3.870128] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 3.877787] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 3.884321] arm-smmu 5000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffffb000, fsynr=0x0, cb=3
[ 3.884334] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.902233] hub 2-0:1.0: USB hub found
[ 3.905988] hub 2-0:1.0: 1 port detected
[ 3.910045] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 3.915533] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
--
[ 3.938845] hub 3-0:1.0: USB hub found
[ 3.942603] hub 3-0:1.0: 1 port detected
[ 3.946622] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 3.952110] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[ 3.959768] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[ 3.966325] arm-smmu 5000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffffb000, fsynr=0x0, cb=4
[ 3.966338] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.984242] hub 4-0:1.0: USB hub found
[ 3.987997] hub 4-0:1.0: 1 port detected
[ 3.992150] usbcore: registered new interface driver usb-storage
[ 3.999255] ftm-alarm 2800000.timer: registered as rtc1
root@nxp-ls20xx:~#

 

Is it a known issue?

 

Thanks,

Zhantao

0 Kudos

1,321 Views
hittzt
Senior Contributor I

Hi Yiping,

 

Thanks for your reply.

I will check it again.

 

Thanks again.

Zhantao

0 Kudos