From patchwork Fri May 10 03:19:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13660851 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 8DA5CC25B74 for ; Fri, 10 May 2024 03:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=uxr552FSNzEZdrtMMlpuH3w9Yh4rE8slXfOHBHalw54=; b=A2slEQ8raF1GmwlSmyeSh5q1s0 kNcZMQ2xd/p7Lga7qlNOZoR9woMrQUltbXRkWJ+/y/AJRbDu+NFEULo6g6h+tBQh4uDE5fVG8DX57 KrZuwq9t2LrFVwMnGotT2zDnZ09prLnJZRsHmmtEsXfjwr+uXMO8YInlVJgne2o6r0ixhV9gFs8gB mKyOSOvBxjAq2iKk58KzsXxso34Qt+dKch5u1xzWluGHGJ6E8qGxQADbesgGwtMdeEBGU1IMejSxa SkevvlhHWVr+S2i8RQhmpMnfQKVnYHaCUbJ+fii5F9R9zxdVPWBNV6pOcJ60dVKz8nHHZY91VBuJI UKSJ9DOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5Gg7-00000003qKZ-0P0t; Fri, 10 May 2024 03:12:11 +0000 Received: from mail-he1eur01on0629.outbound.protection.outlook.com ([2a01:111:f400:fe1e::629] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5Gg2-00000003qI7-1kii for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2024 03:12:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZAsE5x3Q/tr3B7Vhzhqof12kVTt6hPlyiBpslZ5nh/rlqNgagLrkrc6/bc/hqdun2fbtwW5+Ty6dhwbiiiFiRLNXuNKW2afKjhNCAo+3Taeguy1QdU2TU0aE46VafNANtM3HmaaH5Hb0dIBY8fOtGAE17Z42gdajnHmk1kabNr9xx0d12l0EyXgOTTKCaVz506ejqZ137PXoJI2yJNCQtFExlIiC+HO8GBn4OtNsOznHg7xb5jBzGgWtDOHhKWPg72JK9hlUt5Go0tW+S8KS3TWHqmaKiBAFacYfeni1Ijg+iaWBMgRPh+1lx471GtY3K+saWvDLPA/m3uH3BzYuQ== 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=WAp3vkdMcBldGCIqTt43Rw1xzhFks1J3RCl94yeS5MQ=; b=Itx4tePgiu3y7xFOdkwrkFQTLQiDJz5of8m+G+ai8VNo3t3TpvGJwXU53eUuUmIUs0w7xgeBkvGD0mZlcAjTm7/gsbJ+YUIeGa3WYtez0E8hH8Rpo0Q2+/m9LIelNLXGqDmoO2pFjd7jW+dgVFa2/CzHgQpos5Dn5LhiLMxwHYKt5fkHC7/ZRZvvUc7X5mTH8impqvPOCluw+hxZcdnNKdernpcJA9XPTXf+dI1VOs5/IkPLh3ZGJfePbuXpG7G3xrD3buC4kUbMi4aHJ8mk0R2bkXbbv2cg54WOrOlMLQD6LcLcd5SwKmIsqa7QXBEfQwsEt9B3/9b4QwTm5He96A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WAp3vkdMcBldGCIqTt43Rw1xzhFks1J3RCl94yeS5MQ=; b=Wg4QeQMS3lq4Q4r1PVrl+m/jY+ljED361ROnPbZZecY1V++z2Q1PyBuQW+fILuIXkXaB2jKq/k5Qso9KX98JdhFdSWRreWGuN1lEehua73uH4sYaypsAn7e8L0Y3MGngRwatDmmreRVQz+KzYQbc5ruUbyvR3vGZ/jwAlIJH9xI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by GVXPR04MB10135.eurprd04.prod.outlook.com (2603:10a6:150:1c0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.47; Fri, 10 May 2024 03:11:54 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.046; Fri, 10 May 2024 03:11:54 +0000 From: "Peng Fan (OSS)" Date: Fri, 10 May 2024 11:19:47 +0800 Subject: [PATCH v2 1/2] dt-bindings: firmware: arm,scmi: Support notification completion channel Message-Id: <20240510-scmi-notify-v2-1-e994cf14ef86@nxp.com> References: <20240510-scmi-notify-v2-0-e994cf14ef86@nxp.com> In-Reply-To: <20240510-scmi-notify-v2-0-e994cf14ef86@nxp.com> To: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715311198; l=2485; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ZD6kTC1LKyAdyC7MdJ92p2toAQCDTFJKKmtOf1wMmI8=; b=8GlueLXWPwj9jQMFQS3L8HVkUhhTKAqLLvUUCDkabWiZxBnDxGmZxMdgtIWUDBEA54+C4CQ/d 44gA86Vn2kACCzfeYu0AMEhz6QUC+AuRbJL0BAe6CfRWt2ik8ujilMN X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0148.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::28) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|GVXPR04MB10135:EE_ X-MS-Office365-Filtering-Correlation-Id: 165504b8-2c7d-44f0-1fb0-08dc709ef185 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007|52116005|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?9UrVOfDqqd3Ae9sOBMJ+8NWxx7NBbxv?= =?utf-8?q?a4r44zMLunFSnuNnkYalrhr4zmeSnwPcGVep6ray4GZok7BB+btjYLKM0CFUNbjqe?= =?utf-8?q?wY0jTA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Auj+1GYzfdD82o4BuKWnRFO9ypMKqBllsGBcDazb2OcqgXZddx6?= =?utf-8?q?9uA1N2D7F6aThEIvQMlT2ZUjloY0nzc2IRwNizgvHElWB1lNeDWi5hlT/RFBx+cWp?= =?utf-8?q?BLeLGjfUpDrLpq867EgqULSyh9U5m1aAiunfKQxm7yMII4Rwb22WkK9/fVgnwfc4e?= =?utf-8?q?HjOHXdGVNFlfLJtY7K5juSv4LGpkrf4hF47dkYBa9b1hQ83em8jFh3UchlrPNnn1t?= =?utf-8?q?LCUy1ASOaZn8RYQpHUyXTU7TjrvsJHufY6T2k+xrVQaxWnav6z0akXt1hrv9VcdfF?= =?utf-8?q?8b+Ms51qZgaiALeQ55t7L10PIc6s+ZoVv5A=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(52116005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gn2jPoMPoj9+5HVsoSPa31mgI6FX?= =?utf-8?q?opcQsZ7GhoOFOAX4t2IiAPshnd/jT2apU1nllEY/fEt0Ld7+0y+3h1wiRfRiD01cC?= =?utf-8?q?udg60SoXEfgfhEQgifmhC9IwVK3Xi5d/RbOY32A6dnwU5G5w5emWa8Sy8Hcgm3rHf?= =?utf-8?q?+gyLbseVsWh2Zw6IvdhwzOy+hfwBe+s7Tt0/8V5hu1CEOyVNsQijqYAPoSYUE8o0X?= =?utf-8?q?0gbK5ujqwKiJGAF9UbnNUttiF+DVu9GL53AJXf5bMoiPTpHj+8cFBA9zlU7P6uDJR?= =?utf-8?q?v6+GNmE56I9b20C+7rtv/PXb+YMvQPLpHfa00ZVjFdwNHARjYe5qcpU6rLVPQ4yVE?= =?utf-8?q?Z+0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7i7BJwJ7Hh2YpXatNfI7ldJ0e8DpWVLQuC0rrfYSAOoUR5DP/HhdAF?= =?utf-8?q?Y9HKcuyvPsK8O1uXPdSePYwf8cZUZrgoClLWBJAARqestyieaMXKi7Qnwiq36qb6w?= =?utf-8?q?a4r7SNVmlCaNyG9FPlVkX/Z1d8E/JBNbrUp2JPLxiSvPstPhG21xBfoAP+JmcDa/8?= =?utf-8?q?QA2wV07ENP3AUuItoANoV1J2W4Bje++Agivr2bik3r02OgLEYeTFrGFuxW5PTRGj3?= =?utf-8?q?WONTQ/By7jtmopJoxg4/qkrX+74ZRm99Hpga0EYqGzyVYLBDew/UptaKv0KVM7BUi?= =?utf-8?q?BvEvYtME+7SV?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 165504b8-2c7d-44f0-1fb0-08dc709ef185 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2024 03:11:53.9950 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VDnkxUCdEPfX3l7rc6viCGdC28DrLzIpOAF3B4+oGyqrTy2Kf333vMlACIYbPL+QhplVgVxK7zQEVu4RV8c9fQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10135 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240509_201206_533086_A528E9B8 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Per System Control Management Interface specification: " Completion interrupts:This transport supports polling or interrupt driven modes of communication. In interrupt mode, when the callee completes processing a message, it raises an interrupt to the caller. Hardware support for completion interrupts is optional." So add an optional mailbox channel for notification completion interrupts. Signed-off-by: Peng Fan Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/firmware/arm,scmi.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml index 7de2c29606e5..308af58180d1 100644 --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml @@ -72,14 +72,17 @@ properties: - const: tx - const: tx_reply - const: rx + - const: rx_reply minItems: 2 mboxes: description: List of phandle and mailbox channel specifiers. It should contain - exactly one, two or three mailboxes; the first one or two for transmitting - messages ("tx") and another optional ("rx") for receiving notifications - and delayed responses, if supported by the platform. + exactly one, two, three or four mailboxes; the first one or two for + transmitting messages ("tx") and another optional ("rx") for receiving + notifications and delayed responses, if supported by the platform. + The optional ("rx_reply") is for notifications completion interrupt, + if supported by the platform. The number of mailboxes needed for transmitting messages depends on the type of channels exposed by the specific underlying mailbox controller; one single channel descriptor is enough if such channel is bidirectional, @@ -92,9 +95,10 @@ properties: 2 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels 2 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels 3 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels + 4 mbox / 2 shmem => SCMI TX and RX over 4 mailbox unidirectional channels Any other combination of mboxes and shmem is invalid. minItems: 1 - maxItems: 3 + maxItems: 4 shmem: description: From patchwork Fri May 10 03:19:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13660850 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 D798CC25B5F for ; Fri, 10 May 2024 03:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Wv33MBanHDihdVvgpRlVoNge0Lmw2NUhs1I8xgA48mw=; b=o75lSs7rpyy1Tyk9xhIZM3HJni GfTMj0lZMFR+WKeFo74Iq4aArF3ocGh8s3RrCc0dVhNzg6cMTf2pkpmtLRClfVLXw/o3fYMeEzhZT 12UsUdIsQPpS3RWTCxED7CB4XM6dmugXrNGkxbwe340riL7aIDvrPUtl6e4FJ+u3OT+czxi/gHGqU eW/u/ZpI39Ojr3xogVh2uOwn52G5G52pQhk1JDlZ2lOi30R4aCMopHCPvvDI2tEAGJ+ahqDFX0IYD CL0TP1uWPNvNZBpbp8wsLcDGS89AY6gphVqdUEYskAflsRqwfPDjQ29QcSyMWpBqEbirgnp7KmEPt a71x28KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5GgB-00000003qMc-2vwE; Fri, 10 May 2024 03:12:16 +0000 Received: from mail-he1eur01on0629.outbound.protection.outlook.com ([2a01:111:f400:fe1e::629] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5Gg5-00000003qI7-0mxb for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2024 03:12:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYIVEk2vkBPzWVMMe1lLqNbyG7P9aF2+f3fp2Lf6hXJANKxVWPecHmN0j6lkRIPSk01xquhQYxVPzXmDp1luWRNXGXXPtxMtjXGDtSxmz8uiIkcXtSdV+dOcEdS0Jg+caWlmiWeUCoRjChj8XsV+AKFOS7fRtHSC3htFINP2UvpegfJ1L32oMhl/eKTRHvCMss22aLQHnS3N7By7M7EEabZKjXr+QtisZTZYdnknlRDyHhL/VFBD4bvnu1v6QdzebYlcATGMkI0cSHreb+nkKjBkicD9H5tcNnh7QpWIe+KkMfQFBRb1gEWQzaFExZ8bCfvCBsfACbeuzK1ZZnfavw== 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=QpmF1IFBgbpxyeYXhFcOjI3S70BfzuDDwMISjtcPQmY=; b=Avs6jdqimi8k9LkipyBc690JkG/63VXKDgqUIYQ1oVQgCvK/zi+aJ0zWM7GhBKPrLasVw7Q6DGDoSE6Wyi+AGNl5pA0rjnq/8mkkPX9Ylzi0BJpG4cDgIGyFtLUAyYd1dBZhkaBo9bxVwcfbNddkJ9Mzl4V+FGVUgJIxzT9bHYSNIZDwrRAvOIceqzXJjOgwtIv3OhpOuVGrJkhbzc76ERc/fIjv7WkWe2eZTD/Gq0YjixJXv54LQY/2K3nq6Rz4RArV8p0JXRT8G8iwmXPkF8yV6DhjP+NnVqEqhtUJ++O7Os6/rJNks1gfzO3ycqILyCD/oTTIVKEvKnfHpkSJHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QpmF1IFBgbpxyeYXhFcOjI3S70BfzuDDwMISjtcPQmY=; b=ed5J3EFN7uGhee30vU++zbOJ4/gL8Nj430ftIeUMR4nwuxcWdgG8ukdzj7oIouUdIqBu/K4orxUoS0Idzr3n6rnMKgUL9X42m46W+rcu9wRD9N//ddzl7SjTeRBjidJ1/zMbebGvwl/Nsguwh4JXLGANVIHOvM/237R2IvDz7EU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by GVXPR04MB10135.eurprd04.prod.outlook.com (2603:10a6:150:1c0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.47; Fri, 10 May 2024 03:11:57 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.046; Fri, 10 May 2024 03:11:57 +0000 From: "Peng Fan (OSS)" Date: Fri, 10 May 2024 11:19:48 +0800 Subject: [PATCH v2 2/2] firmware: arm_scmi: mailbox: support P2A channel completion Message-Id: <20240510-scmi-notify-v2-2-e994cf14ef86@nxp.com> References: <20240510-scmi-notify-v2-0-e994cf14ef86@nxp.com> In-Reply-To: <20240510-scmi-notify-v2-0-e994cf14ef86@nxp.com> To: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715311198; l=7217; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=t2BrE0VMd+eaNJXrBR3kIz/FCOpC1Fqa3t0eTfMaVPo=; b=8yirybGc7pZUIqZaPnpQNc/H3/40ApGm7JIfkg7WnlONJsc2dtlS6Qr6UpVjOWlwmvZeVNieF w4NfmGBVjTBDlS9dSwJmIwWJtU8dXzI7MyrDU0hVpv+CvEUU3qsPCG/ X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0148.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::28) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|GVXPR04MB10135:EE_ X-MS-Office365-Filtering-Correlation-Id: 696fad76-4236-4bf8-1066-08dc709ef38b X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007|52116005|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?pcVltxfAh16xcOg064f8Y1XaBPCkPYi?= =?utf-8?q?QDyqgWvfICZKAB3rWw4i2G0yPzRv4gTd6pJRHKRpejVjg76cyjsj5yFSL4TtkaNIx?= =?utf-8?q?r4BjtKI4HXDcgLJ6nGGBSTSPZ66aklZfUyGBxWuSy1Tj/sNrenaefqEZs2EvbXNEE?= =?utf-8?q?oBrap3CLJdvfZcL+IBC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x5jnPOdB46GrtsAKTnCg0AptzDKOfLGezj?= =?utf-8?q?lE2I2TUHNmXS/BC3xyAByHv5ERhRSns7hvYy6XBpiEAZgXdIbIalwKP3MOHE3+vUy?= =?utf-8?q?2kDp3QBsFwXk//mt5KL0/XggEAS/ziLfMTrNjb4eeTlSgDRyA4w0nHClsD9swbAFZ?= =?utf-8?q?Ijoi8mflO5FemSd1ZvVeM0cGh7g9ghmfSMnX3a22ZKYW/AGiz4IQHQRiaj1FVu0BE?= =?utf-8?q?AGVToaXM90Lz0eReicTHeqshEkoKuFwBitw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(52116005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iyib69mT1sRSzWmORr3MN64lnO8m?= =?utf-8?q?88QUbVB6FUbirwiiujglAfDjC8XpgyQkbNLwza77Zrd20399W02z4763+3TWMx7zM?= =?utf-8?q?tc6D72gDItvnkNep/vwai4wc7L23pca5bLT0bL8S2P2QXzwxtmZpbQl9fR/Qfuo0t?= =?utf-8?q?Fnaqs/c8aqim3ciAqp3V9dafo6NQ7El6kGVvE3oJwIr5tE5g+4dy1mkUtKokRoylm?= =?utf-8?q?26HuJ9UoW6sN9BCC65Uw6SEvrAj4B5OKY4F0w01OjE6cnZlIjgZBScfuHugl5GFrC?= =?utf-8?q?Ql2cU7hEPls4hXyJJJC0up9AOyqCi6YND9zcQVTvNWkvTGEmncsnoTK0f9AJdZ9wK?= =?utf-8?q?6o4KN+giFQBPyxOCuvsP3ktBunxI3P5Bu7QuC/xVyBvNyD5qo2etubjRj+zZC9WpK?= =?utf-8?q?ITEGX8qMa7n58sB5hc15vQH1+zmIRUOZk7C/M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oMs7jpgxdo1P+nlHB07JZp1h?= =?utf-8?q?SVvLOnRzG2U8fTDdaP+0s3e1vw1ufEoqRP+NOR4rlEy/IZIt1NnkMtcEIm1NlY7+m?= =?utf-8?q?gYcrUkTGKKlNvIWBbd6Nwtxh3V0aqfChdC8cPYp+Y+Tkmgcd/VJLW2I9r2sQ+euMI?= =?utf-8?q?CTDvsjjWseISBzjRCUhYfbfSGsBhBDtDuSGVjfaP7QlZYd+yp1a8rRhRw/HrCH4Hm?= =?utf-8?q?WcDtuBBAZd5V?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 696fad76-4236-4bf8-1066-08dc709ef38b X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2024 03:11:57.4066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oCS11YWf8OxBr59cTOz9d54mdtA2ukIB0q5wlPy/VU5M45MdFwVBZiW1aX3R9Ui0AQ8QAwOvP83/51Q3YY4F6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10135 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240509_201209_447484_E482B151 X-CRM114-Status: GOOD ( 19.45 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan i.MX95 System Manager firmware is fully interrupt driven. The notification channel needs completion interrupt to drive its notification queue. Without completion interrupt, the notification will work abnormal. - Add an optional unidirectional mailbox channel. If the channel flag has INTR set, and the completion interrupt channel is provided, issue the mbox message to Platform after the channel is freed. - Support bidirectional channel completion interrupt. Signed-off-by: Peng Fan Reviewed-by: Cristian Marussi --- drivers/firmware/arm_scmi/common.h | 1 + drivers/firmware/arm_scmi/mailbox.c | 60 +++++++++++++++++++++++++++++++++---- drivers/firmware/arm_scmi/shmem.c | 5 ++++ 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index b5ac25dbc1ca..4b8c5250cdb5 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -326,6 +326,7 @@ void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem); bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem, struct scmi_xfer *xfer); bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem); +bool shmem_channel_intr_enabled(struct scmi_shared_mem __iomem *shmem); /* declarations for message passing transports */ struct scmi_msg_payld; diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 615a3b2ad83d..adb69a6a0223 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -21,6 +21,7 @@ * @cl: Mailbox Client * @chan: Transmit/Receive mailbox uni/bi-directional channel * @chan_receiver: Optional Receiver mailbox unidirectional channel + * @chan_platform_receiver: Optional Platform Receiver mailbox unidirectional channel * @cinfo: SCMI channel info * @shmem: Transmit/Receive shared memory area */ @@ -28,6 +29,7 @@ struct scmi_mailbox { struct mbox_client cl; struct mbox_chan *chan; struct mbox_chan *chan_receiver; + struct mbox_chan *chan_platform_receiver; struct scmi_chan_info *cinfo; struct scmi_shared_mem __iomem *shmem; }; @@ -91,6 +93,8 @@ static bool mailbox_chan_available(struct device_node *of_node, int idx) * for replies on the a2p channel. Set as zero if not present. * @p2a_chan: A reference to the optional p2a channel. * Set as zero if not present. + * @p2a_rx_chan: A reference to the optional p2a completion channel. + * Set as zero if not present. * * At first, validate the transport configuration as described in terms of * 'mboxes' and 'shmem', then determin which mailbox channel indexes are @@ -98,8 +102,8 @@ static bool mailbox_chan_available(struct device_node *of_node, int idx) * * Return: 0 on Success or error */ -static int mailbox_chan_validate(struct device *cdev, - int *a2p_rx_chan, int *p2a_chan) +static int mailbox_chan_validate(struct device *cdev, int *a2p_rx_chan, + int *p2a_chan, int *p2a_rx_chan) { int num_mb, num_sh, ret = 0; struct device_node *np = cdev->of_node; @@ -109,8 +113,9 @@ static int mailbox_chan_validate(struct device *cdev, dev_dbg(cdev, "Found %d mboxes and %d shmems !\n", num_mb, num_sh); /* Bail out if mboxes and shmem descriptors are inconsistent */ - if (num_mb <= 0 || num_sh <= 0 || num_sh > 2 || num_mb > 3 || - (num_mb == 1 && num_sh != 1) || (num_mb == 3 && num_sh != 2)) { + if (num_mb <= 0 || num_sh <= 0 || num_sh > 2 || num_mb > 4 || + (num_mb == 1 && num_sh != 1) || (num_mb == 3 && num_sh != 2) || + (num_mb == 4 && num_sh != 2)) { dev_warn(cdev, "Invalid channel descriptor for '%s' - mbs:%d shm:%d\n", of_node_full_name(np), num_mb, num_sh); @@ -139,6 +144,7 @@ static int mailbox_chan_validate(struct device *cdev, case 1: *a2p_rx_chan = 0; *p2a_chan = 0; + *p2a_rx_chan = 0; break; case 2: if (num_sh == 2) { @@ -148,10 +154,17 @@ static int mailbox_chan_validate(struct device *cdev, *a2p_rx_chan = 1; *p2a_chan = 0; } + *p2a_rx_chan = 0; break; case 3: *a2p_rx_chan = 1; *p2a_chan = 2; + *p2a_rx_chan = 0; + break; + case 4: + *a2p_rx_chan = 1; + *p2a_chan = 2; + *p2a_rx_chan = 3; break; } } @@ -166,12 +179,12 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, struct device *cdev = cinfo->dev; struct scmi_mailbox *smbox; struct device_node *shmem; - int ret, a2p_rx_chan, p2a_chan, idx = tx ? 0 : 1; + int ret, a2p_rx_chan, p2a_chan, p2a_rx_chan, idx = tx ? 0 : 1; struct mbox_client *cl; resource_size_t size; struct resource res; - ret = mailbox_chan_validate(cdev, &a2p_rx_chan, &p2a_chan); + ret = mailbox_chan_validate(cdev, &a2p_rx_chan, &p2a_chan, &p2a_rx_chan); if (ret) return ret; @@ -229,6 +242,17 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, } } + if (!tx && p2a_rx_chan) { + smbox->chan_platform_receiver = mbox_request_channel(cl, p2a_rx_chan); + if (IS_ERR(smbox->chan_platform_receiver)) { + ret = PTR_ERR(smbox->chan_platform_receiver); + if (ret != -EPROBE_DEFER) + dev_err(cdev, "failed to request SCMI P2A Receiver mailbox\n"); + return ret; + } + } + + cinfo->transport_info = smbox; smbox->cinfo = cinfo; @@ -243,9 +267,11 @@ static int mailbox_chan_free(int id, void *p, void *data) if (smbox && !IS_ERR(smbox->chan)) { mbox_free_channel(smbox->chan); mbox_free_channel(smbox->chan_receiver); + mbox_free_channel(smbox->chan_platform_receiver); cinfo->transport_info = NULL; smbox->chan = NULL; smbox->chan_receiver = NULL; + smbox->chan_platform_receiver = NULL; smbox->cinfo = NULL; } @@ -300,8 +326,30 @@ static void mailbox_fetch_notification(struct scmi_chan_info *cinfo, static void mailbox_clear_channel(struct scmi_chan_info *cinfo) { struct scmi_mailbox *smbox = cinfo->transport_info; + struct device *cdev = cinfo->dev; + struct mbox_chan *intr; + int ret; shmem_clear_channel(smbox->shmem); + + if (!shmem_channel_intr_enabled(smbox->shmem)) + return; + + if (smbox->chan_platform_receiver) + intr = smbox->chan_platform_receiver; + else if (smbox->chan) + intr = smbox->chan; + else { + dev_err(cdev, "Channel INTR wrongly set?\n"); + return; + } + + ret = mbox_send_message(intr, NULL); + /* mbox_send_message returns non-negative value on success, so reset */ + if (ret > 0) + ret = 0; + + mbox_client_txdone(intr, ret); } static bool diff --git a/drivers/firmware/arm_scmi/shmem.c b/drivers/firmware/arm_scmi/shmem.c index 8bf495bcad09..b74e5a740f2c 100644 --- a/drivers/firmware/arm_scmi/shmem.c +++ b/drivers/firmware/arm_scmi/shmem.c @@ -128,3 +128,8 @@ bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem) return (ioread32(&shmem->channel_status) & SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE); } + +bool shmem_channel_intr_enabled(struct scmi_shared_mem __iomem *shmem) +{ + return ioread32(&shmem->flags) & SCMI_SHMEM_FLAG_INTR_ENABLED; +}