RAK 7391 - No USB Connection on VIA VL805

Hi there
I experienced that I can not connect ANY devices to the USB routes of the VIA VL805, whether it is the USB connector or the Mini PCIE card. I tried standard USB Flashstorages, Mini PCIE Cards ( Lora and LTE) and a USB Hub. lsusb is stating the PCIE Switch and the VL805 are connected but nothing else i connected, lspci states the PCIE Switch and the VIA correctly.
Is there any chance to check the VL805 itself ? Ive seen the Flashprom approach when you build your own device (EEPromless for example) but this wont help at all.
→ How to read the activity states of the VL805 ?
→ Is there any requirement for the USB Bridge to work properly ?

Best regards ferom germany, Adrian

Update:
USB A (USB 3.0 Con) via VL805 are working now. Had another Image before and not 100% power cycled maybe. Running now on Rak PI OS 0.6.0 properly.
M-PCIE_3 : Not detecting Quectel EC25 nor the supplied Lora 5146 USB Version. Primay Use of 4G stated in the Wiki.
So to confirm:
Coldstart with Rak PI OS 0.6.0 solved the USB 3.0 connection problem on the A Slots. MPCIE #3 is still not working with 2 different USB Cards ( Quectel EC25 and RAK 5146 USB)

I’m having the same exact issue. EC25-NA modem and RAK5146 USB not appearing. Also for fun I added a Sierra Wireless AirPrime EM7345 to the M.2 slot to see if it was even getting power and that’s not appearing either.

Was trying to understand your update where you got it working. @AdrianDE can you elaborate on your solution?

Here’s what I’m running…

Flashed 20221019-rakpios-0.6.0-arm64-lite.zip

system info:
  Distro......: RAK PiOS GNU/Linux (bullseye)
  Kernel......: Linux 5.15.74-v8+

Hi @barryjump ,
I still do not have any solution for this problem. The MPCIE#3 slot is still not responding to any of my USB Cards inserted. What I did to have the USB 3.0 A working again was to use a clean image and disconnect the device for a few minutes. Attached a picture to understand which are working and which not.

Approach currently:
In the meantime I am trying to disconnect the PCI Lanes routed to MPCIE#3.
When entering lspci you can find the specific devices.

rak@rakpios:~ $ lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:01.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:03.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:05.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:07.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
05:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

What I am trying is simply “remove” the device PCI lanes from the kernel by echo 1 into them ( kernel - How do I turn off PCI devices? - Ask Ubuntu ).

rak@rakpios:/sys/bus/pci/devices $ ls
0000:00:00.0  0000:01:00.0  0000:02:01.0  0000:02:03.0  0000:02:05.0  0000:02:07.0  0000:03:00.0  0000:05:00.0
rak@rakpios:/sys/bus/pci/devices $ echo 1 | sudo tee 0000\:02\:07.0/remove
1
rak@rakpios:/sys/bus/pci/devices $ lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:01.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:03.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
02:05.0 PCI bridge: ASMedia Technology Inc. ASM1184e PCIe Switch Port
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
05:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

In my case 02:05 is the VIA VL805 and the 02:01 was the RTL ETH.
After removing all the PCI lanes which i assumed are not needed I did a reset on the VIA HUB via usbreset (usbreset › Wiki › ubuntuusers.de)

rak@rakpios:/sys/bus/pci/devices $ usbreset
Usage:
  usbreset PPPP:VVVV - reset by product and vendor id
  usbreset BBB/DDD   - reset by bus and device number
  usbreset "Product" - reset by product name
Devices:
  Number 003/004  ID 1a40:0101  USB 2.0 Hub
  Number 003/005  ID 1a86:7523  USB Serial
  Number 001/002  ID 2109:3431  USB2.0 Hub
  Number 003/003  ID 2c7c:0125  EC25-EUX
  Number 003/006  ID 1a86:7523  USB Serial
  Number 003/002  ID 1a40:0101  USB 2.0 Hub
rak@rakpios:/sys/bus/pci/devices $ sudo usbreset 001/002
Resetting USB2.0 Hub ... ok

Still no device found on my MPCIE#3.

For Info: The EC25 is currently plugged into the MPCIE#2, in Slot 3 is a RAK Lora USB device which is usually displayed as STM USB SPI Bridge or UART.

Sorry you’re stuck - seems I am too.
I had briefly seen my Quectel and RAK concentrators appear using lsusb but now they’ve gone missing.

One question I have is how do you know which is which mPCIe port when running lsusb or lspci?

rak@rakpios:~ $ lsusb
Bus 003 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 003 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 003 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 003: ID 0483:5740 STMicroelectronics Virtual COM Port
Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Is it the bus? For example, is Bus 001 the mPCIe #1? If so, I’m wondering why each bus could have multiple devices. Bus 003 shows 6 devices which is a little confusing.

Use lsusb -vv to view any connected modules.
Bus 001 ist the VIA connected via the PCI bridge. (double typo)
Bus 003 is USB Bus 3, which is the USB Hub on the bottom of my graphic here, so lets call it the default USB.

There is currently connected (guesses) : One STM which is maybe a RAK Lora (type lsusb -vv for more info), 2 Qinheng CH340 which seems to be the USB2UART Bridge which is controlling the GPIOs, Terminus Technology is a simple USB Hub which is seen twice on the graphic and there fore twice aswell in the device listing. Hope this may help.
Ive got some information of the RAK Support via Mail that i should try to use the GPIO pins on the MPCIE3 to reset or wakeup my module. Will give this a try. Just had to figure out what IO0_0 Pin 1 Wake and IO0_3 Pin 20 W_Disable and furthermore Pin 22 PCIE_RST_OUT3 connected to PERST pins i had to drive.

Thanks @AdrianDE! You are right, the Bus 003 Device 003: ID 0483:5740 STMicroelectronics Virtual COM Port is my RAK5146 confirmed by @xoseperez.

Perviously I did also have a Bus 001 Device 003: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode) which I believe was my Quectel EC25, but it’s since gone missing from lsusb.

I’ll try a fresh OS install and a hard reboot. Unfortunately I was hoping for a quick peripheral setup so I could Balenify the board, but it looks like there will be some additional work to get up an running.

In that forum someone posted a link to CM4 USB issue in Github which I’m looking through.

Also, I’m digging into this output to see if there is anything I can figure out:

rak@rakpios:~ $ journalctl -b | grep usb
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver usbfs
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver hub
Jan 17 01:23:26 rakpios kernel: usbcore: registered new device driver usb
Jan 17 01:23:26 rakpios kernel: usb_phy_generic phy: supply vcc not found, using dummy regulator
Jan 17 01:23:26 rakpios kernel: usb_phy_generic phy: dummy supplies not allowed for exclusive requests
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver r8152
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver lan78xx
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver smsc95xx
Jan 17 01:23:26 rakpios kernel: usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
Jan 17 01:23:26 rakpios kernel: usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jan 17 01:23:26 rakpios kernel: usb usb1: Product: xHCI Host Controller
Jan 17 01:23:26 rakpios kernel: usb usb1: Manufacturer: Linux 5.15.74-v8+ xhci-hcd
Jan 17 01:23:26 rakpios kernel: usb usb1: SerialNumber: 0000:05:00.0
Jan 17 01:23:26 rakpios kernel: usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
Jan 17 01:23:26 rakpios kernel: usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jan 17 01:23:26 rakpios kernel: usb usb2: Product: xHCI Host Controller
Jan 17 01:23:26 rakpios kernel: usb usb2: Manufacturer: Linux 5.15.74-v8+ xhci-hcd
Jan 17 01:23:26 rakpios kernel: usb usb2: SerialNumber: 0000:05:00.0
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver uas
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver usb-storage
Jan 17 01:23:26 rakpios kernel: usbcore: registered new interface driver usbhid
Jan 17 01:23:26 rakpios kernel: usbhid: USB HID core driver
Jan 17 01:23:26 rakpios kernel: usb 1-1: new high-speed USB device number 2 using xhci_hcd
Jan 17 01:23:26 rakpios kernel: usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20
Jan 17 01:23:26 rakpios kernel: usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jan 17 01:23:26 rakpios kernel: usb 1-1: Product: USB2.0 Hub
Jan 17 01:23:26 rakpios kernel: usb 1-1.3: new high-speed USB device number 3 using xhci_hcd
Jan 17 01:23:27 rakpios kernel: dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
Jan 17 01:23:27 rakpios kernel: dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
Jan 17 01:23:27 rakpios kernel: dwc2 fe980000.usb: DWC OTG Controller
Jan 17 01:23:27 rakpios kernel: dwc2 fe980000.usb: new USB bus registered, assigned bus number 3
Jan 17 01:23:27 rakpios kernel: dwc2 fe980000.usb: irq 23, io mem 0xfe980000
Jan 17 01:23:27 rakpios kernel: usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
Jan 17 01:23:27 rakpios kernel: usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jan 17 01:23:27 rakpios kernel: usb usb3: Product: DWC OTG Controller
Jan 17 01:23:27 rakpios kernel: usb usb3: Manufacturer: Linux 5.15.74-v8+ dwc2_hsotg
Jan 17 01:23:27 rakpios kernel: usb usb3: SerialNumber: fe980000.usb
Jan 17 01:23:28 rakpios kernel: usb 3-1: new high-speed USB device number 2 using dwc2
Jan 17 01:23:28 rakpios kernel: usb 3-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
Jan 17 01:23:28 rakpios kernel: usb 3-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jan 17 01:23:28 rakpios kernel: usb 3-1: Product: USB 2.0 Hub
Jan 17 01:23:28 rakpios kernel: usb 3-1.2: new full-speed USB device number 3 using dwc2
Jan 17 01:23:29 rakpios kernel: usbcore: registered new interface driver brcmfmac
Jan 17 01:23:29 rakpios kernel: usb 3-1.2: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
Jan 17 01:23:29 rakpios kernel: usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 17 01:23:29 rakpios kernel: usb 3-1.2: Product: STM32 Virtual ComPort
Jan 17 01:23:29 rakpios kernel: usb 3-1.2: Manufacturer: STMicroelectronics
Jan 17 01:23:29 rakpios kernel: usb 3-1.2: SerialNumber: 203A36654231
Jan 17 01:23:29 rakpios kernel: usb 3-1.4: new high-speed USB device number 4 using dwc2
Jan 17 01:23:29 rakpios kernel: usb 3-1.4: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
Jan 17 01:23:29 rakpios kernel: usb 3-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jan 17 01:23:29 rakpios kernel: usb 3-1.4: Product: USB 2.0 Hub
Jan 17 01:23:41 rakpios mtp-probe[446]: checking bus 3, device 3: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.2"
Jan 17 01:23:41 rakpios kernel: usbcore: registered new interface driver cdc_acm
Jan 17 01:23:41 rakpios mtp-probe[467]: checking bus 3, device 3: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.2"
Jan 17 01:23:41 rakpios kernel: usb 3-1.4.3: new full-speed USB device number 5 using dwc2
Jan 17 01:23:41 rakpios kernel: usb 3-1.4.3: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Jan 17 01:23:41 rakpios kernel: usb 3-1.4.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Jan 17 01:23:41 rakpios kernel: usb 3-1.4.3: Product: USB Serial
Jan 17 01:23:42 rakpios rpi-eeprom-update[511]: See: https://github.com/raspberrypi/usbboot/blob/master/Readme.md
Jan 17 01:23:42 rakpios kernel: usb 1-1.3: device descriptor read/64, error -110
Jan 17 01:23:42 rakpios kernel: usb 3-1.4.4: new full-speed USB device number 6 using dwc2
Jan 17 01:23:42 rakpios kernel: usb 3-1.4.4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Jan 17 01:23:42 rakpios kernel: usb 3-1.4.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Jan 17 01:23:42 rakpios kernel: usb 3-1.4.4: Product: USB Serial
Jan 17 01:23:42 rakpios mtp-probe[627]: checking bus 3, device 5: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.3"
Jan 17 01:23:42 rakpios mtp-probe[629]: checking bus 3, device 6: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.4"
Jan 17 01:23:45 rakpios ModemManager[581]: <info>  [base-manager] couldn't check support for device '/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.2': not supported by any plugin
Jan 17 01:23:57 rakpios kernel: usb 1-1.3: device descriptor read/64, error -110
Jan 17 01:23:57 rakpios kernel: usb 1-1.3: new high-speed USB device number 4 using xhci_hcd
Jan 17 01:24:03 rakpios kernel: usb 1-1.3: device descriptor read/64, error -110
Jan 17 01:24:18 rakpios kernel: usb 1-1.3: device descriptor read/64, error -110
Jan 17 01:24:18 rakpios kernel: usb 1-1-port3: attempt power cycle
Jan 17 01:24:18 rakpios kernel: usb 1-1.3: new high-speed USB device number 5 using xhci_hcd
Jan 17 01:24:20 rakpios kernel: usb 1-1.3: Device not responding to setup address.
Jan 17 01:24:22 rakpios kernel: usb 1-1.3: Device not responding to setup address.
Jan 17 01:24:22 rakpios kernel: usb 1-1.3: device not accepting address 5, error -71
Jan 17 01:24:22 rakpios kernel: usb 1-1.3: new high-speed USB device number 6 using xhci_hcd
Jan 17 01:24:24 rakpios kernel: usb 1-1.3: Device not responding to setup address.
Jan 17 01:24:26 rakpios kernel: usb 1-1.3: Device not responding to setup address.
Jan 17 01:24:26 rakpios kernel: usb 1-1.3: device not accepting address 6, error -71
Jan 17 01:24:26 rakpios kernel: usb 1-1-port3: unable to enumerate USB device
Jan 17 01:24:26 rakpios kernel: usbcore: registered new interface driver usbserial_generic
Jan 17 01:24:26 rakpios kernel: usbserial: USB Serial support registered for generic
Jan 17 01:24:26 rakpios kernel: usbcore: registered new interface driver ch341
Jan 17 01:24:26 rakpios kernel: usbserial: USB Serial support registered for ch341-uart
Jan 17 01:24:26 rakpios kernel: usb 3-1.4.3: ch341-uart converter now attached to ttyUSB0
Jan 17 01:24:26 rakpios kernel: usb 3-1.4.4: ch341-uart converter now attached to ttyUSB1
Jan 17 01:24:26 rakpios mtp-probe[1088]: checking bus 3, device 6: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.4"
Jan 17 01:24:26 rakpios mtp-probe[1089]: checking bus 3, device 5: "/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.3"
Jan 17 01:24:29 rakpios ModemManager[581]: <info>  [base-manager] couldn't check support for device '/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.3': not supported by any plugin
Jan 17 01:24:29 rakpios ModemManager[581]: <info>  [base-manager] couldn't check support for device '/sys/devices/platform/soc/fe980000.usb/usb3/3-1/3-1.4/3-1.4.4': not supported by any plugin

If my RAK5146 is visible in lsusb now I’m going to try running Basicstation to see if I can get a connection.

However, the Quectel is another issue. Even when it was visible in lsusb, ModemManage (mmcli) was not seeing it which complicates matters a bit.

rak@rakpios:~ $ mmcli -L
No modems were found

Also, strangely the docs suggest using minicom to run some AT commands directly to the modem on ttyUSB3:

sudo minicom -D /dev/ttyUSB3

However, in my /dev/ folder I don’t see USB3 (only ttyUSB0 and ttyUSB1) which I believe is a confirmation of your original issue.

rak@rakpios:/dev $ ls
ashmem           fd         kvm           media3        ram0   ram9       tty0   tty22  tty36  tty5   tty63      vc-mem  vcsm-cma     video13
autofs           full       log           mem           ram1   random     tty1   tty23  tty37  tty50  tty7       vcs     vcsu         video14
block            fuse       loop0         mmcblk0       ram10  rfkill     tty10  tty24  tty38  tty51  tty8       vcs1    vcsu1        video15
btrfs-control    gpiochip0  loop1         mmcblk0boot0  ram11  rtc        tty11  tty25  tty39  tty52  tty9       vcs2    vcsu2        video16
bus              gpiochip1  loop2         mmcblk0boot1  ram12  rtc0       tty12  tty26  tty4   tty53  ttyACM0    vcs3    vcsu3        video18
cachefiles       gpiochip2  loop3         mmcblk0p1     ram13  serial     tty13  tty27  tty40  tty54  ttyAMA0    vcs4    vcsu4        video19
cec0             gpiochip3  loop4         mmcblk0p2     ram14  serial1    tty14  tty28  tty41  tty55  ttyprintk  vcs5    vcsu5        video20
cec1             gpiomem    loop5         mmcblk0rpmb   ram15  shm        tty15  tty29  tty42  tty56  ttyUSB0    vcs6    vcsu6        video21
char             hwrng      loop6         mqueue        ram2   snd        tty16  tty3   tty43  tty57  ttyUSB1    vcsa    vga_arbiter  video22
console          i2c-1      loop7         net           ram3   spidev0.0  tty17  tty30  tty44  tty58  uhid       vcsa1   vhci         video23
cpu_dma_latency  i2c-20     loop-control  null          ram4   spidev0.1  tty18  tty31  tty45  tty59  uinput     vcsa2   vhost-net    video31
cuse             i2c-21     mapper        port          ram5   stderr     tty19  tty32  tty46  tty6   urandom    vcsa3   vhost-vsock  watchdog
disk             initctl    media0        ppp           ram6   stdin      tty2   tty33  tty47  tty60  v4l        vcsa4   video10      watchdog0
dma_heap         input      media1        ptmx          ram7   stdout     tty20  tty34  tty48  tty61  vchiq      vcsa5   video11      zero
dri              kmsg       media2        pts           ram8   tty        tty21  tty35  tty49  tty62  vcio       vcsa6   video12

Quick update, I gave up on the mPCIe #3 slot and moved the Quectel to mPCIe #2 and it’s working nicely.

cdc-wdm0: connected to m2mglobal
        "cdc-wdm0"
        gsm (qmi_wwan, option1), hw, iface wwan0, mtu 1500
        inet4 10.xx.xxx.xx/27
        route4 0.0.0.0/0

And to correct my earlier post, /dev/ttyUSB3 is now available.