GL.iNet X750: how to enable USB port?

I just converted an old GL.iNet X750 (spitz) to OpenWRT 24.10.0-rc5 and the USB2 port is not working. It does not even provide any power. I installed a pile of kernel modules and it's still dead. I noticed on an X750 that runs the GL.iNet firmware that the port has no power until the OS boots and evidently enables the port.

Some debug info:

# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=hub/4p, 480M
        |__ Port 001: Dev 003, If 0, Class=[unknown], Driver=usb-storage, 480M
        |__ Port 002: Dev 004, If 0, Class=[unknown], Driver=option, 480M
        |__ Port 002: Dev 004, If 1, Class=[unknown], Driver=option, 480M
        |__ Port 002: Dev 004, If 2, Class=[unknown], Driver=option, 480M
        |__ Port 002: Dev 004, If 3, Class=[unknown], Driver=option, 480M
        |__ Port 002: Dev 004, If 4, Class=[unknown], Driver=qmi_wwan, 480M
# (these represent the built-in SDcard slot and an LTE modem)

# opkg list-installed | grep usb
kmod-phy-ath79-usb - 6.6.69-r1
kmod-rt2800-usb - 6.6.69.6.12.6-r1
kmod-rt2x00-usb - 6.6.69.6.12.6-r1
kmod-usb-acm - 6.6.69-r1
kmod-usb-core - 6.6.69-r1
kmod-usb-ehci - 6.6.69-r1
kmod-usb-gadget - 6.6.69-r1
kmod-usb-gadget-eth - 6.6.69-r1
kmod-usb-lib-composite - 6.6.69-r1
kmod-usb-net - 6.6.69-r1
kmod-usb-net-cdc-ether - 6.6.69-r1
kmod-usb-net-qmi-wwan - 6.6.69-r1
kmod-usb-net-rndis - 6.6.69-r1
kmod-usb-serial - 6.6.69-r1
kmod-usb-serial-option - 6.6.69-r1
kmod-usb-serial-wwan - 6.6.69-r1
kmod-usb-storage - 6.6.69-r1
kmod-usb-wdm - 6.6.69-r1
kmod-usb2 - 6.6.69-r1
libusb-1.0-0 - 1.0.27-r1
rt2800-usb-firmware - 20241110-r1
usbids - 0.387-r1
usbutils - 017-r1

With the GL.iNet firmware when I plug a Mifi into the port I see:

# cat /sys/kernel/debug/usb/devices
[...]

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#=  7 Spd=480  MxCh= 0 
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1410 ProdID=b020 Rev= 4.14
S:  Manufacturer=Novatel Wireless 
S:  Product=M2000
S:  SerialNumber=7fffffff
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=ef(misc ) Sub=04 Prot=01
I:* If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

But there is no trace of this on the X750 that runs OpenWRT

You probably need to toggle GPIO2. Mind the offset in the numbering or gpio base.
https://openwrt.org/docs/techref/hardware/port.gpio

Yup! Did I miss that in the docs somewhere?
For the next person:

echo 514 >/sys/class/gpio/export
echo out >/sys/class/gpio/gpio514/direction
echo 0 >/sys/class/gpio/gpio514/value

And now:

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.6.69 ehci_hcd EHCI Host Controller
Bus 001 Device 002: ID 05e3:0618  USB2.0 Hub
Bus 001 Device 003: ID 05e3:0752 Generic USB Storage
Bus 001 Device 004: ID 2c7c:0306 Quectel LTE-A Module
Bus 001 Device 007: ID 1410:b020 Novatel Wireless M2000

That last device is attached to the USB port.

Thanks a ton for the quick response!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.