rm520n-gl mhi
authorDavid Bauer <mail@david-bauer.net>
Sat, 2 Dec 2023 00:41:37 +0000 (01:41 +0100)
committerDavid Bauer <mail@david-bauer.net>
Thu, 7 Dec 2023 20:42:09 +0000 (21:42 +0100)
target/linux/generic/backport-6.1/990-rm520n-gl.patch [new file with mode: 0644]
target/linux/generic/backport-6.1/995-rm520n-gl-x3000.patch [new file with mode: 0644]

diff --git a/target/linux/generic/backport-6.1/990-rm520n-gl.patch b/target/linux/generic/backport-6.1/990-rm520n-gl.patch
new file mode 100644 (file)
index 0000000..accbd31
--- /dev/null
@@ -0,0 +1,49 @@
+From 1cad976a1be9e97ceca5797b7e1000e2f1a9980e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Duke=20Xin=20=28=E8=BE=9B=E5=AE=89=E6=96=87=29?=
+ <duke_xinanwen@163.com>
+Date: Thu, 29 Jun 2023 23:23:18 -0700
+Subject: [PATCH] bus: mhi: host: pci_generic: Add support for Quectel
+ RM520N-GL modem
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add MHI interface definition for RM520 product based on Qualcomm SDX6X chip
+
+Signed-off-by: Duke Xin(辛安文) <duke_xinanwen@163.com>
+Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
+Link: https://lore.kernel.org/r/20230630062318.12114-1-duke_xinanwen@163.com
+Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+---
+ drivers/bus/mhi/host/pci_generic.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/bus/mhi/host/pci_generic.c
++++ b/drivers/bus/mhi/host/pci_generic.c
+@@ -331,6 +331,16 @@ static const struct mhi_pci_dev_info mhi
+       .sideband_wake = true,
+ };
++static const struct mhi_pci_dev_info mhi_quectel_rm5xx_info = {
++      .name = "quectel-rm5xx",
++      .edl = "qcom/prog_firehose_sdx6x.elf",
++      .config = &modem_quectel_em1xx_config,
++      .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
++      .dma_data_width = 32,
++      .mru_default = 32768,
++      .sideband_wake = true,
++};
++
+ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = {
+       MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 32, 0),
+       MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 32, 0),
+@@ -561,6 +571,9 @@ static const struct pci_device_id mhi_pc
+               .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
+       { PCI_DEVICE(0x1eac, 0x2001), /* EM120R-GL for FCCL (sdx24) */
+               .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info },
++      /* RM520N-GL (sdx6x), eSIM */
++      { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1004),
++              .driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info },
+       /* T99W175 (sdx55), Both for eSIM and Non-eSIM */
+       { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
+               .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
diff --git a/target/linux/generic/backport-6.1/995-rm520n-gl-x3000.patch b/target/linux/generic/backport-6.1/995-rm520n-gl-x3000.patch
new file mode 100644 (file)
index 0000000..0157ba0
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/bus/mhi/host/pci_generic.c
++++ b/drivers/bus/mhi/host/pci_generic.c
+@@ -574,6 +574,9 @@ static const struct pci_device_id mhi_pc
+       /* RM520N-GL (sdx6x), eSIM */
+       { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1004),
+               .driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info },
++      /* RM520N-GL (sdx6x), GL-X3000 */
++      { PCI_DEVICE_SUB(0x17cb, 0x0308, 0x17cb, 0x5201),
++              .driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info },
+       /* T99W175 (sdx55), Both for eSIM and Non-eSIM */
+       { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab),
+               .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },