* [PATCH v4] bus: mhi: host: pci_generic: Add MBIM-mode config for generic SDX65
@ 2026-12-02 2:39 Haipeng Lin via B4 Relay
2026-12-02 5:50 ` Manivannan Sadhasivam
0 siblings, 1 reply; 2+ messages in thread
From: Haipeng Lin via B4 Relay @ 2026-12-02 2:39 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Hugo
Cc: mhi, linux-arm-msm, daleyo, Johan Hovold, linux-kernel, Haipeng Lin
From: Haipeng Lin <jimmie.lin@gmail.com>
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 add a DMI match table
that overrides the configuration the PCI IDs selected, and list the
Snapdragon-based Surface Pro 11 5G machines there. DMI identity comes
from SMBIOS, which UEFI provides on this machine even when booted with
devicetree, so the same table serves DT and ACPI hosts.
There is no known way to query the modem for MBIM mode before the
channels are set up. As a limitation, a separate SDX65 using generic
IDs on a matching machine (e.g., via USB4 PCIe tunneling) would also
get the MBIM config.
Like the SC8280XP CRD entry, reuse the Foxconn SDX55 channel config
which works with this firmware. 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 260519-DE-2268f6b-00197) on a v7.3.4-based kernel:
ModemManager registers the modem on wwan0mbim0, uses wwan0 for data and
wwan0at0 for AT commands, and connects over LTE and 5G NR.
Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Haipeng Lin <jimmie.lin@gmail.com>
---
Hi Mani and Jeff,
As suggested in Mani's RFC reply this revision switches the machine
matching from the dt root compatible to a DMI match table. The Surface
Pro 11 exposes SMBIOS through UEFI even when booted with devicetree so
the same table serves DT and ACPI hosts.
I listed the four Snapdragon-based Surface Pro 11 5G SKUs. The Intel-
based SKUs are left out since I do not know whether they carry the same
module and have no way to test.
Jeff - due to significant changes in v4 I dropped your Reviewed-by from
v3. Please feel free to review v4's updated approach.
LLM was used to draft the MBIM configuration patch and assisted with
testing on device.
Thanks,
---
Changes in v4:
- Match the machine by DMI instead of the devicetree root compatible,
per Mani's suggestion, so ACPI hosts can use the same table.
https://lore.kernel.org/mhi/179614425365.121678.10359650275079684909.b4-reply@b4/
- Match all four Snapdragon-based Surface Pro 11 5G SKUs by DMI SKU.
- Rebase onto mhi-next (v7.4-rc1 base).
- Retest on device with current modem firmware 260519-DE-2268f6b-00197.
- Link to v3: https://lore.kernel.org/r/20261120-mhi-sdx65-mbim-rfc-v3-1-20741d24da0c@gmail.com
Changes in v3:
- Drop RFC prefix
- No code changes
- Commit message updated to note limitation for SDX65 dongles on
matching machines as raised by Jeff Hugo.
- OEM PK hash method ruled out in discussion: https://lore.kernel.org/all/088d0be9-5d45-4454-b160-efff83e7a647@oss.qualcomm.com
- Dropped Assisted-by trailer and clarified in cover letter per 7.4 guidance.
- Link to v2: https://lore.kernel.org/r/20261110-mhi-sdx65-mbim-rfc-v2-1-f1d71a5ac9ab@gmail.com
Changes in v2:
- Reuse modem_foxconn_sdx55_config instead of adding a channel table.
This adds the DUN channel (tested: answers AT commands) and drops
IPCR which is unused by the Surface Pro 11.
- Link to v1: https://lore.kernel.org/r/20261011-mhi-sdx65-mbim-rfc-v1-1-8089b4d33d5b@gmail.com
---
drivers/bus/mhi/host/pci_generic.c | 73 ++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index a7c0af7c82b2..af9a0513ae6d 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -10,6 +10,7 @@
#include <linux/delay.h>
#include <linux/device.h>
+#include <linux/dmi.h>
#include <linux/mhi.h>
#include <linux/module.h>
#include <linux/pci.h>
@@ -692,6 +693,19 @@ static const struct mhi_pci_dev_info mhi_foxconn_t99w760_info = {
.sideband_wake = false,
};
+/* Generic SDX65 (17cb:0308) running MBIM mode firmware */
+static const struct mhi_pci_dev_info mhi_qcom_sdx65_mbim_info = {
+ .name = "qcom-sdx65m-mbim",
+ .fw = "qcom/sdx65m/xbl.elf",
+ .edl = "qcom/sdx65m/edl.mbn",
+ .edl_trigger = true,
+ .config = &modem_foxconn_sdx55_config,
+ .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
+ .dma_data_width = 32,
+ .mru_default = 32768,
+ .sideband_wake = false,
+};
+
static const struct mhi_channel_config mhi_mv3x_channels[] = {
MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 64, 0),
MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 64, 0),
@@ -1103,6 +1117,56 @@ static const struct pci_device_id mhi_pci_id_table[] = {
};
MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
+/*
+ * DMI-based config overrides for modems advertising generic PCI IDs
+ * that require a different configuration than the generic fallback.
+ */
+struct mhi_pci_dmi_override {
+ const struct mhi_pci_dev_info *generic_info;
+ const struct mhi_pci_dev_info *override_info;
+};
+
+static const struct mhi_pci_dmi_override mhi_qcom_sdx65_mbim_override = {
+ .generic_info = &mhi_qcom_sdx65_info,
+ .override_info = &mhi_qcom_sdx65_mbim_info,
+};
+
+static const struct dmi_system_id mhi_pci_dmi_overrides[] = {
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU,
+ "Surface_Pro_with_5G_11th_Edition_2077"),
+ },
+ .driver_data = (void *)&mhi_qcom_sdx65_mbim_override,
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU,
+ "Surface_Pro_with_5G_11th_Edition_2078"),
+ },
+ .driver_data = (void *)&mhi_qcom_sdx65_mbim_override,
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU,
+ "Surface_Pro_with_5G_11th_Edition_For_Business_2077"),
+ },
+ .driver_data = (void *)&mhi_qcom_sdx65_mbim_override,
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU,
+ "Surface_Pro_with_5G_11th_Edition_For_Business_2078"),
+ },
+ .driver_data = (void *)&mhi_qcom_sdx65_mbim_override,
+ },
+ {}
+};
+
enum mhi_pci_device_status {
MHI_PCI_DEV_STARTED,
MHI_PCI_DEV_SUSPENDED,
@@ -1384,11 +1448,20 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
const struct mhi_pci_dev_info *info = (struct mhi_pci_dev_info *) id->driver_data;
const struct mhi_controller_config *mhi_cntrl_config;
+ const struct dmi_system_id *dmi_id;
struct mhi_pci_device *mhi_pdev;
struct mhi_controller *mhi_cntrl;
unsigned int dma_data_width;
int err;
+ dmi_id = dmi_first_match(mhi_pci_dmi_overrides);
+ if (dmi_id) {
+ const struct mhi_pci_dmi_override *override = dmi_id->driver_data;
+
+ if (info == override->generic_info)
+ info = override->override_info;
+ }
+
dev_info(&pdev->dev, "MHI PCI device found: %s\n", info->name);
/* mhi_pdev.mhi_cntrl must be zero-initialized */
---
base-commit: f0c000d7f9d4cf4e8e3b7aaf878605ec25023dae
change-id: 20261011-mhi-sdx65-mbim-rfc-8ac8ba0d778a
Best regards,
--
Haipeng Lin <jimmie.lin@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v4] bus: mhi: host: pci_generic: Add MBIM-mode config for generic SDX65
2026-12-02 2:39 [PATCH v4] bus: mhi: host: pci_generic: Add MBIM-mode config for generic SDX65 Haipeng Lin via B4 Relay
@ 2026-12-02 5:50 ` Manivannan Sadhasivam
0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2026-12-02 5:50 UTC (permalink / raw)
To: Haipeng Lin
Cc: Manivannan Sadhasivam, Jeff Hugo, mhi, linux-arm-msm, daleyo,
Johan Hovold, linux-kernel
On 2026-12-01 21:39 -0500, 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 add a DMI match table
> that overrides the configuration the PCI IDs selected, and list the
> Snapdragon-based Surface Pro 11 5G machines there. DMI identity comes
> from SMBIOS, which UEFI provides on this machine even when booted with
> devicetree, so the same table serves DT and ACPI hosts.
>
> There is no known way to query the modem for MBIM mode before the
> channels are set up. As a limitation, a separate SDX65 using generic
> IDs on a matching machine (e.g., via USB4 PCIe tunneling) would also
> get the MBIM config.
>
> Like the SC8280XP CRD entry, reuse the Foxconn SDX55 channel config
> which works with this firmware. 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 260519-DE-2268f6b-00197) on a v7.3.4-based kernel:
> ModemManager registers the modem on wwan0mbim0, uses wwan0 for data and
> wwan0at0 for AT commands, and connects over LTE and 5G NR.
>
> Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
> Signed-off-by: Haipeng Lin <jimmie.lin@gmail.com>
> ---
> Hi Mani and Jeff,
>
> As suggested in Mani's RFC reply this revision switches the machine
> matching from the dt root compatible to a DMI match table. The Surface
> Pro 11 exposes SMBIOS through UEFI even when booted with devicetree so
> the same table serves DT and ACPI hosts.
>
> I listed the four Snapdragon-based Surface Pro 11 5G SKUs. The Intel-
> based SKUs are left out since I do not know whether they carry the same
> module and have no way to test.
>
> Jeff - due to significant changes in v4 I dropped your Reviewed-by from
> v3. Please feel free to review v4's updated approach.
>
> LLM was used to draft the MBIM configuration patch and assisted with
> testing on device.
>
> Thanks,
> ---
> Changes in v4:
> - Match the machine by DMI instead of the devicetree root compatible,
> per Mani's suggestion, so ACPI hosts can use the same table.
> https://lore.kernel.org/mhi/179614425365.121678.10359650275079684909.b4-reply@b4/
> - Match all four Snapdragon-based Surface Pro 11 5G SKUs by DMI SKU.
> - Rebase onto mhi-next (v7.4-rc1 base).
> - Retest on device with current modem firmware 260519-DE-2268f6b-00197.
> - Link to v3: https://lore.kernel.org/r/20261120-mhi-sdx65-mbim-rfc-v3-1-20741d24da0c@gmail.com
>
> Changes in v3:
> - Drop RFC prefix
> - No code changes
> - Commit message updated to note limitation for SDX65 dongles on
> matching machines as raised by Jeff Hugo.
> - OEM PK hash method ruled out in discussion: https://lore.kernel.org/all/088d0be9-5d45-4454-b160-efff83e7a647@oss.qualcomm.com
> - Dropped Assisted-by trailer and clarified in cover letter per 7.4 guidance.
> - Link to v2: https://lore.kernel.org/r/20261110-mhi-sdx65-mbim-rfc-v2-1-f1d71a5ac9ab@gmail.com
>
> Changes in v2:
> - Reuse modem_foxconn_sdx55_config instead of adding a channel table.
> This adds the DUN channel (tested: answers AT commands) and drops
> IPCR which is unused by the Surface Pro 11.
> - Link to v1: https://lore.kernel.org/r/20261011-mhi-sdx65-mbim-rfc-v1-1-8089b4d33d5b@gmail.com
> ---
> drivers/bus/mhi/host/pci_generic.c | 73 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index a7c0af7c82b2..af9a0513ae6d 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -10,6 +10,7 @@
>
> #include <linux/delay.h>
> #include <linux/device.h>
> +#include <linux/dmi.h>
> #include <linux/mhi.h>
> #include <linux/module.h>
> #include <linux/pci.h>
> @@ -692,6 +693,19 @@ static const struct mhi_pci_dev_info mhi_foxconn_t99w760_info = {
> .sideband_wake = false,
> };
>
> +/* Generic SDX65 (17cb:0308) running MBIM mode firmware */
> +static const struct mhi_pci_dev_info mhi_qcom_sdx65_mbim_info = {
> + .name = "qcom-sdx65m-mbim",
> + .fw = "qcom/sdx65m/xbl.elf",
> + .edl = "qcom/sdx65m/edl.mbn",
> + .edl_trigger = true,
> + .config = &modem_foxconn_sdx55_config,
> + .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
> + .dma_data_width = 32,
> + .mru_default = 32768,
> + .sideband_wake = false,
> +};
> +
> static const struct mhi_channel_config mhi_mv3x_channels[] = {
> MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 64, 0),
> MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 64, 0),
> @@ -1103,6 +1117,56 @@ static const struct pci_device_id mhi_pci_id_table[] = {
> };
> MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
>
> +/*
> + * DMI-based config overrides for modems advertising generic PCI IDs
> + * that require a different configuration than the generic fallback.
> + */
> +struct mhi_pci_dmi_override {
Let's use 'mhi_pci_dev_override' as we may end up extending this quirk for pure
DT based platforms without SMBIOS. So the comment also needs rewording.
> + const struct mhi_pci_dev_info *generic_info;
Instead of comparing the generic_info pointer, you should compare the actual PCI
IDs. So you need to have 'const struct pci_device_id' pointer here and populate
the table with the actual device IDs needing the quirk.
Rest LGTM!
- Mani
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 5:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 2:39 [PATCH v4] bus: mhi: host: pci_generic: Add MBIM-mode config for generic SDX65 Haipeng Lin via B4 Relay
2026-12-02 5:50 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®