Skip to content

Commit 0d63055

Browse files
SlarkXiaoMani-Sadhasivam
authored andcommitted
bus: mhi: host: pci_generic: Add Foxconn T99W696 modem
T99W696 modem is based on Qualcomm SDX61 chipset, which is an economic version compared to the baseline SDX62/SDX65 chipsets. Add support for it by introducing a new 'mhi_channel_config'. Since this modem supports the NMEA channel, a new config is needed. Signed-off-by: Slark Xiao <[email protected]> [mani: reworded commit message] Signed-off-by: Manivannan Sadhasivam <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent e99f55e commit 0d63055

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,23 @@ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = {
493493
MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
494494
};
495495

496+
static const struct mhi_channel_config mhi_foxconn_sdx61_channels[] = {
497+
MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 32, 0),
498+
MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 32, 0),
499+
MHI_CHANNEL_CONFIG_UL(4, "DIAG", 32, 1),
500+
MHI_CHANNEL_CONFIG_DL(5, "DIAG", 32, 1),
501+
MHI_CHANNEL_CONFIG_UL(12, "MBIM", 32, 0),
502+
MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0),
503+
MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0),
504+
MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0),
505+
MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
506+
MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
507+
MHI_CHANNEL_CONFIG_UL(50, "NMEA", 32, 0),
508+
MHI_CHANNEL_CONFIG_DL(51, "NMEA", 32, 0),
509+
MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2),
510+
MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
511+
};
512+
496513
static struct mhi_event_config mhi_foxconn_sdx55_events[] = {
497514
MHI_EVENT_CONFIG_CTRL(0, 128),
498515
MHI_EVENT_CONFIG_DATA(1, 128),
@@ -509,6 +526,15 @@ static const struct mhi_controller_config modem_foxconn_sdx55_config = {
509526
.event_cfg = mhi_foxconn_sdx55_events,
510527
};
511528

529+
static const struct mhi_controller_config modem_foxconn_sdx61_config = {
530+
.max_channels = 128,
531+
.timeout_ms = 20000,
532+
.num_channels = ARRAY_SIZE(mhi_foxconn_sdx61_channels),
533+
.ch_cfg = mhi_foxconn_sdx61_channels,
534+
.num_events = ARRAY_SIZE(mhi_foxconn_sdx55_events),
535+
.event_cfg = mhi_foxconn_sdx55_events,
536+
};
537+
512538
static const struct mhi_controller_config modem_foxconn_sdx72_config = {
513539
.max_channels = 128,
514540
.timeout_ms = 20000,
@@ -618,6 +644,17 @@ static const struct mhi_pci_dev_info mhi_foxconn_dw5934e_info = {
618644
.sideband_wake = false,
619645
};
620646

647+
static const struct mhi_pci_dev_info mhi_foxconn_t99w696_info = {
648+
.name = "foxconn-t99w696",
649+
.edl = "qcom/sdx61/foxconn/prog_firehose_lite.elf",
650+
.edl_trigger = true,
651+
.config = &modem_foxconn_sdx61_config,
652+
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
653+
.dma_data_width = 32,
654+
.mru_default = 32768,
655+
.sideband_wake = false,
656+
};
657+
621658
static const struct mhi_channel_config mhi_mv3x_channels[] = {
622659
MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 64, 0),
623660
MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 64, 0),
@@ -870,6 +907,21 @@ static const struct pci_device_id mhi_pci_id_table[] = {
870907
/* Telit FE990A */
871908
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, 0x1c5d, 0x2015),
872909
.driver_data = (kernel_ulong_t) &mhi_telit_fe990a_info },
910+
/* Foxconn T99W696.01, Lenovo Generic SKU */
911+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_FOXCONN, 0xe142),
912+
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w696_info },
913+
/* Foxconn T99W696.02, Lenovo X1 Carbon SKU */
914+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_FOXCONN, 0xe143),
915+
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w696_info },
916+
/* Foxconn T99W696.03, Lenovo X1 2in1 SKU */
917+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_FOXCONN, 0xe144),
918+
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w696_info },
919+
/* Foxconn T99W696.04, Lenovo PRC SKU */
920+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_FOXCONN, 0xe145),
921+
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w696_info },
922+
/* Foxconn T99W696.00, Foxconn SKU */
923+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0308, PCI_VENDOR_ID_FOXCONN, 0xe146),
924+
.driver_data = (kernel_ulong_t) &mhi_foxconn_t99w696_info },
873925
{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308),
874926
.driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info },
875927
{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0309),

0 commit comments

Comments
 (0)