diff mbox series

bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant

Message ID 20250512112631.2477075-1-ynezz@true.cz
State New
Headers show
Series bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant | expand

Commit Message

Petr Štetiar May 12, 2025, 11:26 a.m. UTC
From: Chris Webb <chris@arachsys.com>

I have a router board with a Quectel RM520N-GL 5G module that speaks
either USB or PCIe. When switched to PCIe mode, the modem present itself
on PCI bus with following IDs:

  0003:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device [17cb:0308]
    Subsystem: Qualcomm Technologies, Inc Device [17cb:5201]

and is currently being wrongly detected by the kernel as:

  mhi-pci-generic 0000:01:00.0: MHI PCI device found: qcom-sdx65m

which results into wrong modem configuration and thus missing wwanX
netdev. So lets fix it by adding a new device entry for this 0x5201 variant.

Link: https://lore.kernel.org/mhi/ZqllDCWfiKravZAo@arachsys.com/T/#u
Fixes: 1cad976a1be9 ("bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL modem")
Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 drivers/bus/mhi/host/pci_generic.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 03aa88795209..0db9543a7edc 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -818,6 +818,9 @@  static const struct pci_device_id mhi_pci_id_table[] = {
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn980_hw_v1_info },
 	{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0306),
 		.driver_data = (kernel_ulong_t) &mhi_qcom_sdx55_info },
+	/* RM520N-GL variant with Qualcomm vendor and subvendor ID */
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_QCOM, 0x5201),
+		.driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info },
 	/* Telit FN990 */
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, 0x1c5d, 0x2010),
 		.driver_data = (kernel_ulong_t) &mhi_telit_fn990_info },