Usbfs not automatically loaded on imx7d

Hello,

I´m trying to get a usb camera with proprietary drivers working on iMX7D. On a Raspberry Pi it is working with the same procedure but on the iMX7 not. I´m using an Angstrom Linux version 4.9.220-2.8.7+g5722926 built from the yocto demo image (I also tried with and without LXDE desktop, but same behaviour)

After installing the drivers without any error messages and connecting the device it is recognised by the system, as this line appears on iMX7:

[   11.284091] usb 1-1: new high-speed USB device number 3 using ci_hdrc

On Raspberry Pi there are more lines after plugging in the device:

[25083.837244] usb 1-1.3: new high-speed USB device number 12 using xhci_hcd
[25083.967677] usb 1-1.3: New USB device found, idVendor=1409, idProduct=1645, bcdDevice= 0.00
[25083.967693] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0

On the iMX7 the camera cannot be used and is not recognised by the software.One difference that I found is that on the Pi there is automatically usbfs loaded as a driver, here is the lsusb -t output:

|__ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=usbfs, 480M

But on iMX7 the driver field stays empty:

 |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 480M

So to fix this I tried to load the driver manually by writing 1-1:1.0 into /sys/bus/usb/drivers/usbfs/bind, but it says that the device cannot be found. But this seems to be expected behaviour as explained in this thread:

https://linux-usb.vger.kernel.narkive.com/9vSWrrhL/help-using-sys-bus-usb-drivers-usbfs-bind-doesn-t-work

And indeed on the Pi after unbinding the driver usbfs and trying to bind it again there is the same error message and the driver cannot be loaded manually … The driver can be loaded again after unplugging the device

As further information here is the output of ls -l /sys/bus/usb/devices/1-1.3:1.0/ on the Pi:

insgesamt 0
-rw-r--r-- 1 root root 4096 Dez 30 14:10 authorized
-r--r--r-- 1 root root 4096 Dez 30 14:09 bAlternateSetting
-r--r--r-- 1 root root 4096 Dez 30 14:08 bInterfaceClass
-r--r--r-- 1 root root 4096 Dez 30 14:08 bInterfaceNumber
-r--r--r-- 1 root root 4096 Dez 30 14:09 bInterfaceProtocol
-r--r--r-- 1 root root 4096 Dez 30 14:09 bInterfaceSubClass
-r--r--r-- 1 root root 4096 Dez 30 14:08 bNumEndpoints
lrwxrwxrwx 1 root root    0 Dez 30 14:08 driver -> ../../../../../../../../../../../bus/usb/drivers/usbfs
drwxr-xr-x 3 root root    0 Dez 30 14:10 ep_06
drwxr-xr-x 3 root root    0 Dez 30 14:10 ep_82
-r--r--r-- 1 root root 4096 Dez 30 14:10 modalias
drwxr-xr-x 2 root root    0 Dez 30 14:10 power
lrwxrwxrwx 1 root root    0 Dez 30 14:10 subsystem -> ../../../../../../../../../../../bus/usb
-r--r--r-- 1 root root 4096 Dez 30 14:10 supports_autosuspend
-rw-r--r-- 1 root root 4096 Dez 30 14:08 uevent

And here as a comparison the output of ls -l /sys/bus/usb/devices/1-1:1.0/ on the iMX7:

-rw-r--r--    1 root     root          4096 Oct 20 14:15 authorized
-r--r--r--    1 root     root          4096 Oct 20 14:01 bAlternateSetting
-r--r--r--    1 root     root          4096 Oct 20 13:54 bInterfaceClass
-r--r--r--    1 root     root          4096 Oct 20 14:01 bInterfaceNumber
-r--r--r--    1 root     root          4096 Oct 20 13:54 bInterfaceProtocol
-r--r--r--    1 root     root          4096 Oct 20 13:54 bInterfaceSubClass
-r--r--r--    1 root     root          4096 Oct 20 14:01 bNumEndpoints
-r--r--r--    1 root     root          4096 Oct 20 14:15 modalias
drwxr-xr-x    2 root     root             0 Oct 20 14:15 power
lrwxrwxrwx    1 root     root             0 Oct 20 14:15 subsystem -> ../../../../../../../../../bus/usb
-r--r--r--    1 root     root          4096 Oct 20 14:15 supports_autosuspend
-rw-r--r--    1 root     root          4096 Oct 20 13:54 uevent

This also shows that no driver is loaded automatically…

So my question is:

  1. Why is usbfs not loaded automatically? If I understand it correctly it should load automatically…
  2. And is there a possibility to solve this? Either load it manually or change something in the yocto build?
  3. Or might there be another problem that I´m not aware of?

HI @msx23

Thanks for writing to the Toradex Community!

I´m using an Angstrom Linux version 4.9.220-2.8.7+g5722926 built from the yocto demo image

Did you try to use the image provided by Toradex?

Why is usbfs not loaded automatically? If I understand it correctly it should load automatically…

Have you done any changes to the kernel config? Could you provide the complete dmesg.log in a text file and also share the output of lsmod?

Best regards,
Jaski

Thanks for your answer, after trying some things this morning, I just found a workaround which is enogh for me at the moment.

After a fresh install and manually restarting the driver with systemctl the usb device is correctly recognized. And then usbfs is also correctly loaded, so as an answer to the original question it seems to be normal that usbfs is not loaded until the driver is correctly initialized (after plugging in the device). I´ll do further testing and if I have more information on the subject, I´ll leave another comment. But thanks for the moment.

Perfect that you found a solution.

Thanks for the feedback.