USB Host Driver Selection

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

jay214128
Posts: 23
Joined: Fri Jan 23, 2015 3:29 am

USB Host Driver Selection

Tue Apr 02, 2019 1:38 am

I have the AT91SAM9G45 and AT91SAM9G25 SOCs running linux (4.9.127 kernel). I have both the OHCI and EHCI USB host drivers configured. When the kernel boots, the EHCI driver is always assigned USB bus 1 and the OHCI driver bus 2.

Code: Select all

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Connected to one of the root hub ports is another USB hub. This hub sometimes connects as a high speed (HS) device and sometimes as a full speed (FS) device. How is this choice made?

The issue I am having is that when connecting (incorrectly) as a FS device, it uses the OHCI driver and gets assigned an address on bus 2. This makes the udev rules for it fail and might also result in lower performance. When the USB hub driver reads the connecting device descriptor, it sees that it wants to be a HS device and emits the message,
not running at top speed; connect to a high speed hub
. But the HUB port is high speed capable, (something) just chose the wrong driver.

Incorrect:

Code: Select all

    usb 2-1: new full-speed USB device number 2 using at91_ohci
    usb 2-1: not running at top speed; connect to a high speed hub
    usb 2-1: New USB device found, idVendor=0424, idProduct=2533
    usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    hub 2-1:1.0: USB hub found
    hub 2-1:1.0: 3 ports detected
Correct:

Code: Select all

    usb 1-1: new high-speed USB device number 2 using atmel-ehci
    usb 1-1: New USB device found, idVendor=0424, idProduct=2533
    usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    hub 1-1:1.0: USB hub found
    hub 1-1:1.0: 3 ports detected
How does the USB host driver get selected?
jay214128
Posts: 23
Joined: Fri Jan 23, 2015 3:29 am

Re: USB Host Driver Selection

Thu Apr 04, 2019 1:04 am

I have resolved this issue. It turned out to be the USB Does Not Start after Power-up errata described in the Atmel AT91SAM9G45-CU (6438G–ATARM–19-Apr-11) SOC manual. I found a place in my kernel init code to add the work around and this appears to fix the issue I was having.

Return to “LINUX”

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 5 guests