public inbox for mhi@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant
@ 2025-05-12 11:26 Petr Štetiar
  2025-08-15  6:22 ` Petr Štetiar
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Štetiar @ 2025-05-12 11:26 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Duke Xin (辛安文)
  Cc: Chris Webb, Petr Štetiar, Manivannan Sadhasivam, mhi,
	linux-arm-msm

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 --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 },

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-18  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 11:26 [PATCH] bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant Petr Štetiar
2025-08-15  6:22 ` Petr Štetiar
2025-08-18  8:07   ` Manivannan Sadhasivam
2025-08-18  9:26     ` Chris Webb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox