]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bus: mhi: host: pci_generic: Add Telit FN920C04 modem support
authorDaniele Palmas <dnlplm@gmail.com>
Wed, 3 Dec 2025 13:53:52 +0000 (14:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Dec 2025 17:37:22 +0000 (18:37 +0100)
commit 6348f62ef7ecc5855b710a7d4ea682425c38bb80 upstream.

Add SDX35 based modem Telit FN920C04.

$ lspci -vv
01:00.0 Unassigned class [ff00]: Qualcomm Device 011a
        Subsystem: Device 1c5d:2020

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250401093458.2953872-1-dnlplm@gmail.com
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/host/pci_generic.c

index 6505ce6ab1a233a09d4fac45306e61cb676e91f2..b8520ca40e8c56dd9a9224f79b47ea13400af954 100644 (file)
@@ -698,6 +698,42 @@ static const struct mhi_pci_dev_info mhi_telit_fe990a_info = {
        .mru_default = 32768,
 };
 
+static const struct mhi_channel_config mhi_telit_fn920c04_channels[] = {
+       MHI_CHANNEL_CONFIG_UL_SBL(2, "SAHARA", 32, 0),
+       MHI_CHANNEL_CONFIG_DL_SBL(3, "SAHARA", 32, 0),
+       MHI_CHANNEL_CONFIG_UL(4, "DIAG", 64, 1),
+       MHI_CHANNEL_CONFIG_DL(5, "DIAG", 64, 1),
+       MHI_CHANNEL_CONFIG_UL(14, "QMI", 32, 0),
+       MHI_CHANNEL_CONFIG_DL(15, "QMI", 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_UL(92, "DUN2", 32, 1),
+       MHI_CHANNEL_CONFIG_DL(93, "DUN2", 32, 1),
+       MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 128, 2),
+       MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 128, 3),
+};
+
+static const struct mhi_controller_config modem_telit_fn920c04_config = {
+       .max_channels = 128,
+       .timeout_ms = 50000,
+       .num_channels = ARRAY_SIZE(mhi_telit_fn920c04_channels),
+       .ch_cfg = mhi_telit_fn920c04_channels,
+       .num_events = ARRAY_SIZE(mhi_telit_fn990_events),
+       .event_cfg = mhi_telit_fn990_events,
+};
+
+static const struct mhi_pci_dev_info mhi_telit_fn920c04_info = {
+       .name = "telit-fn920c04",
+       .config = &modem_telit_fn920c04_config,
+       .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
+       .dma_data_width = 32,
+       .sideband_wake = false,
+       .mru_default = 32768,
+       .edl_trigger = true,
+};
+
 static const struct mhi_pci_dev_info mhi_netprisma_lcur57_info = {
        .name = "netprisma-lcur57",
        .edl = "qcom/prog_firehose_sdx24.mbn",
@@ -720,6 +756,9 @@ static const struct mhi_pci_dev_info mhi_netprisma_fcun69_info = {
 
 /* 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[] = {
+       /* Telit FN920C04 (sdx35) */
+       {PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x011a, 0x1c5d, 0x2020),
+               .driver_data = (kernel_ulong_t) &mhi_telit_fn920c04_info },
        { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
                .driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
        { PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, PCI_VENDOR_ID_QCOM, 0x010c),