Re: [PATCH RFC] bus: mhi: host: pci_generic: Add MBIM-mode config for generic SDX65

From: Manivannan Sadhasivam

Date: Tue Dec 01 2026 - 11:57:44 EST


On 2026-10-11 22:35 -0400, Haipeng Lin wrote:
> The Surface Pro 11 5G carries an SDX65 that enumerates with Qualcomm's
> generic IDs (17cb:0308, subsystem 17cb:0308) but runs the MBIM-mode
> firmware it ships with for Windows.
>
> Control is MBIM only (the QMI channel never answers), and data on
> channels 100/101 is framed as MBIM NTBs: the modem reports a WDA data
> format of raw IP with MBIM aggregation, up to 32 KiB downlink.
>
> The generic qcom-sdx65m entry names channels 100/101 "IP_HW0", which
> binds mhi_net. mhi_net expects raw IP, so no data session can work.
> The MBIM-mode modules in this driver name them "IP_HW0_MBIM" instead
> which binds mhi_wwan_mbim.
>
> Boards with a Qualcomm-ID modem in MBIM mode have so far been told
> apart by subsystem ID, like the SC8280XP CRD's SDX55 (17cb:010c).
> This modem carries the generic subsystem ID, so we select an MBIM
> configuration by machine compatible instead. The channel layout is
> modem_qcom_v1 with data on IP_HW0_MBIM and without the QMI and IP_SW0
> channels. With the stock layout ModemManager spent about 45 s probing
> the silent QMI port and put the bearer on mhi_swip0 (IP_SW0);
> with this layout it does neither.
> The MRU is 32 KiB to match the modem's downlink aggregation size.
>
> Tested on a Surface Pro 11 5G (Surface_Pro_with_5G_11th_Edition_2077,
> modem firmware 251216-DE-dc49bb9-00197) on a v7.2.8-based kernel:
> ModemManager registers the modem on wwan0mbim0, uses wwan0 for data and
> connects over 5G NR.
>
> Assisted-by: claude-opus:5.5
> Signed-off-by: Haipeng Lin <jimmie.lin@xxxxxxxxx>
> ---
> Hi Mani, maintainers,
>
> I am sending this patch developed to support the Qualcomm SDX65 modem
> in the Surface Pro 5G (LCD, X1P-64-100 variant) for your consideration
> and comments.
>
> I am sending this as an RFC because I am not sure how you would like
> the MBIM-mode configuration to be selected. The device exposes the
> modem with fully generic PCI IDs (17cb:0308, subsystem 17cb:0308) so
> we cannot tell it apart from QMI-mode SDX65 modules using
> PCI_DEVICE_SUB() entries.
>
> This patch proposes to match the machine compatible. This is a smaller
> change without a new DT ABI but the PCI driver looking at the root
> compatible may be unusual, hence the RFC.
>
> An alternative would be to describe the endpoint in DT (a pci17cb,308
> node under the root port) with a property naming the firmware mode or
> channel layout, similar to ath11k's qcom,calibration-variant, then read
> it from pdev->dev.of_node; this would describe the board instead of the
> machine but needs a new binding.
>
> Additionally we could potentially reuse modem_foxconn_sdx55_config
> instead of adding a channel table, as the SC8280XP CRD entry does but I
> haven't tested that layout on this modem yet.
>
> I would be happy to rework the patch based on your comments.
>
> DTs for Surface Pro 11 LCD are in the process of being upstreamed
> separately and I've submitted patches to Dale Whinham's Surface Pro 11
> tree to enable pcie5 to enumerate the modem. This patch was
> functionally tested on top of that tree based on v7.2.8.
>
> This patch is based on mhi-next and build-tested in arm64 and x86_64
> without CONFIG_OF. mhi-next adds DUN (32/33) to
> modem_qcom_v1_mhi_channels. I left DUN out of the MBIM table because
> I haven't tested it on this modem.
>

We've seen similar issues with Quectel modems [1] [2] as the FW advertises
generic Qcom IDs but implement the vendor specific config. I'm curious which
OEM modem you've got on this machine.

But anyhow, since we started seeing these issues more often now and the OEMs are
not willing to update the firmware, I'm reluctantly willing to have one more
matching table for these weirdos. But that matching table should be based on
DMI, not devicetree. Since almost all laptops are supporting DMI, a DMI match
table would benefit both DT and ACPI host machines.

Please let me know if you can spin up a patch for that, otherwise I'll do it
myself.

- Mani

[1] https://lore.kernel.org/mhi/ywase3lkm5iimrzyin5grb3hr36zedsvzs3p2z6z2q6532g3cq@25ibqnpmanvo
[2] https://lore.kernel.org/mhi/20240708082132.GA5745@thinkpad