From patchwork Wed Jun 5 07:01:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mank X-Patchwork-Id: 13686244 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2110.outbound.protection.outlook.com [40.107.94.110]) (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 D83A218C354; Wed, 5 Jun 2024 07:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.110 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717570886; cv=fail; b=WBfrdDNbvl1aHe0HaCR+HnPEByYBk7tz4xtE7wJz+TtbZR0pzOv5ag6Zn+xvChtbWq3ETL0JgUtVmcdBfVCEr99UCDRYu9yKper1D+yOmSGUSgooP95wUVtOGQeE7tulm+3UyFv6u565XtH+aFGHHOEqj+9M+wonkKZ8lGjfeRY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717570886; c=relaxed/simple; bh=DroRx5FLoHzHMGTY+6504JjhwvMBdN3sn3BFFEUgInY=; h=Content-Type:From:To:CC:Subject:Date:Message-ID:MIME-Version; b=RTgXCkiw17PYgqD+Y6UJpCLIpRMFLlO0fZ668P21ireJaI23on3vscNSx+zprla2tt6ezivt8uaHCkDlCf2itsgxPnwiptesg2LLDgdZJql2BVLW4Zbzu6I1bzTdwdG7jp9+4Cb4/AF6aN8crXJcebeRXFvirlIVsHVvB0VXqiU= 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.110 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=arcselector9901; d=microsoft.com; cv=none; b=DDKPsmdwfmktk0bWYC3rndbNkX4Ns4UMrFZ0jCc6/AawYoZDyNrliprxC2JVmZI3JL/6e7jEGi9+OHuM7UafEsmcHN5OpZN3q4GvUuilz7G3yJqg8fYmIJb03RDxmfjTUWtP+nqSBz4H1sLaURiB5ySbyBA5q+ZFUL1F8IIDTZal+Ed5DyDBxV4nEI7WTSfrxYatCfnjjB0qvpVyi33TpgBza0RhFb9S1fkXyOXULpo9L6hsob48NADO4kvlKt9bxEIsfNlFGC3fqQHZiR+7oA5OO05M3QtueU5azge7/A4LlVmMzH0uHDScZ9CilPLOMNZ0WXkwWhI5rZN4eHLI9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Fj6It7Avh+yJqXYSYy3eXHtPoPkunVfG+0W2H3+iEYo=; b=ewVfofSqtTTegIhD42gz9LTAbqnosKA3Jd5+esmjLZ2t4C8GexXHl1UAEP2hBaCs/kbs0asovSMpQ7w5I4xaOJpZlyKVRyL2wPITmUo0esi5o/5nDWxeYzG0pWrT18xMKWQqG38kUGneBAMHJb6S08PGgro71DZAWMiSpw5JQgxfegpsakne587FEMg1ydCVaBIbPGFe91OlNd3g6tlFMgmyqvUcZNoZdNZrkx4yW8amp+CW403BkNVjO9YfuLcJNQAslZO6tljQpqEcwAWndKQr7OYOZvbkNkSrCnwW9/cOALFM+0zYJL2HOfF77g9bYb0VrGClB06/i3ymnFy0wQ== 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 LV3PR22MB5104.namprd22.prod.outlook.com (2603:10b6:408:1d3::21) by DS0PR22MB4049.namprd22.prod.outlook.com (2603:10b6:8:121::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.27; Wed, 5 Jun 2024 07:01:20 +0000 Received: from LV3PR22MB5104.namprd22.prod.outlook.com ([fe80::4b3:b595:d0d2:d5be]) by LV3PR22MB5104.namprd22.prod.outlook.com ([fe80::4b3:b595:d0d2:d5be%5]) with mapi id 15.20.7633.018; Wed, 5 Jun 2024 07:01:17 +0000 From: mank 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: Adq3FY63STVZwmNRSXKJZTlS/2XZIw== Date: Wed, 5 Jun 2024 07:01:17 +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: LV3PR22MB5104:EE_|DS0PR22MB4049:EE_ x-ms-office365-filtering-correlation-id: 68078606-ea65-4e97-812f-08dc852d4bbd x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|366007|376005|1800799015|38070700009|80162012; x-microsoft-antispam-message-info: JRzimbLl+7B7w4hcQ6mGUPZiJAn0z/0RrAeRm8sHamEMKc1Nl6xJxfZd4Wvi7GvbMVhQ92ckL2JWo+x4cJRIqcjZ2zGJyb8sB72IMrpx5Wn4TzpoJwe0L4O5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hyC582H2dLWT47FcZnU2cLl/gKFDEWsWORPyLQ8QQ9MLOGGDTxxaKQykpfoZ+g4C9xhwqN6BCUvWsfVDjCGlUHu6rUb8whC/FzLHPn6NUa7RKIoHfMRPEPPouWnj6mlB0xkIM+Mg1yfExVayYyP3cHk9WojOnD24M+2dIG3XtaRfh/n4aIkvLMCs1eAvKFP1HBfa4b+PLk5AaW5GWnBojQFHVibSHbxIJLZXLCg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR22MB5104.namprd22.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(38070700009)(80162012);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: dmy+Y3Ief3dIsvzDXL5aUSpjbM4mFohiFAaG3HwcP4BuEoK6OBWNmIrAtHiwOtS+KD3xiZuRUfEkCtl96tvoCQkImvVrD0CPgSBZoGkhCg3EwHg9iHr7cN8f2F8/fMvfBZ2sDh752+WLJMY6zLFh/2YEUHNV7TMJRb37Qv0mC6cfh+17YuNqG4yba7cfqMRS1buOiWDLaCvAAz4aqgtz2mUhUiVt23/dKmMpY9cn6OhBLe0QmK6sBfYmMxn4XXVeAteoOOnDT4y53wmZvxK+uKlPWB7FoWgyd1XonRZmGuMbekvD5XQeSaL70td7iO+MEFKTgZhLFDxhluZMImyzBPJmWAR7GSYmKYvzEPa5ftMfLbQDpyuc1mJnkKe+3H988QaPJqBaVEWcZXzB+KAxKkcVgHIe0kzbmLy8XhCxjqJOzP/Mpp5xylmwsO0WCQkX+QJN1a08lu9Qzzt14PLT2kZCOfy++RQPciQh2YzzN5Aj2PTs1Z5weRjSZzp61wNnmQ4PoiG/F9Jr3l/msCI1pBXu24GaziYjnDOg2XcwIyW3ZaJzJZPad1b7mUj7VBmcT+0Ajjn2KRUCIckO2Y7rqnkncHFsszPfwPcKKN+UamjUV2vCXEPmNikxe5cdmEamb5ap5rpRl3IxIcvTeFPjswAEPVc1eOyIQkexQj8k3a5IzOWjEbHvTD8Ip64s5dQ2PfsRQl8lss1flHP4Ms24KzoulcpWfWhsXA7IBPIQVyspG08WlPMRIPcsUVeMt9cnj4qf4ebsUNbi506Eddw6O1WO6tXih9GaVObrHDsNQVuWuF6nwZiVjmE3pawM5XBAKjQLrrUlaifJuKvbjWL7RILdMmRCN5GSxC9FtqKZCXZnFHqXvBA9jKcUayQMDvVN3uowvXn4C7d9ob5oH98k0EbQRjvk6IMbUBH3qXOIXmlATpG7QO4bEvp071VwOWBGoN+QV44JWx0mo1/HJLvYCV/p9Ob493cJGSdb6L2B9OMWXRMjce++T2ajQn3UKE3PdIsrEsFXZ8myZAz6qpBIBzoFtFjER/2P75ccF3yspm1YWUBrLX/YzuD9qPeXFfl9S2quNR+BwFqb+WelLMRq+tj8pYzlanLfHClQevraMr1o59jbwQ3APdJZBjlYPn4ToeCJffBPItFBLKRFrI6/kca0TOIzNESTh2H2EIDwmacI4RDUedRvTq1ytb8EUnezWNIgfjl+/rc2xdB+Ybz6FgmAv7SAqoF4e7khy4KsgyTSRh7uTOdOrnX7DgjTsSMqhXoF7du4yVs1XsrHnmVwrRGByxNtM6Z0c26uzYY/6WpKsouUydWzNGgF0bABn96YMtXuO+rcynX5vBUvQpnBti9oJv8w8KHmylMTobcsKmQB6Ts+73PP1ooCGXpFl1JTgQemtS+ObsYi2iBMYZzLe0n37Opl2+70JBZ0BhY9yGrw3RBF4iiZVRRvaQ5gEVOWHZDxBAk+zv6QuVrk0E7Z0u2zzvIG2Vl5JdRlzcvO3ZpRIjQ26whsl7ttAa9/bawaJ5silFiptYAHHThUNyJ7SIS+BjKmrMruemnBU5AfJUI= Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: netprisma.us X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV3PR22MB5104.namprd22.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68078606-ea65-4e97-812f-08dc852d4bbd X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2024 07:01:17.0233 (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: s+DvrxxN3/SXoSJU/v9XieufZcET8ayxutUWex4zMif15u55sNitIfQS6xEHKcWJujHfehCMcO7IkiX/6HyVSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR22MB4049 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 Reviewed-by: Manivannan Sadhasivam --- V1 -> V2: 1.Change 0x203E to 0x203e 2.Remove redundant code and use existing config:modem_quectel_em1xx_config Signed-off-by: Mank Wang --- drivers/bus/mhi/host/pci_generic.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index 08844ee79654..21c1d750274c 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 @@ -606,6 +607,28 @@ 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", + /* LCUR57 uses the same controller configuration as quectel_em1xx */ + .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", + /* FCUN69 uses the same controller configuration as quectel_em1xx */ + .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), @@ -695,6 +718,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_sdx55_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);