T99W175.06 modem not coming up on BPI-R4

Hi all,

Following the recent merge of B-key support into snapshot on the BPI-R4, I'm trying to bring up a T99W175 modem. The issue I'm facing is that while the modem is now appearing on the PCI bus (hooray!) it's not appearing to ModemManager.

First, lspci showing the device coming up w/ the generic MHI driver:

0003:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc SDX55 [Snapdragon X55 5G]
	Subsystem: Qualcomm Technologies, Inc Device 010c
	Flags: bus master, fast devsel, latency 0, IRQ 123
	Memory at 20200000 (64-bit, non-prefetchable) [size=4K]
	Memory at 20201000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=8/32 Maskable+ 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [148] Secondary PCI Express
	Capabilities: [168] Physical Layer 16.0 GT/s <?>
	Capabilities: [18c] Lane Margining at the Receiver <?>
	Capabilities: [19c] Transaction Processing Hints
	Capabilities: [228] Latency Tolerance Reporting
	Capabilities: [230] L1 PM Substates
	Capabilities: [240] Data Link Feature <?>
	Kernel driver in use: mhi-pci-generic

Kernel logs showing the bringup of the device:

[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: [17cb:0306] type 00 class 0xff0000
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: PME# supported from D0 D3hot D3cold
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: PME# disabled
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: 7.876 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x1 link at 0003:00:00.0 (capable of 31.506 Gb/s with 16.0 GT/s PCIe x2 link)
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: BAR 0: assigned [mem 0x20200000-0x20200fff 64bit]
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: BAR 2: assigned [mem 0x20201000-0x20201fff 64bit]
[Sat Mar 16 18:07:22 2024] pci 0003:01:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: assign IRQ: got 0
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: MHI PCI device found: foxconn-sdx55
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: BAR 0: assigned [mem 0x20200000-0x20200fff 64bit]
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: enabling device (0000 -> 0002)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: enabling bus mastering
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x0 (reading 0xe0b0105b)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x4 (reading 0x100406)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x8 (reading 0xff000000)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0xc (reading 0x10)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x10 (reading 0x20200004)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x14 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x18 (reading 0x20201004)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x1c (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x20 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x24 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x28 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x2c (reading 0xe0b0105b)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x30 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x34 (reading 0x40)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x38 (reading 0x0)
[Sat Mar 16 18:07:31 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x3c (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x0 (reading 0xe0b0105b)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x4 (reading 0x100402)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x8 (reading 0xff000000)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0xc (reading 0x10)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x10 (reading 0x20200004)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x14 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x18 (reading 0x20201004)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x1c (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x20 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x24 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x28 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x2c (reading 0xe0b0105b)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x30 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x34 (reading 0x40)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x38 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x3c (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: PME# enabled
[Sat Mar 16 18:07:38 2024] mhi-pci-generic 0003:01:00.0: PME# disabled
[Sat Mar 16 18:07:38 2024] mhi-pci-generic 0003:01:00.0: enabling bus mastering

MHI specific logs:

[Sat Mar 16 18:07:34 2024] mhi mhi1: Requested to power ON
[Sat Mar 16 18:07:34 2024] mhi mhi1: Power on setup success
[Sat Mar 16 18:07:34 2024] mhi mhi1: Wait for device to enter SBL or Mission mode
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x0 (reading 0xe0b0105b)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x4 (reading 0x100402)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x8 (reading 0xff000000)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0xc (reading 0x10)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x10 (reading 0x20200004)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x14 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x18 (reading 0x20201004)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x1c (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x20 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x24 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x28 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x2c (reading 0xe0b0105b)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x30 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x34 (reading 0x40)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x38 (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: saving config space at offset 0x3c (reading 0x0)
[Sat Mar 16 18:07:36 2024] mhi-pci-generic 0003:01:00.0: PME# enabled
[Sat Mar 16 18:07:38 2024] mhi-pci-generic 0003:01:00.0: PME# disabled
[Sat Mar 16 18:07:38 2024] mhi-pci-generic 0003:01:00.0: enabling bus mastering

But, no modems:

root@bpi-r4:~# mmcli -L
No modems were found

Debug log from ModemManager:

root@bpi-r4:~# ModemManager --log-level=DEBUG
[4401]: <msg> ModemManager (version 1.22.0) starting in system bus...
[4401]: <dbg> [charsets] detecting platform iconv() support...
[4401]: <dbg> [charsets]   UTF-8: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   UCS-2BE: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   ASCII: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   ISO8859-1: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   CP437: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   CP850: iconv conversion to/from charset is supported
[4401]: <dbg> [charsets]   UTF-16BE: iconv conversion to/from charset is supported
[4401]: <dbg> bus acquired, creating manager...
[4401]: <dbg> [auth-provider] singleton created
[4401]: <dbg> [filter] created
[4401]: <dbg> [filter]   explicit allowlist:         yes
[4401]: <dbg> [filter]   explicit blocklist:         yes
[4401]: <dbg> [filter]   plugin allowlist:           yes
[4401]: <dbg> [filter]   qrtr devices allowed:       yes
[4401]: <dbg> [filter]   virtual devices forbidden:  yes
[4401]: <dbg> [filter]   net devices allowed:        yes
[4401]: <dbg> [filter]   usbmisc devices allowed:    yes
[4401]: <dbg> [filter]   rpmsg devices allowed:      yes
[4401]: <dbg> [filter]   wwan devices allowed:       yes
[4401]: <dbg> [filter]   tty devices:
[4401]: <dbg> [filter]       platform driver check:    yes
[4401]: <dbg> [filter]       driver check:             yes
[4401]: <dbg> [filter]       cdc-acm interface check:  yes
[4401]: <dbg> [filter]       with net check:           yes
[4401]: <dbg> [filter]       default:                  forbidden
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'zte'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 19d2
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'x22x'
[4401]: <dbg> [filter] registered plugin allowlist tag: ID_MM_X22X_TAGGED
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1bbb
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 0b3c
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'wavecom'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 114f
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'via'
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'u-blox'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1546
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'tp-link'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 2357
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'thuraya'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1a26
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'telit'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1bc7
[4401]: <dbg> [filter] registered plugin allowlist subsystem vendor id: 17cb:1c5d
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'simtech'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1e0e
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'sierra-legacy'
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'sierra'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1199
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'samsung'
[4401]: <dbg> [filter] registered plugin allowlist product id: 04e8:6872
[4401]: <dbg> [filter] registered plugin allowlist product id: 04e8:6906
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'quectel'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 2c7c
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1eac
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'qcom-soc'
[4401]: <dbg> [filter] registered plugin allowlist tag: ID_MM_QCOM_SOC
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'pantech'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 106c
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'option-hso'
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'option'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 0af0
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1931
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'novatel-lte'
[4401]: <dbg> [filter] registered plugin allowlist product id: 1410:9010
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'novatel'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1410
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'nokia-icera'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 0421
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'nokia'
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'motorola'
[4401]: <dbg> [filter] registered plugin allowlist tag: ID_MM_MTK_TAGGED
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'motorola'
[4401]: <dbg> [filter] registered plugin allowlist product id: 22b8:3802
[4401]: <dbg> [filter] registered plugin allowlist product id: 22b8:4902
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'ericsson-mbm'
[4401]: <dbg> [filter] registered plugin allowlist tag: ID_MM_ERICSSON_MBM
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'longcheer'
[4401]: <dbg> [filter] registered plugin allowlist tag: ID_MM_LONGCHEER_TAGGED
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1c9e
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'linktop'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 230d
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'iridium'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1edd
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'Intel'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 8086
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'huawei'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 12d1
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'haier'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 201e
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'gosuncn'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 305a
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'generic'
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'foxconn'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 0489
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 105b
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'fibocom'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 2cb7
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1782
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'd-link'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 2001
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'dell'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 413c
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'cinterion'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1e2d
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 0681
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 1269
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'broadmobi'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 2020
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'anydata'
[4401]: <dbg> [filter] registered plugin allowlist vendor id: 16d5
[4401]: <dbg> [plugin-manager] loaded builtin plugin 'altair-lte'
[4401]: <dbg> [filter] registered plugin allowlist product id: 216f:0047
[4401]: <dbg> [plugin-manager] successfully loaded 40 plugins registering 6 subsystems: tty, net, usbmisc, wwan, rpmsg, qrtr
[4401]: <dbg> [qrtr] socket lookup from 1:0
[4401]: <dbg> [qrtr] added server on 7:1 -> service 69, version 1, instance 1
[4401]: <dbg> [qrtr] created new node 7
[4401]: <dbg> [qrtr] initial lookup finished
[4401]: <dbg> [qrtr-bus-watcher] qrtr node 7 added
[4401]: <dbg> [qrtr-bus-watcher] waiting for modem services on node 7
[4401]: <dbg> service name 'org.freedesktop.ModemManager1' was acquired
[4401]: <dbg> [base-manager] unsupported automatic device scan...
[4401]: <dbg> [qrtr-bus-watcher] qrtr node 7 doesn't have required services to be considered a control node
[4401]: <dbg> [base-manager] kernel event reported:
[4401]: <dbg> [base-manager]   action:    remove
[4401]: <dbg> [base-manager]   subsystem: wwan
[4401]: <dbg> [base-manager]   name:      wwan0qcdm0
[4401]: <dbg> [base-manager]   uid:       n/a
[4401]: <dbg> [base-manager] kernel event reported:
[4401]: <dbg> [base-manager]   action:    remove
[4401]: <dbg> [base-manager]   subsystem: wwan
[4401]: <dbg> [base-manager]   name:      wwan0mbim0
[4401]: <dbg> [base-manager]   uid:       n/a
[4401]: <dbg> [base-manager] kernel event reported:
[4401]: <dbg> [base-manager]   action:    remove
[4401]: <dbg> [base-manager]   subsystem: wwan
[4401]: <dbg> [base-manager]   name:      wwan0at0
[4401]: <dbg> [base-manager]   uid:       n/a
[4401]: <dbg> [base-manager] kernel event reported:
[4401]: <dbg> [base-manager]   action:    remove
[4401]: <dbg> [base-manager]   subsystem: net
[4401]: <dbg> [base-manager]   name:      wwan0
[4401]: <dbg> [base-manager]   uid:       n/a

Then this appeared in the kernel log:

[  119.463256] mhi-pci-generic 0003:01:00.0: firmware crashed (6)

In /dev, there's no qmi, mbim, tty or cdc devices that seem to indicate the modem is function. However, in /sys there's evidence the device is working ok on the MHI bus:

root@bpi-r4:~# tree /sys/bus/mhi/devices/mhi1
/sys/bus/mhi/devices/mhi1
โ”œโ”€โ”€ mhi1_IPCR
โ”‚   โ”œโ”€โ”€ driver -> ../../../../../../../../../bus/mhi/drivers/qcom_mhi_qrtr
โ”‚   โ”œโ”€โ”€ oem_pk_hash
โ”‚   โ”œโ”€โ”€ power
โ”‚   โ”‚   โ”œโ”€โ”€ autosuspend_delay_ms
โ”‚   โ”‚   โ”œโ”€โ”€ control
โ”‚   โ”‚   โ”œโ”€โ”€ runtime_active_time
โ”‚   โ”‚   โ”œโ”€โ”€ runtime_status
โ”‚   โ”‚   โ””โ”€โ”€ runtime_suspended_time
โ”‚   โ”œโ”€โ”€ serial_number
โ”‚   โ”œโ”€โ”€ soc_reset
โ”‚   โ”œโ”€โ”€ subsystem -> ../../../../../../../../../bus/mhi
โ”‚   โ””โ”€โ”€ uevent
โ”œโ”€โ”€ mhi1_LOOPBACK
โ”‚   โ”œโ”€โ”€ oem_pk_hash
โ”‚   โ”œโ”€โ”€ power
โ”‚   โ”‚   โ”œโ”€โ”€ autosuspend_delay_ms
โ”‚   โ”‚   โ”œโ”€โ”€ control
โ”‚   โ”‚   โ”œโ”€โ”€ runtime_active_time
โ”‚   โ”‚   โ”œโ”€โ”€ runtime_status
โ”‚   โ”‚   โ””โ”€โ”€ runtime_suspended_time
โ”‚   โ”œโ”€โ”€ serial_number
โ”‚   โ”œโ”€โ”€ soc_reset
โ”‚   โ”œโ”€โ”€ subsystem -> ../../../../../../../../../bus/mhi
โ”‚   โ””โ”€โ”€ uevent
โ”œโ”€โ”€ oem_pk_hash
โ”œโ”€โ”€ power
โ”‚   โ”œโ”€โ”€ autosuspend_delay_ms
โ”‚   โ”œโ”€โ”€ control
โ”‚   โ”œโ”€โ”€ runtime_active_time
โ”‚   โ”œโ”€โ”€ runtime_status
โ”‚   โ””โ”€โ”€ runtime_suspended_time
โ”œโ”€โ”€ serial_number
โ”œโ”€โ”€ soc_reset
โ”œโ”€โ”€ subsystem -> ../../../../../../../../bus/mhi
โ””โ”€โ”€ uevent

mhi0 is my 802.11 card, a Qualcomm ath11k card that is working just fine.

I suspect that an issue might be that the PCI ID on my modem is not correct, as the device has the words "X02: Prototype Sample" as well as DW5930e-eSim written on it.

Has anyone seen anything like this before? Any idea on how to get Modem Manager it interact with it? Maybe I need to change the pci IDs for come drivers? Over on the banana pi forum, Daniel has got a T99W175 running, but not sure if it's the same exact hardware.

Somebody got it working? My is visible as Wireless Controller.

what version do you have? what is the pci hw id? (lspci -v)

if u have 0x03f0, 0x0a6c maybe this patch help?
[PATCH v2] bus: mhi: host: pci_generic: Add HP variant of T99W175 - Song Fuchang (kernel.org)

Install all packages related to qmi, also qmi-utils, uqmi, etc. Check ls -la /dev/wwan* do you have anything there? Qmicli commands work with the device. You would need to use AT command- AT^QTUNER_ENABLE=0
I have Dell version, now I can see it, also in modem manager.

Thanks for the suggestions, all. Sadly none of the above seem to help. Here's a recap of the facts:

  1. lsmod shows mhi_pci_generic loaded for the driver. Confirmed in the kernel source my PCI ID is in the driver source, so it's not an issue fixed by the Dell patch.
  2. No devices appear in /dev, also all user space packages installed
  3. The "firmware crashed" log entry seems like a smoking gun, but I have no ideas on how to get more info than that message, I looked at the relevant kernel source in mhi_pci_generic.c and I didn't see any immediately obvious actions I could take.

I don't know how to get any more details than that, but it sounds like somehow the modem has got a bad firmware on it. It must have came from the seller on amazon like this.

I put the card in a PC running windows, and I received an error about not being able to "power on" the card. I tried some driver packages from Lenovo and Dell, but they didn't seem to do anything. The device shows up in the device manager, like how lspci in linux shows the card.

If I had some kind of way to upgrade to a newer firmware, maybe this would solve my problem. Does anyone know of a way to force a firmware upgrade for this modem? Is there anything in /sys/bus/mhi that might be able to help me? I am able to issue an SOC reset by running echo 1 > /sys/bus/mhi/devices/mhi0/soc_reset (turns out my modem is mhi0, not mhi1, wifi card is mhi1) but this just results in the same "firmware crashed" error. Is there like a firmware upgrade path for soft bricked modems?

Have almost the same Problem, but Modem goes online with MM and the mhi driver crashes under load aka speedtest. Sys 23.05 and snap fresh compiled. Also tried out diffrent customer setups aka via at AT^CUSTOMER=[4|5|6] 4, hp | 5,dell | 6,lenovo. hp and dell works out of the box lenovo stucks in mmcli in enabling. HW: x86 b250m with an i7 6700k with pcie key b card. Will try my ryzen system maybe more modern HW will solve the problem.

Edit: lenovo T99W175.04

Edit2: Also need to check if the adapter delivers enough amps.

I was able to make some progress on this problem. By following the instructions mentioned here I got the card to power up. Essentially the patch required is:

+++ b/drivers/bus/mhi/pci_generic.c
@@ -637,7 +637,7 @@ static void mhi_pci_recovery_work(struct work_struct *work)
if (err)
goto err_try_reset;

- err = mhi_sync_power_up(mhi_cntrl);
+ err = mhi_async_power_up(mhi_cntrl);
if (err)
goto err_unprepare;

I have been running this outside of OpenWRT for the moment as I'm trying to update the firmware, but it at least responds to AT commands now which is progress.

Just thought I'd update this thread for any future searchers.

It seems that my card had some kind of underlying hardware issue. I was able to get it to power up a few times as I described above with the patch, however after what I think was a failed attempted to upgrade the firmware, I appeared to have bricked it. I tried it in a desktop PC using an m2 -> mPCIe and mPCIe -> PCIe adapter.

I was also able to get it briefly to show up as a USB device on the r4 using the method from the Russian forum 4pda.to involving shorting some pins on the card, and that may have also contributed to bricking the card.

I just ended up buying a different card from AliExpress, and it was immediately detected by fwupdmgr on my desktop PC, and I was able to update the firmware. It's now working great on OpenWRT.

So it was all a wild goose chase in the end.

How does it perform?

I'm looking to buy a 5g card for my Openwrt router running on Raspberry Pi cm4.

I have found the one you linked (T99W175) and the FM350-GL.

Would you recommend the T99W175? Is it stable and do you have good 5G Speed?

I'm using a soracom SIM, on the s1.4xfast speed tier (I use the cellular as a backup for my fiber connection).

I don't get very good cell signal where I am, 9% signal quality reported. The modem is attached on T-Mobile LTE.

Over a wireguard VPN, I'm seeing the following iperf3 speeds:

root@bpi-r4:/mnt/docker# iperf3 -c 10.40.0.1
Connecting to host 10.40.0.1, port 5201
[  5] local 10.40.0.2 port 58246 connected to 10.40.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.75 MBytes  14.7 Mbits/sec    0   96.2 KBytes
[  5]   1.00-2.00   sec   896 KBytes  7.34 Mbits/sec    0    112 KBytes
[  5]   2.00-3.00   sec  1.00 MBytes  8.39 Mbits/sec    0    135 KBytes
[  5]   3.00-4.00   sec  1.25 MBytes  10.5 Mbits/sec    0    172 KBytes
[  5]   4.00-5.00   sec  1.38 MBytes  11.5 Mbits/sec    0    207 KBytes
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec    0    243 KBytes
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec    0    263 KBytes
[  5]   7.00-8.00   sec  1.50 MBytes  12.6 Mbits/sec    8    187 KBytes
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec   10    150 KBytes
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec   96    135 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  7.75 MBytes  6.50 Mbits/sec  114            sender
[  5]   0.00-10.19  sec  4.46 MBytes  3.67 Mbits/sec                  receiver

iperf Done.

I'm sure it would work a lot better on 5G with a good signal.

Hi
I can bring up my T99W175 but I have a lot of mhi-pci-generic kern.debug lines in syslog.
How can I solve this?
Iยดm using stable 24.10.0.

syslog

Tue Feb 25 20:57:58 2025 kern.debug kernel: [  167.456496] mhi-pci-generic 0003:01:00.0: PME# disabled
Tue Feb 25 20:57:58 2025 kern.debug kernel: [  167.461736] mhi-pci-generic 0003:01:00.0: enabling bus mastering
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.882372] mhi-pci-generic 0003:01:00.0: save config 0x00: 0x0a6c03f0
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.888910] mhi-pci-generic 0003:01:00.0: save config 0x04: 0x00100402
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.895438] mhi-pci-generic 0003:01:00.0: save config 0x08: 0x0d400000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.901955] mhi-pci-generic 0003:01:00.0: save config 0x0c: 0x00000010
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.908487] mhi-pci-generic 0003:01:00.0: save config 0x10: 0x20200004
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.916385] mhi-pci-generic 0003:01:00.0: save config 0x14: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.924285] mhi-pci-generic 0003:01:00.0: save config 0x18: 0x20201004
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.932186] mhi-pci-generic 0003:01:00.0: save config 0x1c: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.940082] mhi-pci-generic 0003:01:00.0: save config 0x20: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.947981] mhi-pci-generic 0003:01:00.0: save config 0x24: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.955881] mhi-pci-generic 0003:01:00.0: save config 0x28: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.963781] mhi-pci-generic 0003:01:00.0: save config 0x2c: 0x877f103c
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.971677] mhi-pci-generic 0003:01:00.0: save config 0x30: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.979578] mhi-pci-generic 0003:01:00.0: save config 0x34: 0x00000040
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.987477] mhi-pci-generic 0003:01:00.0: save config 0x38: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  172.995380] mhi-pci-generic 0003:01:00.0: save config 0x3c: 0x00000000
Tue Feb 25 20:58:03 2025 kern.debug kernel: [  173.003342] mhi-pci-generic 0003:01:00.0: PME# enabled

lspci

root@OpenWrt:~# lspci -v
0003:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0, IRQ 116
        Memory at 20300000 (64-bit, non-prefetchable) [size=32K]
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: [disabled] [32-bit]
        Memory behind bridge: 20200000-202fffff [size=1M] [32-bit]
        Prefetchable memory behind bridge: [disabled] [64-bit]
        Capabilities: [80] Express Root Port (Slot-), IntMsgNum 0
        Capabilities: [e0] MSI: Enable+ Count=1/32 Maskable+ 64bit+
        Capabilities: [f8] Power Management version 3
        Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
        Capabilities: [110] L1 PM Substates
        Capabilities: [200] Advanced Error Reporting
        Capabilities: [300] Secondary PCI Express
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2

0003:01:00.0 Unassigned class [ff00]: Foxconn International, Inc. Device e0ab
        Subsystem: Qualcomm Technologies, Inc Device 010c
        Flags: fast devsel, IRQ 123
        Memory at 20200000 (64-bit, non-prefetchable) [size=4K]
        Memory at 20201000 (64-bit, non-prefetchable) [size=4K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=8/32 Maskable+ 64bit+
        Capabilities: [70] Express Endpoint, IntMsgNum 0
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Secondary PCI Express
        Capabilities: [168] Physical Layer 16.0 GT/s <?>
        Capabilities: [18c] Lane Margining at the Receiver
        Capabilities: [19c] Transaction Processing Hints
        Capabilities: [228] Latency Tolerance Reporting
        Capabilities: [230] L1 PM Substates
        Capabilities: [240] Data Link Feature <?>
        Kernel driver in use: mhi-pci-generic

I had the same issue. Adding:

# silences logs from MHI module
echo on > /sys/bus/pci/devices/0003:01:00.0/power/control

to /etc/rc.local did the trick.

1 Like

Is it possible to activate Unsolicited Result Codes, URCs, via the AT interface?