Qualcomm MDM9x55/RQ501Q-EU modem PCIe detection issue in OpenWrt

PCIe bridge detected but modem endpoint not appearing

Hardware:

  • Router: Sagemcom Fast 5866T (IPQ8074)
  • Modem: Qualcomm MDM9x55 LTE Modem [17cb:0302]
root@OpenWrt:~# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='24.10-SNAPSHOT'
DISTRIB_REVISION='r30728-5a8fab259f'
DISTRIB_TARGET='qualcommax/ipq807x'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt 24.10-SNAPSHOT r30728-5a8fab259f'
DISTRIB_TAINTS='no-all'
root@OpenWrt:~# cat /etc/board.json
{
        "model": {
                "id": "sagemcom,fast-5866t",
                "name": "Sagemcom Fast 5866T"
        },
        "network": {
                "lan": {
                        "device": "eth0",
                        "protocol": "static"
                },
                "wan": {
                        "device": "eth1",
                        "protocol": "dhcp"
                }
        }
}

lspci/lsusb output:
After flashing, I ran:

root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 001 Device 002: ID 2c7c:0800 Quectel RG501Q-EU
Bus 002 Device 001: ID 1d6b:0003 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 003 Device 001: ID 1d6b:0002 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux 6.12.57 xhci-hcd xHCI Host Controller

root@OpenWrt:~# lspci -nn
0000:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc Device [17cb:1002]
0001:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc MDM9x55 LTE Modem [Snapdragon X16] [17cb:0302]

However, after a power cycle or turning the device off and on, the modem disappears and never comes back.

After power cycle off/onn

root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 002 Device 001: ID 1d6b:0003 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 003 Device 001: ID 1d6b:0002 Linux 6.12.57 xhci-hcd xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux 6.12.57 xhci-hcd xHCI Host Controller

root@OpenWrt:~# lspci -nn
0000:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc Device [17cb:1002]
0001:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc MDM9x55 LTE Modem [Snapdragon X16] [17cb:0302]
root@OpenWrt:~#

Anyone have a solution for this? I’m using MHI/PCIe.

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

official OpenWrt project

root@OpenWrt:~# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='24.10-SNAPSHOT'
DISTRIB_REVISION='r29036-4d1c1d7754'
DISTRIB_TARGET='qualcommax/ipq807x'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt 24.10-SNAPSHOT r29036-4d1c1d7754'
DISTRIB_TAINTS='no-all'
root@OpenWrt:~# cat /etc/board.json
{
"model": {
"id": "sagemcom,5866t",
"name": "Sagemcom Fast 5866T"
},
"network": {
"lan": {
"ports": [
"eth0",
"eth1"
],
"protocol": "static",
"macaddr": ":"
},
"wan": {
"device": "eth2",
"protocol": "dhcp"
}
},
"wlan": {
"phy0": {
"path": "platform/soc@0/c000000.wifi",
"info": {
"antenna_rx": 240,
"antenna_tx": 240,
"bands": {
"5G": {
"ht": true,
"vht": true,
"he": true,
"max_width": 160,
"modes": [
"NOHT",
"HT20",
"VHT20",
"HE20",
"HT40",
"VHT40",
"HE40",
"VHT80",
"HE80",
"VHT160",
"HE160"
],
"default_channel": 36
}
},
"radios": [
]
}
},
"phy1": {
"path": "platform/soc@0/c000000.wifi+1",
"info": {
"antenna_rx": 15,
"antenna_tx": 15,
"bands": {
"2G": {
"ht": true,
"he": true,
"max_width": 40,
"modes": [
"NOHT",
"HT20",
"HE20",
"HT40",
"HE40"
],
"default_channel": 1
}
},
"radios": [
]
}
}
}
}
root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.6.116 xhci-hcd xHCI Host Controller
Bus 001 Device 002: ID 2c7c:0800 Quectel RG501Q-EU
Bus 002 Device 001: ID 1d6b:0003 Linux 6.6.116 xhci-hcd xHCI Host Controller
Bus 003 Device 001: ID 1d6b:0002 Linux 6.6.116 xhci-hcd xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux 6.6.116 xhci-hcd xHCI Host Controller
root@OpenWrt:~# lspci -nn
0000:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc Device [17cb:1002]
0001:00:00.0 PCI bridge [0604]: Qualcomm Technologies, Inc MDM9x55 LTE Modem [Snapdragon X16] [17cb:0302]
root@OpenWrt:~#

< sarcasm-tag>
I have a toaster with an "OpenWRT" sticker on it, it means it runs OpenWRT, yay!
< /sarcasm-tag>

try the 2nd link in the last post, locate and DL the files for your device.

By default, OpenWrt does not list this device. I just added a new device, and everything works fine. The last issue I am facing is that the modem is still not being detected.

what does it tell you about the support ?

then you're adding it to the wrong SNAPSHOT, and the info should have been in the 1st post.

did you search the forum for 2c7c:0800, 17cb:1002 and 17cb:0302 ?

is this your shot down PR, or did you just C&P the content ?

I already tried copying and pasting that PR, but the Wi-Fi did not work and the modem was not detected. I have already fixed the Wi-Fi, and the last issue remaining is that the modem device is still not detected.

your previous post disagrees with you:

define "detected", and did you search the forum, as advised ?

At first, I saw that someone was able to successfully power up the modem manually, but mine does not work. The current firmware is QWRT China. When I flash an OpenWrt firmware, immediately after flashing it is detected as USB:

Bus 001 Device 002: ID 2c7c:0800 Quectel RG501Q-EU

However, when I power-cycle the device (turn it off and on again), the modem is not detected. Even if I try to power it up manually, the modem still does not appear.

we can't help you with your undocumented attempts to solve things.

Show the output of below command while running this firmware
cat /sys/kernel/debug/gpio

Then do the same while running OpenWrt. Do not perform any manual action yet.

OPENWRT K6.X

root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 512-581, parent: platform/1000000.pinctrl, 1000000.pinctrl:
 gpio0   : in  low  func0 2mA pull down
 gpio1   : in  high func1 8mA pull up
 gpio2   : in  low  func0 2mA pull down
 gpio3   : in  high func1 8mA pull up
 gpio4   : in  high func1 8mA pull up
 gpio5   : in  low  func1 8mA pull up
 gpio6   : in  low  func1 8mA pull up
 gpio7   : in  low  func1 8mA pull up
 gpio8   : in  low  func1 8mA pull up
 gpio9   : in  low  func0 2mA pull down
 gpio10  : in  high func1 8mA pull up
 gpio11  : in  high func1 8mA pull up
 gpio12  : in  low  func1 8mA pull up
 gpio13  : in  low  func1 8mA pull up
 gpio14  : in  low  func1 8mA pull up
 gpio15  : in  low  func1 8mA pull up
 gpio16  : in  high func0 2mA pull down
 gpio17  : in  high func1 8mA pull up
 gpio18  : in  low  func0 2mA pull down
 gpio19  : out high func0 2mA pull up
 gpio20  : in  low  func0 2mA pull down
 gpio21  : in  high func0 2mA pull down
 gpio22  : in  low  func2 2mA pull down
 gpio23  : in  high func2 8mA no pull
 gpio24  : out low  func2 8mA no pull
 gpio25  : in  low  func0 8mA pull down
 gpio26  : out high func0 8mA pull up
 gpio27  : in  low  func0 2mA pull down
 gpio28  : in  high func0 2mA pull down
 gpio29  : in  low  func0 2mA pull down
 gpio30  : in  low  func0 2mA pull down
 gpio31  : in  low  func0 2mA pull down
 gpio32  : in  low  func0 2mA pull down
 gpio33  : out high func0 2mA pull down
 gpio34  : in  low  func0 2mA pull down
 gpio35  : in  low  func0 2mA pull down
 gpio36  : in  low  func0 2mA pull down
 gpio37  : out high func0 2mA pull up
 gpio38  : in  low  func3 2mA pull up
 gpio39  : in  high func3 2mA pull up
 gpio40  : in  low  func2 2mA pull up
 gpio41  : in  low  func2 2mA pull up
 gpio42  : out low  func0 8mA pull up
 gpio43  : out low  func0 2mA pull up
 gpio44  : in  high func0 8mA pull up
 gpio45  : in  high func1 2mA pull down
 gpio46  : in  low  func0 2mA pull down
 gpio47  : in  low  func0 2mA pull down
 gpio48  : in  high func0 2mA pull down
 gpio49  : in  high func0 2mA pull down
 gpio50  : in  high func0 8mA pull up
 gpio51  : in  low  func0 2mA pull down
 gpio52  : out high func0 8mA pull up
 gpio53  : in  low  func0 2mA pull down
 gpio54  : in  low  func0 2mA pull down
 gpio55  : in  low  func0 2mA pull down
 gpio56  : in  low  func0 2mA pull down
 gpio57  : in  low  func0 2mA pull down
 gpio58  : in  low  func0 2mA pull down
 gpio59  : in  high func0 2mA pull down
 gpio60  : in  high func0 2mA pull down
 gpio61  : in  high func0 2mA pull down
 gpio62  : out low  func0 2mA pull down
 gpio63  : in  low  func0 2mA pull down
 gpio64  : in  low  func0 2mA pull down
 gpio65  : in  low  func0 2mA pull down
 gpio66  : out high func0 2mA pull down
 gpio67  : in  low  func0 2mA pull down
 gpio68  : in  high func1 8mA pull up
 gpio69  : in  high func1 8mA pull up

gpiochip1: GPIOs 582-593, parent: platform/200f000.spmi:pmic@0:gpio@c000, 200f000.spmi:pmic@0:gpio@c000:
 gpio1 : ---
 gpio2 : in   low  normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio3 : out  high normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio4 : in   low  normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio5 : in   low  normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio6 : out  high normal  vin-0 pull-up 30uA                push-pull  low     atest-1 dtest-0
 gpio7 : out  high normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio8 : in   low  normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio9 : out  high normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio10: in   low  normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio11: out  high normal  vin-0 pull-down 10uA              push-pull  low     atest-1 dtest-0
 gpio12: ---
root@OpenWrt:~# 

QWRT K5.4

root@QWRT:~# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 430-441, parent: platform/200f000.qcom,spmi:pmic@0:gpios@c000, 200f000.qcom,spmi:pmic@0:gpios@c000:
gpio1 : ---
gpio2 : in   low  normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio3 : out  high normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio4 : in   low  normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio5 : in   low  normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio6 : out  high normal  vin-0 pull-up 30uA                push-pull  high    atest-1 dtest-0
gpio7 : out  high normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio8 : in   low  normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio9 : out  high normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio10: in   low  normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio11: out  high normal  vin-0 pull-down 10uA              push-pull  high    atest-1 dtest-0
gpio12: ---

gpiochip0: GPIOs 442-511, parent: platform/1000000.pinctrl, 1000000.pinctrl:
gpio0   : in  low  func0 8mA pull down
gpio1   : in  low  func0 8mA pull down
gpio2   : out high func0 8mA pull up
gpio3   : in  high func1 8mA pull up
gpio4   : in  high func1 8mA pull up
gpio5   : in  low  func1 8mA pull up
gpio6   : in  low  func1 8mA pull up
gpio7   : in  low  func1 8mA pull up
gpio8   : in  low  func1 8mA pull up
gpio9   : out high func0 8mA pull up
gpio10  : in  high func1 8mA pull up
gpio11  : in  high func1 8mA pull up
gpio12  : in  low  func1 8mA pull up
gpio13  : in  low  func1 8mA pull up
gpio14  : in  low  func1 8mA pull up
gpio15  : in  low  func1 8mA pull up
gpio16  : in  high func0 2mA pull down
gpio17  : in  high func1 8mA pull up
gpio18  : out low  func0 8mA pull down
gpio19  : out high func0 8mA pull down
gpio20  : out high func0 8mA pull down
gpio21  : in  high func0 2mA pull down
gpio22  : in  low  func2 2mA pull down
gpio23  : in  high func2 8mA no pull
gpio24  : out low  func2 8mA no pull
gpio25  : in  low  func0 2mA pull down
gpio26  : out high func0 8mA pull up
gpio27  : out high func0 8mA pull down
gpio28  : in  high func0 2mA pull down
gpio29  : out high func0 8mA pull down
gpio30  : out low  func0 8mA pull up
gpio31  : in  low  func0 2mA pull down
gpio32  : in  low  func0 2mA pull down
gpio33  : in  low  func0 2mA pull down
gpio34  : in  low  func0 2mA pull down
gpio35  : in  low  func0 2mA pull down
gpio36  : in  low  func0 2mA pull down
gpio37  : out high func0 2mA pull up
gpio38  : in  low  func3 2mA pull up
gpio39  : in  high func3 2mA pull up
gpio40  : in  low  func2 2mA pull up
gpio41  : in  low  func2 2mA pull up
gpio42  : out low  func0 8mA pull down
gpio43  : out low  func0 8mA pull down
gpio44  : in  high func0 8mA pull up
gpio45  : in  high func1 2mA pull down
gpio46  : in  low  func0 2mA pull down
gpio47  : in  low  func0 2mA pull down
gpio48  : in  high func0 2mA pull down
gpio49  : in  high func0 2mA pull down
gpio50  : in  high func0 8mA pull up
gpio51  : in  low  func0 2mA pull down
gpio52  : out low  func0 8mA pull up
gpio53  : out low  func0 2mA pull down
gpio54  : in  low  func0 2mA pull down
gpio55  : in  low  func0 2mA pull down
gpio56  : in  low  func0 2mA pull down
gpio57  : in  low  func0 2mA pull down
gpio58  : out high func0 2mA pull down
gpio59  : in  high func0 8mA pull up
gpio60  : in  high func0 2mA pull down
gpio61  : out high func0 2mA pull up
gpio62  : out low  func0 8mA pull down
gpio63  : out high func0 8mA pull down
gpio64  : out low  func0 8mA pull down
gpio65  : in  low  func0 2mA pull down
gpio66  : out high func0 8mA pull down
gpio67  : out low  func0 8mA pull down
gpio68  : in  low  func1 8mA pull up
gpio69  : in  high func1 8mA pull up
root@QWRT:~#

You probably need to take care of GPIO2 in addition to 42 and 52.
See https://github.com/dotywrt/openwrt-t/commit/6552a5fef466acfa9e388aa60e52ab6ad197a4cd#diff-b91433c954c40867851af365657b2e4e182eb5bc662cb457409f249acde0fe8f

I would also look in QWRT for startup scripts that might manipulate GPIO.

Fm QWRT


root@QWRT:~# gpioinfo
gpiochip0 - 70 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed "LED2_Y" output active-high [used]
line 19: unnamed "green:wifi" output active-high [used]
line 20: unnamed "LED5_G" output active-high [used]
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused output active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed "LED3_G" output active-high [used]
line 28: unnamed unused input active-high
line 29: unnamed "LED4_G" output active-high [used]
line 30: unnamed "LED4_Y" output active-high [used]
line 31: unnamed unused input active-high
line 32: unnamed unused input active-high
line 33: unnamed unused input active-high
line 34: unnamed unused input active-high
line 35: unnamed unused input active-high
line 36: unnamed unused input active-high
line 37: unnamed unused output active-high
line 38: unnamed unused input active-high
line 39: unnamed unused input active-high
line 40: unnamed unused input active-high
line 41: unnamed unused input active-high
line 42: unnamed unused input active-high
line 43: unnamed "LED1_R" output active-high [used]
line 44: unnamed "wps" input active-high [used]
line 45: unnamed unused input active-high
line 46: unnamed unused input active-high
line 47: unnamed unused input active-high
line 48: unnamed unused input active-high
line 49: unnamed unused input active-high
line 50: unnamed "reset" input active-high [used]
line 51: unnamed unused input active-high
line 52: unnamed "LED1_Y" output active-high [used]
line 53: unnamed "LED1_O" output active-high [used]
line 54: unnamed unused input active-high
line 55: unnamed unused input active-high
line 56: unnamed unused input active-high
line 57: unnamed unused input active-high
line 58: unnamed "perst" output active-low [used]
line 59: unnamed "interrupt" input active-high [used]
line 60: unnamed unused input active-high
line 61: unnamed unused output active-high
line 62: unnamed "red:power" output active-high [used]
line 63: unnamed "LED2_G" output active-high [used]
line 64: unnamed "LED3_Y" output active-high [used]
line 65: unnamed unused input active-high
line 66: unnamed "green:power" output active-high [used]
line 67: unnamed "LED5_Y" output active-high [used]
line 68: unnamed unused input active-high
line 69: unnamed unused input active-high
gpiochip1 - 12 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
root@QWRT:~#