From patchwork Wed Jul 12 06:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= X-Patchwork-Id: 13309635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA641EB64D9 for ; Wed, 12 Jul 2023 06:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231975AbjGLGxN (ORCPT ); Wed, 12 Jul 2023 02:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231920AbjGLGxL (ORCPT ); Wed, 12 Jul 2023 02:53:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2042.outbound.protection.outlook.com [40.107.215.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEF351720 for ; Tue, 11 Jul 2023 23:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUu0fJ2d7EoDUxdbzAczG3BuVzS0onSswUpdkOStMyNv7BlKoRPyYwC5v+itXDAGZFldN6vEOpAVjhcZZuXeYEQN+g2nrWAjYb8Pboy4+4K9om0PGfOpd9aCWfmcmmT/cWUt2o80tQSSRdfk9G1MynOKBUvGifzarlJZzJ0OmFDPrIttqcGQ2TvFgqurGS0WsZ8pP5t3x00XvYbQ06u4P9mQuK7/TVxLSaiIaM5xc+3ZfslPG999xp+P38ejTISuVd6AV9MxuQiAtX87XhTMrrGhIuGBu5sc8LUFieNOoXle6Jwqd4paz/Wh4AtRMBaLdV1XBDnX0UVoviKlwOm/8w== 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=i+tFuG8shNGpB1H5qB1lUbhmJfIh206dUe7WdxkKslw=; b=KuRNz+STaRoHzzScC5nun295iBuBzyi3zXUuaPtA0y4B7dXq4BJR5EMOWkcgnHzOZn3r0573m38pPPFlOjNFDcXwkZsN9zO6Og0UTWWp869F/VjGIXwe5JCwOfjqxrZTSyG/MmVotFzq5Eh7PtgdOGx8qi2xd7g765BOdb0Y6PFYDrBuGppxQIFTFvoFzXuJAZIk2ICuk5cXYM7WHbRnMUGL1lsiE5DaLWAiWO60lQIQu5SClct7U4eczgdqwNiithWJjSSvuvkYqd3EV+UC9eDQx865Uki5GO5lOJF/GlkW8Vo6ItbFj/x/Vd2onjBoAUO4UmS+x1nQUpoabQQytg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quectel.com; dmarc=pass action=none header.from=quectel.com; dkim=pass header.d=quectel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quectel.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i+tFuG8shNGpB1H5qB1lUbhmJfIh206dUe7WdxkKslw=; b=AK/h4yVnAzgOpILICrpOeXwRQ921ZPhr1MHYwdk2TJXOag3eYQEK0gVWObhPpniKa/p7ceMGrVtfQv2gVR7NUK7JBskD4TvC/skJsgEI6vS3MdTxFfMLa3G6grtOCqNAJJ2LGtzD9dg+Y92/80vWE8wndbZWwCRxShZ3rppTu40= Received: from TY0PR06MB5053.apcprd06.prod.outlook.com (2603:1096:400:1be::13) by TYSPR06MB6411.apcprd06.prod.outlook.com (2603:1096:400:42a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 06:53:02 +0000 Received: from TY0PR06MB5053.apcprd06.prod.outlook.com ([fe80::7639:af3a:3aa1:bf5a]) by TY0PR06MB5053.apcprd06.prod.outlook.com ([fe80::7639:af3a:3aa1:bf5a%7]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 06:53:02 +0000 From: =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= To: "mani@kernel.org" , "loic.poulain@linaro.org" , "slark_xiao@163.com" CC: "fabio.porcedda@gmail.com" , "koen.vandeputte@citymesh.com" , "song.fc@gmail.com" , "bhelgaas@google.com" , "mhi@lists.linux.dev" , "linux-arm-msm@vger.kernel.org" , =?utf-8?b?SmVycnkgTWVuZyjokpnmnbAp?= , =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= Subject: =?utf-8?q?=E5=9B=9E=E5=A4=8D=3A_=5BPATCH_v6=5D_bus=3A_mhi=3A_host?= =?utf-8?q?=3A_pci=5Fgeneric=3A_Add_support_for_Quectel_RM520N-GL_modem?= Thread-Topic: [PATCH v6] bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL modem Thread-Index: AQHZqxt8uhgt6dFEvk6CWHgi/y4h56+1w3aA Date: Wed, 12 Jul 2023 06:53:01 +0000 Message-ID: References: <49141a5a22d12d7539ab567cd4e7629f30-6-23163.com@g.corp-email.com> <20230630062318.12114-1-duke_xinanwen@163.com> In-Reply-To: <20230630062318.12114-1-duke_xinanwen@163.com> 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=quectel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TY0PR06MB5053:EE_|TYSPR06MB6411:EE_ x-ms-office365-filtering-correlation-id: cb964902-365e-41e2-14e3-08db82a4a2cf x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9M80hfM2B5rD4/Gvc0kJs1poVR+44/3V/XRieeoy/+ptp6L8Qly6Le4soK6+VN5ViMFzuGoc1ZyqGiT6wHscaGXlBlIkLAx5BrNFPP5ejosRJbRtyCfV9I+GVH+HdYQgdTAp2Pc68xuLho8eaWLeIdC0Z+PSkff7fATrZQ5/6A3cBF3tWUFqXuqResGKMFb4BiqXANPgtvswNA+MfUqdbvQVR7QWgr1ZkA1byIj6ICEl61ioQVmFfGmkof6GZiN5DLU/LjyA/78ck8OPyWNjT7nSaTl6Gmxdw4Hkafdh7Hg6k8b0JPf6f3EHEylmnY+GTie3qlYo0IeXDQyxYy9kIDqRI0gzQsxWfwz+mHWXGIzTU4ETDfFRYuRXakZj0NkeIVTfb+RN1jLCo5MpHgyTJU/WvBhSt+bg6MLKM+b2E6IZ+FW+eIKIxCeMN/l7QswVKXrIuOl3JsJu4x57VIi/HpAyufeuXe6rMggpJdUV+2UxAGpt1aSBw8mxHfPpyZ8FDBVYrTBk2c5xHtGw1nRpv2ip2m2sJ/AC2Wm8G269wowQilg6HhNr+yHD3hES4vdEH60T3hfzAtnJPPmeuUCTr2ATyND65fOqQ8ig+A6Fg1cXPlBPA+IKbTqXLuRgViE7 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY0PR06MB5053.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(366004)(396003)(451199021)(76116006)(66946007)(66556008)(66446008)(66476007)(64756008)(33656002)(224303003)(2906002)(55016003)(316002)(4326008)(83380400001)(9686003)(41300700001)(85182001)(7416002)(5660300002)(110136005)(26005)(54906003)(52536014)(38100700002)(6506007)(71200400001)(8936002)(86362001)(122000001)(478600001)(38070700005)(186003)(7696005)(15974865002)(41533002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunk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IQv/iWdvdl/AcflcBCwaweebdBQ4R5E+uRCUQMhM1JDaMopEtpekVabsJH9L15OV?= =?utf-8?q?pPj/Nke3bYbvwr2B3NZh74sY3ayf+rlwydQ4EzY8nF3nyy9+VkL+xZdmpFg6wmWUJ?= =?utf-8?q?jB3ldUf3fEYKOdCWS/Mz3gQwN0IcIxGOnM1n7URvz0NVMJ9fHzlUl+JCdKnVSxgQO?= =?utf-8?q?f5MCC7AcluqvmibyzOGt+zebK+7vJEY5O435/X95vQuWigZ2ml8VU3qOitmrk8wGO?= =?utf-8?q?4JVhZBMWA2H8NWkDVEDxMTh6IGrAHtxmsdZX9m/Eyau04zqafx7su6ugIlaQfgCUe?= =?utf-8?q?5UbWnoGnU5qQhSP6/nA03OIQ6M64l06peQ0eCTLf7ZERs2xQuxTTXQMVxQppT0q9X?= =?utf-8?q?TwUs2AIhkvPyh1Vgc/TXw70xOeNpqelDtMV5b86qI8idi7Wf3abufiWw/s058kudj?= =?utf-8?q?BGn0oL/2LmpL3wfDVbOv/Gx/xIu1QiUcqP9L+wu2PbwbpbuKY17aLa243/ezQk6A7?= =?utf-8?q?5MeBDpQTwKcraNYf9YGXZYS0ZmCZU7xIH1UffQLHOGh9QkxU8G5wkq5FxjwQ/YfxR?= =?utf-8?q?IBEaLkpZRpnw5GaX3erFoH5R1Jk1vK+ArDrPX4Og87CtXC+jlCWqgBKlZkkjjOvXy?= =?utf-8?q?aQXlaQwhKH8vfTLrOl3BybAELxjQOmU+yDRuyJdXAKKF9NWQb7go2hfUV2Osblf+T?= =?utf-8?q?t8g4XDjGL3yR?= MIME-Version: 1.0 X-OriginatorOrg: quectel.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TY0PR06MB5053.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb964902-365e-41e2-14e3-08db82a4a2cf X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2023 06:53:02.0378 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7730d043-e129-480c-b1ba-e5b6a9f476aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Y23uYVvihhBkbQsNIEmWyDl/E6klSZomLDRUhMXG5BpkipaqMXKCsj6g+Q3hOG2UihlqrxZ2FpQNCgdbrrcI+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR06MB6411 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi Mani Excuse me, you may have forgotten to review my [PATCH v6] , please help to check it. 辛安文 Duke Xin | Software Department IX Engineer | Quectel Wireless Solutions Co., Ltd. Mobile: +86-15375456183 | Email : Duke.xin@quectel.com | Tel: +86-0551-65869386-8632 Website: www.quectel.com | QQ: 602659072 | Wechat: 15375456183 Building 1-C, China Speech Valley Area A, 3335 Xiyou Road, High-tech Zone, Hefei, Anhui 230088, China 安徽省合肥市高新区习友路3335号中国(合肥)国际智能语音产业园A区1号中试楼 230088 HQ: Building 5, Shanghai Business Park Phase III (Area B), No.1016 Tianlin Road, Minhang District, Shanghai 200233, China 总部:上海市闵行区田林路1016号科技绿洲3期(B区)5号楼 200233 -----邮件原件----- 发件人: Duke Xin(辛安文) 发送时间: 2023年6月30日 14:23 收件人: mani@kernel.org; loic.poulain@linaro.org; slark_xiao@163.com 抄送: fabio.porcedda@gmail.com; koen.vandeputte@citymesh.com; song.fc@gmail.com; bhelgaas@google.com; mhi@lists.linux.dev; linux-arm-msm@vger.kernel.org; Jerry Meng(蒙杰) ; Duke Xin(辛安文) ; Duke Xin(辛安文) 主题: [PATCH v6] bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL modem Add MHI interface definition for RM520 product based on Qualcomm SDX6X chip Signed-off-by: Duke Xin(辛安文) Reviewed-by: Manivannan Sadhasivam --- Changelog v5 -> v6 * Update commit message to include the changelog and reviewd tag. v4 -> v5 * Add patch CC to mhi@lists.linux.dev. v3 -> v4 * Limit character length to 75 characters and adjusted "project" description to "product". v2 -> v3 * Sorted add rm520 id in mhi_pci_id_table and modify commit message. v1 -> v2 * Use [modem_quectel_em1xx_config] compatible instead of duplicating the configuration. --- drivers/bus/mhi/host/pci_generic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1002), /* EM160R-GL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, + /* RM520N-GL (sdx6x), eSIM */ + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1004), + .driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info }, { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ -- 2.25.1 diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index 70e37c490150..1e7caa62f114 100644 --- a/drivers/bus/mhi/host/pci_generic.c +++ b/drivers/bus/mhi/host/pci_generic.c @@ -352,6 +352,16 @@ static const struct mhi_pci_dev_info mhi_quectel_em1xx_info = { .sideband_wake = true, }; +static const struct mhi_pci_dev_info mhi_quectel_rm5xx_info = { + .name = "quectel-rm5xx", + .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, +}; + static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = { MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 32, 0), MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 32, 0), @@ -591,6 +601,9 @@ static const struct pci_device_id mhi_pci_id_table[] = {