From patchwork Tue Jul 9 04:23:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjian Song X-Patchwork-Id: 13727244 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2481BC2BD09 for ; Tue, 9 Jul 2024 04:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IjfStAl4X5APuJGdHfqLtnXkKQl7kdSwd8Ar5E4YipQ=; b=x8lKaDN7Z6W43VVB8BT/tsjyCM eWKFo1kBxgtNEbS8hf8mgnMpu84DFr79DNyeQKOxON7OXKQUbspNng8se6Q+9NYQe8yPMZtJYLz2P xndLSDqPZe2SzMedBfjlbhfkcGZahX4quZ7VUnLmY6qXji0CZ5p7d8mlXKM77C2HG13TD6AR4/iJq IFbhc9Cz5LKLJeujXuCFywWWlhmDSc6ZLFdX5xSZw4Gjz3gOqtiGQMb3VTfeEWcb3J6z9n4GLW8s8 6z1B+j/BG5GmbgCKJ88xlSsQ72ffiEmZ/u5zyZgthrOq+jKKvBW/LI4p3BZPlddUNDnf3BKf1v8wX 7TpERKRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR2P4-00000005qT3-3wyH; Tue, 09 Jul 2024 04:24:34 +0000 Received: from mail-sgaapc01on20701.outbound.protection.outlook.com ([2a01:111:f400:feab::701] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR2On-00000005qMm-2q8a; Tue, 09 Jul 2024 04:24:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G7qizMkdPpv799yRm7W+mFS7evQSE/8ZiP6d5Dk7jLXkVmTs15gySOnJHV68M+jROKEazYHOJ06I64IPJ94Xh3scUb2g4SaxeHPWPqU3ivpW/LEEKBpPWKiz8LXICM0xEdCvwG84aFjoDhbch59HhWEFva2HyHthBc++F5x1Cg11Ye0sHlppyYQKMc/SxK8pyNVPhWV/NVRaEWyQ/SjwtZRbVVwfhIsqv7O3cx4bU4LSHNMq/fQG/P2YQ1mUf+E27PK015CbFBvCTaD82Sh32U+MR6DYMfeFvuMLgmBRVpd7L1uxKxVrOCerGu7m0MwrfbZGIFy4wxBK1hzcm3YRhA== 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=IjfStAl4X5APuJGdHfqLtnXkKQl7kdSwd8Ar5E4YipQ=; b=EwiTKGW5g3W6fgP86XDyWlU1Nhb21IHzqm5DHdeFewnDSxc9HYeZJPTTgg3oMQnLsxKdtrEJDx4kCA8WUp//eBLygW7SAdBUe45JTH4w/kBZ/3cO6dIlxWYQHDuLS3fu4gBbbhveCXjzUcFXtsF/2trm5c9NL9tZi7hMgjgyMYxOVoE4T3T/QAB4LubQGg2HOUbgf87eIGGbaxa5KMiU4VeYE6hxe2uAlOyLsUxb7P+ZxaeGQSo9gx3v7MsnS7Q5HouL903NhqgCzjGlwKhYsHb0+c501GZxnARLx3Y2Wf56r0cl57twZHd1ChreVS/VnxOjdPQzQ3rg5C7DyIyYFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fibocom.com; dmarc=pass action=none header.from=fibocom.com; dkim=pass header.d=fibocom.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fibocomcorp.onmicrosoft.com; s=selector1-fibocomcorp-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IjfStAl4X5APuJGdHfqLtnXkKQl7kdSwd8Ar5E4YipQ=; b=dVpPKi3oiybIbVPOw76WY3J0QjZUttLBtiEDvIHM/g3VA6Kex52aUMpzMWDpifL2B6xQnCN6AbzheztAIQCZJrLB7YO4Rq0+Ir17bCRWbrFwo8VXLcAEhbLZuulDq0qPRJFPcE4kGxTqnbbu3aGEUBDDDU6nuR940+W+mmX5COw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fibocom.com; Received: from TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6) by SEZPR02MB7365.apcprd02.prod.outlook.com (2603:1096:101:1f6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.34; Tue, 9 Jul 2024 04:24:03 +0000 Received: from TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b]) by TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b%7]) with mapi id 15.20.7741.033; Tue, 9 Jul 2024 04:24:01 +0000 From: Jinjian Song To: chandrashekar.devegowda@intel.com, chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com, m.chetan.kumar@linux.intel.com, ricardo.martinez@linux.intel.com, loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, inux-doc@vger.kernel.org, angelogioacchino.delregno@collabora.com, linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com, corbet@lwn.net, linux-mediatek@lists.infradead.org, Jinjian Song Subject: [net-next v4 RESEND 0/2] net: wwan: t7xx: Add t7xx debug port Date: Tue, 9 Jul 2024 12:23:39 +0800 Message-Id: <20240709042341.23180-1-jinjian.song@fibocom.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SGBP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::32) To TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR02MB5766:EE_|SEZPR02MB7365:EE_ X-MS-Office365-Filtering-Correlation-Id: 00e5575e-37de-4b86-d005-08dc9fcef52c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|7416014|52116014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: le9fhGFcZfRZnr+xEf0lN9QUmg6VBH4dI56gff96CZsnMXYY5CF4wQqz/dGt7ZcYdrOQBr2VD8mtZpxlxUZHBMWyHYEFDAumEwWPsRhGQVC78D/r9Kfs4qA2YIWtmqABvf1Yjj/OXQcBZt08zYWA6vvl8Lj8cCZHNHiOw41wSjS+5Sg6HIzbjN5iIQ+YlMswQRj2n7HeFc7npA0/+ZuAL5MmxIbx7oVsTcwsFtDsqdEdDBPxern37dz5dF+yuhpCxFnq5NNAgZFrn96rVppe420ssgX3Qg5f7o4Uobwc6h3+m42BliiHZ1oKduh330qVrGG+SBLZwev9R72f2vmX3MtEkBCEX02xjn1/9cOqVzuymmujObytDWD42V8l62sOYkjaTGsWcdw9/7Gpp6GhCDQEPmUVsbr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G:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY0PR02MB5766.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(7416014)(52116014)(366016)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0t0H79WRg5sJqht/6VQUyEASZtYlTYpGqoHFMET1gapvKGMjDbYoKOcNhe5jIeyp6L6O3fs/QSlCFGGXNob3q2p1ePiWIoGPiMYpxvKHlJsTBnbQKBM3W6xsJrSSTkL+x1JgWb1BkVF2Y9exUVf853frZtfaTliIH5WIW40lAJGMpFqrm5pQweUJgP6hIIMduL761i97Ui73LZ6d6tGxrdSS2yZc8ZvY+/RNr70piYB5eyK3OAK/ktT/hXPQcIIQguAWxU9cIQXrqcLDv5U6qnffIN0sRdVY2Wa8wmwjR8d8tRrE8ObnM8RdtvwHZYClwhc7gp0QRWl/37yQpgMCjS7AbgUtXJ/vJe42wFqC3wVTxBeI0k15zUKJwv8GqHzGYpeLzZfozxu2Xzc5QwfYGwPc/i/WQURtfeoG5pQoKSpz+am2OD5A6loPXS8OyrL8S5+D32iiR2RRv7BbFmEBNfwrwNgkaW8JvtIrnrGiENiWa0ucNkDW68/bt7DMv/5Cps7tDDnttSe2bjl9igBYJLyCBe+sVBnqLo79o9zFS05F/r5IUWA36is1g0oXi6FbcJlAHWWl9H/axywby4rXixTY0RjCm8r4NgCyglsMVleG/8PeH3j4CbKGttHuV1/s0CcZiEye6wUz1IJs1vDlTEvIWPZPjGWINnCCJEK0aQork8rMCMxzeiFnZdhppDUOyxBsMYQlrCMZtdsNS2r71eaY87tztnnttzotaVqLZl24mckmXtSSxn7e7ha5Vpl1wdXuaqulkcCoNZkfselc6d9V0msBB2h9uSE8fiZXK9IKOOhPWKVxfwWLkO+2yfbnqR5f2QW7yMkuXwER9ruExiE+CenUxQjDcTbXaOEa/XHMnCHF8CfbqEmRQ8w+DrwxKbVl7PINkHAUHv2z+u0I7/AJcttPhE06NGd73bE4WQbF9F/FE2BQbrz66rCDoR0c2R0obAoij+9cvL24k500TP1lB9HhDEaNlAYXWQ9SMChQP0gCBoiVAxcj17FWdfRQ9fsGzdpvaF0cCxz7NeAbpd9xdLz2YlwRG3gS+YP1B93lcHZ20xtwSvfLLQCofJdXqfCvzCfSsq1IebzXhHto1m6PfPOeXdCbX8L1aQbr/5ylak6cn2NjTtBN/NwgpOAGA2nGBIh7HK3BMRhOxrWcb8beE1sqGWGOFgLMtSlGHPGUeXt4lwtoQjLlLuQtw3PpktECZcA5fQobrqQpeOIGWJTGuFTD16Ot7Ygk9v2SGQ8tAOZWNeoiuHnEwRpYvy9v+YwTrquqir+tIOpRNPMhbqlQtFXcm3AMFjUXtisbkmtgTkci8dboUUJfLmiZBEHRV9JfKYwFxlTDxkO/W7qO1bCUBhTAD9UO+KCGMjTGMtSDl9vNObGOMFIMyIsUHKObht9OuLV+1SnCdopVxGd2x7fJLV/W1sat3DttJsQHZBkVS844IMQLOCRHsuH7GMsm5/EddCKqMMAcKaU/7qfK/Nqw4FtA/Lb25PGB3pJpiRW/nxpZgNBssb3iKJILO2iAp/yu16CkN+j3hbWF6PH2AHOImuhPE2MQT37XC1IqQl0u4DKfTMr2ybGQCybGxpoDI9RgEBrCyZtBEJcBraY4ZQ== X-OriginatorOrg: fibocom.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00e5575e-37de-4b86-d005-08dc9fcef52c X-MS-Exchange-CrossTenant-AuthSource: TY0PR02MB5766.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2024 04:24:00.9459 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 889bfe61-8c21-436b-bc07-3908050c8236 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j3n05Dmj7KJ04K7grNXzcjGgJ7XGYCLGNaXyWhiyRkOICy6dZXwTigM1Ibzwbi/qSJjTTZb8h/HheT5dF/ECLgolhVQHirWZPFTuKX97o5Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR02MB7365 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240708_212417_751052_8B3E40D5 X-CRM114-Status: UNSURE ( 6.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add support for t7xx WWAN device to debug by ADB (Android Debug Bridge) port and MTK MIPCi (Modem Information Process Center) port. Application can use ADB (Android Debg Bridge) port to implement functions (shell, pull, push ...) by ADB protocol commands. Application can use MIPC (Modem Information Process Center) port to debug antenna tunner or noise profiling through this MTK modem diagnostic interface. Jinjian Song (2): wwan: core: Add WWAN ADB and MIPC port type net: wwan: t7xx: Add debug port .../networking/device_drivers/wwan/t7xx.rst | 47 +++++++++++++ drivers/net/wwan/t7xx/t7xx_pci.c | 67 +++++++++++++++++-- drivers/net/wwan/t7xx/t7xx_pci.h | 7 ++ drivers/net/wwan/t7xx/t7xx_port.h | 3 + drivers/net/wwan/t7xx/t7xx_port_proxy.c | 44 +++++++++++- drivers/net/wwan/t7xx/t7xx_port_proxy.h | 1 + drivers/net/wwan/t7xx/t7xx_port_wwan.c | 8 ++- drivers/net/wwan/wwan_core.c | 8 +++ include/linux/wwan.h | 4 ++ 9 files changed, 179 insertions(+), 10 deletions(-)