* [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
@ 2024-06-05 0:53 mank
2024-06-05 6:15 ` manivannan.sadhasivam
0 siblings, 1 reply; 4+ messages in thread
From: mank @ 2024-06-05 0:53 UTC (permalink / raw)
To: manivannan.sadhasivam@linaro.org
Cc: duke_xinanwen@163.com, loic.poulain@linaro.org,
quic_qianyu@quicinc.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 3751 bytes --]
Add Netprisma LCUR57 and FCUN69 hardware revision:
LCUR57:
02:00.0 Unassigned class [ff00]: Device 203e:1000
Subsystem: Device 203e:1000
FCUN69:
02:00.0 Unassigned class [ff00]: Device 203e:1001
Subsystem: Device 203e:1001
Signed-off-by: Mank Wang <mank@netprisma.us>
---
drivers/bus/mhi/host/pci_generic.c | 61 ++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 08844ee79654..e2b88699ce9e 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -26,6 +26,7 @@
/* PCI VID definitions */
#define PCI_VENDOR_ID_THALES 0x1269
#define PCI_VENDOR_ID_QUECTEL 0x1eac
+#define PCI_VENDOR_ID_NETPRISMA 0x203E
#define MHI_EDL_DB 91
#define MHI_EDL_COOKIE 0xEDEDEDED
@@ -606,6 +607,60 @@ static const struct mhi_pci_dev_info mhi_telit_fn990_info = {
.mru_default = 32768,
};
+static const struct mhi_channel_config mhi_netprisma_lcur57_channels[] = {
+ MHI_CHANNEL_CONFIG_UL(0, "NMEA", 32, 0),
+ MHI_CHANNEL_CONFIG_DL(1, "NMEA", 32, 0),
+ MHI_CHANNEL_CONFIG_UL_SBL(2, "SAHARA", 32, 0),
+ MHI_CHANNEL_CONFIG_DL_SBL(3, "SAHARA", 32, 0),
+ MHI_CHANNEL_CONFIG_UL(4, "DIAG", 32, 1),
+ MHI_CHANNEL_CONFIG_DL(5, "DIAG", 32, 1),
+ MHI_CHANNEL_CONFIG_UL(12, "MBIM", 32, 0),
+ MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0),
+ MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0),
+ MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0),
+ MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
+ MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
+ MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2),
+ MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
+};
+
+static struct mhi_event_config mhi_netprisma_lcur57_events[] = {
+ MHI_EVENT_CONFIG_CTRL(0, 128),
+ MHI_EVENT_CONFIG_DATA(1, 128),
+ MHI_EVENT_CONFIG_HW_DATA(2, 1024, 100),
+ MHI_EVENT_CONFIG_HW_DATA(3, 1024, 101)
+};
+
+static const struct mhi_controller_config modem_netprisma_lcur57_config = {
+ .max_channels = 128,
+ .timeout_ms = 20000,
+ .num_channels = ARRAY_SIZE(mhi_netprisma_lcur57_channels),
+ .ch_cfg = mhi_netprisma_lcur57_channels,
+ .num_events = ARRAY_SIZE(mhi_netprisma_lcur57_events),
+ .event_cfg = mhi_netprisma_lcur57_events,
+};
+
+static const struct mhi_pci_dev_info mhi_netprisma_lcur57_info = {
+ .name = "netprisma-lcur57",
+ .edl = "qcom/prog_firehose_sdx24.mbn",
+ .config = &modem_netprisma_lcur57_config,
+ .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
+ .dma_data_width = 32,
+ .mru_default = 32768,
+ .sideband_wake = true,
+};
+
+static const struct mhi_pci_dev_info mhi_netprisma_fcun69_info = {
+ .name = "netprisma-fcun69",
+ .edl = "qcom/prog_firehose_sdx6x.elf",
+ /* FCUN69 uses the same controller configuration as LCUR57 */
+ .config = &modem_netprisma_lcur57_config,
+ .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
+ .dma_data_width = 32,
+ .mru_default = 32768,
+ .sideband_wake = true,
+};
+
/* Keep the list sorted based on the PID. New VID should be added as the last entry */
static const struct pci_device_id mhi_pci_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
@@ -695,6 +750,12 @@ static const struct pci_device_id mhi_pci_id_table[] = {
/* T99W175 (sdx55), HP variant */
{ PCI_DEVICE(0x03f0, 0x0a6c),
.driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
+ /* NETPRISMA LCUR57 (SDX24) */
+ { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1000),
+ .driver_data = (kernel_ulong_t) &mhi_netprisma_lcur57_info },
+ /* NETPRISMA FCUN69 (SDX6X) */
+ { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1001),
+ .driver_data = (kernel_ulong_t) &mhi_netprisma_fcun69_info },
{ }
};
MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
--
2.34.1
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 15025 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
2024-06-05 0:53 [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69 mank
@ 2024-06-05 6:15 ` manivannan.sadhasivam
0 siblings, 0 replies; 4+ messages in thread
From: manivannan.sadhasivam @ 2024-06-05 6:15 UTC (permalink / raw)
To: mank
Cc: duke_xinanwen@163.com, loic.poulain@linaro.org,
quic_qianyu@quicinc.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
On Wed, Jun 05, 2024 at 12:53:31AM +0000, mank wrote:
> Add Netprisma LCUR57 and FCUN69 hardware revision:
>
> LCUR57:
> 02:00.0 Unassigned class [ff00]: Device 203e:1000
> Subsystem: Device 203e:1000
>
> FCUN69:
> 02:00.0 Unassigned class [ff00]: Device 203e:1001
> Subsystem: Device 203e:1001
>
> Signed-off-by: Mank Wang <mank@netprisma.us>
> ---
> drivers/bus/mhi/host/pci_generic.c | 61 ++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 08844ee79654..e2b88699ce9e 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -26,6 +26,7 @@
> /* PCI VID definitions */
> #define PCI_VENDOR_ID_THALES 0x1269
> #define PCI_VENDOR_ID_QUECTEL 0x1eac
> +#define PCI_VENDOR_ID_NETPRISMA 0x203E
lower case please.
>
> #define MHI_EDL_DB 91
> #define MHI_EDL_COOKIE 0xEDEDEDED
> @@ -606,6 +607,60 @@ static const struct mhi_pci_dev_info mhi_telit_fn990_info = {
> .mru_default = 32768,
> };
>
> +static const struct mhi_channel_config mhi_netprisma_lcur57_channels[] = {
> + MHI_CHANNEL_CONFIG_UL(0, "NMEA", 32, 0),
> + MHI_CHANNEL_CONFIG_DL(1, "NMEA", 32, 0),
> + MHI_CHANNEL_CONFIG_UL_SBL(2, "SAHARA", 32, 0),
> + MHI_CHANNEL_CONFIG_DL_SBL(3, "SAHARA", 32, 0),
> + MHI_CHANNEL_CONFIG_UL(4, "DIAG", 32, 1),
> + MHI_CHANNEL_CONFIG_DL(5, "DIAG", 32, 1),
> + MHI_CHANNEL_CONFIG_UL(12, "MBIM", 32, 0),
> + MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0),
> + MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0),
> + MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0),
> + MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
> + MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
> + MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2),
> + MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
> +};
> +
> +static struct mhi_event_config mhi_netprisma_lcur57_events[] = {
> + MHI_EVENT_CONFIG_CTRL(0, 128),
> + MHI_EVENT_CONFIG_DATA(1, 128),
> + MHI_EVENT_CONFIG_HW_DATA(2, 1024, 100),
> + MHI_EVENT_CONFIG_HW_DATA(3, 1024, 101)
> +};
> +
> +static const struct mhi_controller_config modem_netprisma_lcur57_config = {
> + .max_channels = 128,
> + .timeout_ms = 20000,
> + .num_channels = ARRAY_SIZE(mhi_netprisma_lcur57_channels),
> + .ch_cfg = mhi_netprisma_lcur57_channels,
> + .num_events = ARRAY_SIZE(mhi_netprisma_lcur57_events),
> + .event_cfg = mhi_netprisma_lcur57_events,
> +};
> +
The config looks similar to 'modem_quectel_em1xx_config', so you can just reuse
it.
- Mani
> +static const struct mhi_pci_dev_info mhi_netprisma_lcur57_info = {
> + .name = "netprisma-lcur57",
> + .edl = "qcom/prog_firehose_sdx24.mbn",
> + .config = &modem_netprisma_lcur57_config,
> + .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
> + .dma_data_width = 32,
> + .mru_default = 32768,
> + .sideband_wake = true,
> +};
> +
> +static const struct mhi_pci_dev_info mhi_netprisma_fcun69_info = {
> + .name = "netprisma-fcun69",
> + .edl = "qcom/prog_firehose_sdx6x.elf",
> + /* FCUN69 uses the same controller configuration as LCUR57 */
> + .config = &modem_netprisma_lcur57_config,
> + .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
> + .dma_data_width = 32,
> + .mru_default = 32768,
> + .sideband_wake = true,
> +};
> +
> /* Keep the list sorted based on the PID. New VID should be added as the last entry */
> static const struct pci_device_id mhi_pci_id_table[] = {
> { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> @@ -695,6 +750,12 @@ static const struct pci_device_id mhi_pci_id_table[] = {
> /* T99W175 (sdx55), HP variant */
> { PCI_DEVICE(0x03f0, 0x0a6c),
> .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },
> + /* NETPRISMA LCUR57 (SDX24) */
> + { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1000),
> + .driver_data = (kernel_ulong_t) &mhi_netprisma_lcur57_info },
> + /* NETPRISMA FCUN69 (SDX6X) */
> + { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1001),
> + .driver_data = (kernel_ulong_t) &mhi_netprisma_fcun69_info },
> { }
> };
> MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
> --
> 2.34.1
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
@ 2024-07-30 3:01 Mank Wang
2024-08-26 8:06 ` manivannan.sadhasivam
0 siblings, 1 reply; 4+ messages in thread
From: Mank Wang @ 2024-07-30 3:01 UTC (permalink / raw)
To: manivannan.sadhasivam@linaro.org
Cc: duke_xinanwen@163.com, loic.poulain@linaro.org,
quic_qianyu@quicinc.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2502 bytes --]
Add Netprisma LCUR57 and FCUN69 hardware revision:
LCUR57:
02:00.0 Unassigned class [ff00]: Device 203e:1000
Subsystem: Device 203e:1000
FCUN69:
02:00.0 Unassigned class [ff00]: Device 203e:1001
Subsystem: Device 203e:1001
Signed-off-by: Mank Wang <mank.wang@netprisma.us>
---
drivers/bus/mhi/host/pci_generic.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index 14a11880bcea..054420ca4c8f 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -26,6 +26,7 @@
/* PCI VID definitions */
#define PCI_VENDOR_ID_THALES 0x1269
#define PCI_VENDOR_ID_QUECTEL 0x1eac
+#define PCI_VENDOR_ID_NETPRISMA 0x203e
#define MHI_EDL_DB 91
#define MHI_EDL_COOKIE 0xEDEDEDED
@@ -680,6 +681,28 @@ static const struct mhi_pci_dev_info mhi_telit_fn990_info = {
.mru_default = 32768,
};
+static const struct mhi_pci_dev_info mhi_netprisma_lcur57_info = {
+ .name = "netprisma-lcur57",
+ .edl = "qcom/prog_firehose_sdx24.mbn",
+ /* LCUR57 uses the same controller configuration as quectel_em1xx */
+ .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_pci_dev_info mhi_netprisma_fcun69_info = {
+ .name = "netprisma-fcun69",
+ .edl = "qcom/prog_firehose_sdx6x.elf",
+ /* FCUN69 uses the same controller configuration as quectel_em1xx */
+ .config = &modem_quectel_em1xx_config,
+ .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
+ .dma_data_width = 32,
+ .mru_default = 32768,
+ .sideband_wake = true,
+};
+
/* Keep the list sorted based on the PID. New VID should be added as the last entry */
static const struct pci_device_id mhi_pci_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
@@ -778,6 +801,12 @@ static const struct pci_device_id mhi_pci_id_table[] = {
/* T99W175 (sdx55), HP variant */
{ PCI_DEVICE(0x03f0, 0x0a6c),
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
+ /* NETPRISMA LCUR57 (SDX24) */
+ { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1000),
+ .driver_data = (kernel_ulong_t) &mhi_netprisma_lcur57_info },
+ /* NETPRISMA FCUN69 (SDX6X) */
+ { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1001),
+ .driver_data = (kernel_ulong_t) &mhi_netprisma_fcun69_info },
{ }
};
MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
--
2.34.1
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14885 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69
2024-07-30 3:01 Mank Wang
@ 2024-08-26 8:06 ` manivannan.sadhasivam
0 siblings, 0 replies; 4+ messages in thread
From: manivannan.sadhasivam @ 2024-08-26 8:06 UTC (permalink / raw)
To: Mank Wang
Cc: duke_xinanwen@163.com, loic.poulain@linaro.org,
quic_qianyu@quicinc.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
On Tue, Jul 30, 2024 at 03:01:05AM +0000, Mank Wang wrote:
> Add Netprisma LCUR57 and FCUN69 hardware revision:
>
> LCUR57:
> 02:00.0 Unassigned class [ff00]: Device 203e:1000
> Subsystem: Device 203e:1000
>
> FCUN69:
> 02:00.0 Unassigned class [ff00]: Device 203e:1001
> Subsystem: Device 203e:1001
>
Can you please add a note on how this modem is tested? Like using any modem
manager commands, how the IP interface is created (IPA or MBIM) etc...
> Signed-off-by: Mank Wang <mank.wang@netprisma.us>
> ---
> drivers/bus/mhi/host/pci_generic.c | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 14a11880bcea..054420ca4c8f 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -26,6 +26,7 @@
> /* PCI VID definitions */
> #define PCI_VENDOR_ID_THALES 0x1269
> #define PCI_VENDOR_ID_QUECTEL 0x1eac
> +#define PCI_VENDOR_ID_NETPRISMA 0x203e
>
> #define MHI_EDL_DB 91
> #define MHI_EDL_COOKIE 0xEDEDEDED
> @@ -680,6 +681,28 @@ static const struct mhi_pci_dev_info mhi_telit_fn990_info = {
> .mru_default = 32768,
> };
>
> +static const struct mhi_pci_dev_info mhi_netprisma_lcur57_info = {
> + .name = "netprisma-lcur57",
> + .edl = "qcom/prog_firehose_sdx24.mbn",
> + /* LCUR57 uses the same controller configuration as quectel_em1xx */
No need of this comment here and below.
- Mani
> + .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_pci_dev_info mhi_netprisma_fcun69_info = {
> + .name = "netprisma-fcun69",
> + .edl = "qcom/prog_firehose_sdx6x.elf",
> + /* FCUN69 uses the same controller configuration as quectel_em1xx */
> + .config = &modem_quectel_em1xx_config,
> + .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
> + .dma_data_width = 32,
> + .mru_default = 32768,
> + .sideband_wake = true,
> +};
> +
> /* Keep the list sorted based on the PID. New VID should be added as the last entry */
> static const struct pci_device_id mhi_pci_id_table[] = {
> { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
> @@ -778,6 +801,12 @@ static const struct pci_device_id mhi_pci_id_table[] = {
> /* T99W175 (sdx55), HP variant */
> { PCI_DEVICE(0x03f0, 0x0a6c),
> .driver_data = (kernel_ulong_t) &mhi_foxconn_t99w175_info },
> + /* NETPRISMA LCUR57 (SDX24) */
> + { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1000),
> + .driver_data = (kernel_ulong_t) &mhi_netprisma_lcur57_info },
> + /* NETPRISMA FCUN69 (SDX6X) */
> + { PCI_DEVICE(PCI_VENDOR_ID_NETPRISMA, 0x1001),
> + .driver_data = (kernel_ulong_t) &mhi_netprisma_fcun69_info },
> { }
> };
> MODULE_DEVICE_TABLE(pci, mhi_pci_id_table);
> --
> 2.34.1
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-26 8:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 0:53 [PATCH] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69 mank
2024-06-05 6:15 ` manivannan.sadhasivam
-- strict thread matches above, loose matches on Subject: below --
2024-07-30 3:01 Mank Wang
2024-08-26 8:06 ` manivannan.sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox