From patchwork Tue Aug 27 01:58:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mank Wang X-Patchwork-Id: 13778712 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2096.outbound.protection.outlook.com [40.107.94.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1C1AC2C8; Tue, 27 Aug 2024 01:58:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.96 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724723917; cv=fail; b=Vur2vCYlYZUza3flKz8FhGx2IQbhpE8LVbWDl9QXhfv5BHO+59NO6sh2FntsYiq6wa9Vgn5H+ZQBQ5hJl3xKJhgoh1RiwZUTGteQcsyC+ZcNwHTCX+dCC2ezO7cFV7hZubKaS9pWN6T0MOfEdVdf1yI8GvbGG88hfx+/pggmrEo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724723917; c=relaxed/simple; bh=GImk2QY2ueSy/UsVK9QMEF9aLWUU5ueiPb2Vh+Yof8A=; h=Content-Type:From:To:CC:Subject:Date:Message-ID:MIME-Version; b=hgn541fP9PqXbX5WeNRZ9dpcAwuhBM0SgNIjzOcrcg81O+kFBEVuUZ1QFXXsthwe8auGdlZRaAFi1UiGA7NM2M0/2zHskf+BCjO6w8MymU3H57oq9OoWYXtUvaxlVK89/hEykeaSNqXDPkkzlGqC1jnYjhqX0WU2HaRSN2WDtSU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=netprisma.us; spf=pass smtp.mailfrom=netprisma.us; arc=fail smtp.client-ip=40.107.94.96 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=netprisma.us Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netprisma.us ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KErBOc8fAsvup49G7OX2VJUTHRECVRsfQ5+/by1PiIxihT2TDlvqbDlSldssZUmA/5Be1fOdvKM4JrF5HbO7d2UXugUbVPznEcA6257uHbNGuVgvNBg4tJEPE7OKCsOpkRieXzGWEqXw3+WWPnwO3w1vOtjRsCa+cV5N9c6O+VDzxi8xTie9uHIWtHYktcEJCNDgGmzl/w2NQ7GAIUR2uFNs1MCAQb3aStukcFHojvNM8kYhyTnfLIFSY37t4lYduNgKHrinPwFFKQVNNLsErohsgAITJqXiWgmIT6/SPKjRDvppxolb+dhYFrNYx4mLb9MJ5CFRx/q/lohlxwyDkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jlhNfpMq/NZCetGwUO+tn7i+fE4eoRKTEeFAcFGJDN4=; b=WrqTeVloKgCpVP0grssH+0Y+3otJUlWHuT/6rPn66UR3dqskVNS1KGqG4vSG6D8ES1EvtY8qutm8mJteic8VPOOlPqzGdZ/JOR0EKr29+lijn6qhIBl/wSboksQYPYekUjsPjsv2mDOmeVToS4BnhVW8HG3DzHr3/nWzAjZDSFWFuaNvu95p6qRRhMtcs5pcQIO/t9ezrTVjWXXHNFzYhHKzrGiJoR1VSVYY0tOpVmTkp7SXEyqi+UROLP9zOhqEH1n30xw2uhhChY50U/HWoe9l9J7WOJoQ+bDDFmqfYpUPKPbkOfTbJhLswcbijtNn8FR3CNVjYD+hoiPupR6hEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=netprisma.us; dmarc=pass action=none header.from=netprisma.us; dkim=pass header.d=netprisma.us; arc=none Received: from PH7PR22MB3038.namprd22.prod.outlook.com (2603:10b6:510:134::12) by MW4PR22MB3433.namprd22.prod.outlook.com (2603:10b6:303:1bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.23; Tue, 27 Aug 2024 01:58:33 +0000 Received: from PH7PR22MB3038.namprd22.prod.outlook.com ([fe80::5bbd:4bf9:3952:a57b]) by PH7PR22MB3038.namprd22.prod.outlook.com ([fe80::5bbd:4bf9:3952:a57b%4]) with mapi id 15.20.7897.021; Tue, 27 Aug 2024 01:58:33 +0000 From: Mank Wang 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" Subject: [PATCH V2] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69 Thread-Topic: [PATCH V2] bus: mhi: host: pci_generic: Add support for Netprisma LCUR57 and FCUN69 Thread-Index: Adr4JJy25XH+ApyuQN+OQHvHASc+tw== Date: Tue, 27 Aug 2024 01:58:33 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=netprisma.us; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR22MB3038:EE_|MW4PR22MB3433:EE_ x-ms-office365-filtering-correlation-id: 4ce52366-ff2b-4f87-2ab7-08dcc63bc184 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|80162021|38070700018; x-microsoft-antispam-message-info: kSpTxKSjYAfuvNk8tsmVpYZUqBpaSoFsCDMp77ofSo+3Bs3nWQdcUqaI55+jSFG6ZwC9ddVoxP1AynmIOwwevNEtJwVi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xwoBXy/Qp4uy0XgmqHFy68wc1RVZ+vACUQOd32rMCF0MaFGTJZ8awjtLiS+c2DyPxBmPOWdStv9LZpRF+eDCqwSwt2b5fkgf1oR7Rr3nzCKWI5BN4Fj4cOco9G95jwmKxI3BoZtIZJ8Z5ODmG57DNyri3RmVFCQ7lPjMzV7EoRaPl7/O+kYRrZ03Amtu06xG3xPSFbq6Ak6HDW7LDJb+blZtMPLCfG7AQXZ/m9c1j2Rz6s+eiOigdH++ESzhGgj6gCliEJV6FiT93GCzhGMaL1sjQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR22MB3038.namprd22.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(80162021)(38070700018);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: Dw3QNNtJiBzJ14AE8wgS/FDJg0EjflywvH/7PeSnX6636ctajU7xJM5LeQTjMtdEW+yy3xL8cwOXsSVNYwBk1kmo91P9N7VdsQbAYZbB+ubQlNs52CDMcPb0tGYw0tr9OteFi8nnlB3aslGbgMhMXuZ+i08wD2cWEMPnWYRHIuSe8QLVxZqKPfAkuwoICId7JYfN63zv3ElKA9vigq4yUk9l8OMOKYsDJ2xs2zv6rpkW2F2epLwiDiCXPON5JjSHtnZCGaMdUdD5+UpcHtnO4i60auE+vy52+HLFIY9fl3XkZMhyKHt8BqWynw5dHj1iWs2rcDIKdN6feYMDPzB2JB+fujJMSDivL6JZVzBwUtDn7RZu3vZo1c+bW6P6Vx2oWl1N28OZ2FK/dOAt7JKvNHtduebUjaqySRKsM4K5LoVGKu5OlA4FioHD/9B1qAKrDzcOp5JyAvQyNenivqLA4D08NmQnPkof/Q+toYP4W6jAsPKp2r//A5JcchGo610WFALDWZASQ1KqNG69Drknm6FGXvbL+r+w91NniiugbgrscqLncJUaad2JFJ9mCG/p9y7ho4Mg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IME-Version: 1.0 X-OriginatorOrg: netprisma.us X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR22MB3038.namprd22.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ce52366-ff2b-4f87-2ab7-08dcc63bc184 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2024 01:58:33.1474 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fdc90941-0026-4225-aaa0-15fff5e87036 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XJ14Q8ayk9ILrz2LOnAOPT2UhL15LsO66Adr08olot+DJ3x9ZVDufu27V9AbaCwPqW6Bd3xTfx4lPZIbZ/mN2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR22MB3433 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 Both of these modules create IP interfaces through MBIM. And these modules can be checked for successful recognition through the following command: $ mmcli -L /org/freedesktop/ModemManager1/Modem/0 [NetPrisma] LCUR57-WWD $ mmcli -L /org/freedesktop/ModemManager1/Modem/0 [NetPrisma] FCUN69-WWD Signed-off-by: Mank Wang Reviewed-by: Manivannan Sadhasivam --- V1 -> V2: 1.Add comments to provide testing methods and IP interface creation methods. 2.Remove unnecessary comments. Signed-off-by: Mank Wang --- drivers/bus/mhi/host/pci_generic.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index 14a11880bcea..2c44aab8695a 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,26 @@ 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", + .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", + .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 +799,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);