I am currently facing an issue using multiple modems with 22.03.3 on mt7621 with a USB hub.
Two modems can be detected via lsusb:
Bus 001 Device 003: ID 2c7c:0306 Quectel EP06-E
Bus 001 Device 004: ID 2c7c:0306 Quectel EP06-E
Bus 001 Device 002: ID 0424:2134 SMSC USB2134B
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.161 xhci-hcd xHCI Host Controller
Bus 002 Device 002: ID 0424:5534 SMSC USB5534B
Bus 002 Device 001: ID 1d6b:0003 Linux 5.10.161 xhci-hcd xHCI Host Controller
But only one can get its serial interface:
ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
How can I enable the serial and wdm interface for both modems?
This is the log from the working one when plug it out and in:
[ 177.145395] usb 1-1.2: USB disconnect, device number 3
[ 177.156037] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 177.172452] option 1-1.2:1.0: device disconnected
[ 177.182549] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 177.198851] option 1-1.2:1.1: device disconnected
[ 177.209119] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 177.225573] option 1-1.2:1.2: device disconnected
[ 177.235653] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 177.251964] option 1-1.2:1.3: device disconnected
[ 177.261949] qmi_wwan 1-1.2:1.4 wwan0: unregister 'qmi_wwan' usb-1e1c0000.xhci-1.2, WWAN/QMI device
[ 195.356646] usb 1-1.2: new high-speed USB device number 6 using xhci-mtk
[ 195.502141] option 1-1.2:1.0: GSM modem (1-port) converter detected
[ 195.515192] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 195.530183] option 1-1.2:1.1: GSM modem (1-port) converter detected
[ 195.543258] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 195.558177] option 1-1.2:1.2: GSM modem (1-port) converter detected
[ 195.571195] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 195.586054] option 1-1.2:1.3: GSM modem (1-port) converter detected
[ 195.599008] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 195.621493] qmi_wwan 1-1.2:1.4: cdc-wdm0: USB WDM device
[ 195.634003] qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at usb-1e1c0000.xhci-1.2, WWAN/QMI device, 8a:88:59:a9:20:d3
And for the one that was not working:
[ 276.985346] usb 1-1.4: USB disconnect, device number 5
[ 288.286267] usb 1-1.4: new high-speed USB device number 7 using xhci-mtk
[ 288.428217] usb 1-1.4: Not enough host controller resources for new device state.
[ 288.443349] usb 1-1.4: can't set config #1, error -12
And that's your problem. I had this once, also on a MT7621 chipset. I was able to work around it by changing the modem configuration to only expose 2 serial ports. You will probably have to limit yours to just one to support the second WDM interface.
There are several reports on this issue here in the forum and in the bug tracker. It seems like a hardware limit of the xHCI controller in the MT7621 SoC. You might also be successful by disabling all devices you do not need, for example the USB3 hub and the complete second USB bus, by calling (ref)
echo 1 > /sys/bus/usb/devices/<path to device>/remove
You can try disabling unneeded interfaces on the modem(s).
Currently you have <diag>,<nmea>,<at_port>,<modem>,<rmnet>
I would try disabling everything except <at_port> and <rmnet>, however I remember seeing a report that said that not all interfaces can be enabled/disabled individually.
I suggest you asking about the port combos in Quectel forum.