turing-machines / BMC-Firmware

Turing-pi BMC firmware
http://turingpi.com
GNU General Public License v2.0
239 stars 29 forks source link

Device tree configuration mistake breaks USB host support #9

Closed CFSworks closed 1 year ago

CFSworks commented 1 year ago

The OHCI/EHCI devices (needed for BMC to function as a USB host) are failing to bind their drivers, because the usb1-vbus regulator's driver can't bind. The kernel log says:

[    3.589216] sun8iw20-pinctrl 2000000.pinctrl: pin PB3 already requested by 2501000.uart; cannot claim for 2000000.pinctrl:35
[    3.601842] sun8iw20-pinctrl 2000000.pinctrl: pin-35 (2000000.pinctrl:35) status -22
[    3.610750] reg-fixed-voltage: probe of usb1-vbus failed with error -22

The device tree says the vbus regulator can be switched on/off with pin PB3, but on the actual board, PB3 is a serial line to node 3. I don't know how the board itself is wired, but it looks like this line has been moved to PG4?

svenrademakers commented 1 year ago

PB3 is wrong. As far as I can tell, your hypothesis. let me verify if PG4 is correct

CFSworks commented 1 year ago

I have since learned that PG4 controls the 5V line in the external USB port, which should actually be disabled when the internal USB host is being used.

The usb1-vbus regulator should either be removed or replaced with a dummy. No 5V supply is needed to use internal USB.

CFSworks commented 1 year ago

Also, I am planning on rewriting the devicetree for #5 anyway. This one will be resolved when I do that - could you assign both that and this to me?