3

I am working with a team designing a PCB that works with the Raspberry Pi Compute Module 3 card. We are having a bit of trouble with the USB ports. The schematic of the USB portion is somewhat similar to the Development board. We are using a 3 port TUSB2036 connected to one of the FSUSB42UMX parts.

The USB hub recognizes the devices (I have tried multiple), but I am unable to mount or interact with them beyond lsusb. Checking the dmesg logs points to this error

[ 1641.913300] usb 1-1.2: rejected 1 configuration due to insufficient available bus power
[ 1641.913310] usb 1-1.2: no configuration chosen from 1 choice
[ 1641.913319] usb 1-1.2: No support over 100mA

This problem does not occur on the Raspberry Pi Compute Module I/O Development Board.

I have added max_usb_current=1 to the config.txt file.

I have also tried echo 1 > /sys/bus/usb/devices/1-1.2/bConfigurationValue both with and without sudo, but I get a permissions error on both.

Checking the raspberry/linux github I can see what is causing the error. My more experienced colleague surmises it's an firmware issue where Raspbian has a hard limit on how much current it offers each USB device. The USB drivers of Raspbian is assuming things about the power consumption of each USB port/device that is not true for our PCB. My questions are as follows

  • Is this theory reasonable? Is there a good way to check portions of the USB driver like values of variables like udev->bus_mA, usb_get_max_power(udev, c), hdev->bus_mA, etc. ?

  • Are there any configuration options I'm missing that could I could use to test, ignore, or solve the problem?

  • Are there driver alternatives where we could bypass this issue? I have been looking at rsta2/usb driver as an alternative.

  • Any resources I should look over to educate myself more?

Please let me know if you require any more information, and thanks for your time.

Stormon
  • 31
  • 1

1 Answers1

1

I know this is an old question but for anyone like me who stumbles here in search of answers, here is a solution.

I had a similar issue where a USB2514 hub from Microchip defaults into self-powered mode and required configuration via the SMBus to allow bus-powered devices to register. Self-powered devices down stream of the hub are limited to 100mA current draw by default in this hub.

I received the same permissions error running the following.

sudo echo 1 > /sys/bus/usb/devices/1-1.2/bConfigurationValue 

My understanding is the piping of the output is performed with the current shell permissions not the sudo permissions as per this helpful article (https://www.adamsdesk.com/posts/sudo-echo-permission-denied/)

Running the following command solves that issue and allows the device to register correctly, albeit with a warning in dmesg "usb 1-1.2: new config #1 exceeds power limit by 400mA"

sudo bash -c "echo 1 > /sys/bus/usb/devices/1-1.2/bConfigurationValue"

Hope this helps someone.

Edited: To clarify that it is down stream devices that are limited to 100mA by the host, by default, to ensure that all 4 devices remain within the 500mA budget for USB devices.