Skip to content

Commit cba6bdf

Browse files
Mrinmay SarkarMani-Sadhasivam
authored andcommitted
bus: mhi: host: pci_generic: Add support for SA8775P endpoint
Add MHI controller config for SA8775P endpoint. SA8775P supports IP_SW usecase only. Hence use separate configuration to enable IP_SW channels. Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20241205065422.2515086-2-quic_msarkar@quicinc.com [mani: updated commit message and removed 'modem' reference in config] Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1 parent c8006fb commit cba6bdf

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,19 @@ static const struct mhi_pci_dev_info mhi_qcom_qdu100_info = {
297297
.sideband_wake = false,
298298
};
299299

300+
static const struct mhi_channel_config mhi_qcom_sa8775p_channels[] = {
301+
MHI_CHANNEL_CONFIG_UL(46, "IP_SW0", 2048, 1),
302+
MHI_CHANNEL_CONFIG_DL(47, "IP_SW0", 2048, 2),
303+
};
304+
305+
static struct mhi_event_config mhi_qcom_sa8775p_events[] = {
306+
/* first ring is control+data ring */
307+
MHI_EVENT_CONFIG_CTRL(0, 64),
308+
/* Software channels dedicated event ring */
309+
MHI_EVENT_CONFIG_SW_DATA(1, 64),
310+
MHI_EVENT_CONFIG_SW_DATA(2, 64),
311+
};
312+
300313
static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
301314
MHI_CHANNEL_CONFIG_UL(4, "DIAG", 16, 1),
302315
MHI_CHANNEL_CONFIG_DL(5, "DIAG", 16, 1),
@@ -327,6 +340,15 @@ static struct mhi_event_config modem_qcom_v1_mhi_events[] = {
327340
MHI_EVENT_CONFIG_HW_DATA(5, 2048, 101)
328341
};
329342

343+
static const struct mhi_controller_config mhi_qcom_sa8775p_config = {
344+
.max_channels = 128,
345+
.timeout_ms = 8000,
346+
.num_channels = ARRAY_SIZE(mhi_qcom_sa8775p_channels),
347+
.ch_cfg = mhi_qcom_sa8775p_channels,
348+
.num_events = ARRAY_SIZE(mhi_qcom_sa8775p_events),
349+
.event_cfg = mhi_qcom_sa8775p_events,
350+
};
351+
330352
static const struct mhi_controller_config modem_qcom_v2_mhiv_config = {
331353
.max_channels = 128,
332354
.timeout_ms = 8000,
@@ -346,6 +368,16 @@ static const struct mhi_controller_config modem_qcom_v1_mhiv_config = {
346368
.event_cfg = modem_qcom_v1_mhi_events,
347369
};
348370

371+
static const struct mhi_pci_dev_info mhi_qcom_sa8775p_info = {
372+
.name = "qcom-sa8775p",
373+
.edl_trigger = false,
374+
.config = &mhi_qcom_sa8775p_config,
375+
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
376+
.dma_data_width = 32,
377+
.mru_default = 32768,
378+
.sideband_wake = false,
379+
};
380+
349381
static const struct mhi_pci_dev_info mhi_qcom_sdx75_info = {
350382
.name = "qcom-sdx75m",
351383
.fw = "qcom/sdx75m/xbl.elf",
@@ -772,6 +804,8 @@ static const struct mhi_pci_dev_info mhi_netprisma_fcun69_info = {
772804

773805
/* Keep the list sorted based on the PID. New VID should be added as the last entry */
774806
static const struct pci_device_id mhi_pci_id_table[] = {
807+
{PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0116),
808+
.driver_data = (kernel_ulong_t) &mhi_qcom_sa8775p_info },
775809
{ PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0304),
776810
.driver_data = (kernel_ulong_t) &mhi_qcom_sdx24_info },
777811
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, PCI_VENDOR_ID_QCOM, 0x010c),

0 commit comments

Comments
 (0)