* [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
* Re: [PATCH] bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant
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
0 siblings, 1 reply; 4+ messages in thread
From: Petr Štetiar @ 2025-08-15 6:22 UTC (permalink / raw)
To: Manivannan Sadhasivam, Duke Xin (辛安文)
Cc: Chris Webb, Manivannan Sadhasivam, mhi, linux-arm-msm
Hi, gentle ping :-) Thanks! Cheers, Petr
Petr Štetiar <ynezz@true.cz> [2025-05-12 11:26:31]:
> 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 },
--
ynezz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant
2025-08-15 6:22 ` Petr Štetiar
@ 2025-08-18 8:07 ` Manivannan Sadhasivam
2025-08-18 9:26 ` Chris Webb
0 siblings, 1 reply; 4+ messages in thread
From: Manivannan Sadhasivam @ 2025-08-18 8:07 UTC (permalink / raw)
To: Petr Štetiar
Cc: Manivannan Sadhasivam, Duke Xin (辛安文),
Chris Webb, mhi, linux-arm-msm
On Fri, Aug 15, 2025 at 06:22:41AM GMT, Petr Štetiar wrote:
> Hi, gentle ping :-) Thanks! Cheers, Petr
>
> Petr Štetiar <ynezz@true.cz> [2025-05-12 11:26:31]:
>
> > 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.
> >
All Quectel modems have the vendor ID of 0x1eac. But here, both Vendor and
Sub-vendor IDs are QCOM. This usually happens if the modem doesn't properly
reset and we end up seeing the default QCOM IDs and not the ones programmed by
the vendor. Or the vendor deliberately didn't program the Vendor ID for some
reason.
We saw a similar issue with another Quectel modem [1], but we didn't get any
response from Quectel (Duke Xin). I believe both are related.
But unfortunately, we cannot use 'mhi_quectel_rm5xx_info' for these IDs as the
IDs belong to QCOM and the config belongs to Quectel.
@Duke Xin: Could you please let us know why the Quectel modems are using the
QCOM Vendor IDs?
- Mani
[1] https://lore.kernel.org/mhi/CAHCJQqFdDRz7ZyxoeDd1FLu-yjCCHy=Y1Sq2wMDFFH12G1625Q@mail.gmail.com
> > 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 },
>
> --
> ynezz
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: mhi: host: pci_generic: add support for Quectel RM520N-GL 0x5201 variant
2025-08-18 8:07 ` Manivannan Sadhasivam
@ 2025-08-18 9:26 ` Chris Webb
0 siblings, 0 replies; 4+ messages in thread
From: Chris Webb @ 2025-08-18 9:26 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Petr Štetiar, Manivannan Sadhasivam,
Duke Xin (辛安文), mhi, linux-arm-msm
Manivannan Sadhasivam <mani@kernel.org> writes:
> @Duke Xin: Could you please let us know why the Quectel modems are using the
> QCOM Vendor IDs?
In particular, I wonder if there's a way to reconfigure the modem to
permanently set the correct IDs so it doesn't need a patch at all? That
would be a nicer fix than adding to the giant list of variants.
PS While the tiny diff here is mine, the commit message isn't, so it
probably should be attributed as From: Petr rather than From: me. But
this doesn't matter if my hack is not correct anyway! ;-)
Best wishes,
Chris.
^ permalink raw reply [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;
as well as URLs for NNTP newsgroup(s).