generic: 6.1: backport support for various MHI 5G modems
[openwrt/openwrt.git] / target / linux / generic / backport-6.1 / 854-v6.4-bus-mhi-pci_generic-Add-Foxconn-T99W510.patch
1 From 537350abfcc6b639884d1ef7bff35d31a624549b Mon Sep 17 00:00:00 2001
2 From: Slark Xiao <slark_xiao@163.com>
3 Date: Wed, 29 Mar 2023 15:22:39 +0800
4 Subject: [PATCH 05/13] bus: mhi: pci_generic: Add Foxconn T99W510
5
6 The Foxconn T99W510 device is designed based on Qualcomm
7 SDX24. Add 3 variants for different potential customer.
8
9 Signed-off-by: Slark Xiao <slark_xiao@163.com>
10 Link: https://lore.kernel.org/r/20230329072239.93632-1-slark_xiao@163.com
11 Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12 ---
13 drivers/bus/mhi/host/pci_generic.c | 18 ++++++++++++++++++
14 1 file changed, 18 insertions(+)
15
16 --- a/drivers/bus/mhi/host/pci_generic.c
17 +++ b/drivers/bus/mhi/host/pci_generic.c
18 @@ -363,6 +363,15 @@ static const struct mhi_controller_confi
19 .event_cfg = mhi_foxconn_sdx55_events,
20 };
21
22 +static const struct mhi_pci_dev_info mhi_foxconn_sdx24_info = {
23 + .name = "foxconn-sdx24",
24 + .config = &modem_foxconn_sdx55_config,
25 + .bar_num = MHI_PCI_DEFAULT_BAR_NUM,
26 + .dma_data_width = 32,
27 + .mru_default = 32768,
28 + .sideband_wake = false,
29 +};
30 +
31 static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = {
32 .name = "foxconn-sdx55",
33 .fw = "qcom/sdx55m/sbl1.mbn",
34 @@ -587,6 +596,15 @@ static const struct pci_device_id mhi_pc
35 /* T99W373 (sdx62) */
36 { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0d9),
37 .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx65_info },
38 + /* T99W510 (sdx24), variant 1 */
39 + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f0),
40 + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
41 + /* T99W510 (sdx24), variant 2 */
42 + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f1),
43 + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
44 + /* T99W510 (sdx24), variant 3 */
45 + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0f2),
46 + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx24_info },
47 /* MV31-W (Cinterion) */
48 { PCI_DEVICE(PCI_VENDOR_ID_THALES, 0x00b3),
49 .driver_data = (kernel_ulong_t) &mhi_mv31_info },