From patchwork Tue May 7 15:35:00 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: 13657297 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 8D160C25B5F for ; Tue, 7 May 2024 15:27:32 +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=4O1mGlmYYC5Am0AEerP/MQZ7fP 1z42nE7Pko4NjfjiYwobnwVuzI3h6JRUfum7fn3iz7rkQjwML99CwquESIMci2Gbc9Ac3wQIG5dAg 7xAItFyyzYWfg6lBM5UnF9Sqp7q9khiJ66q/fWvrHznmcs9EiMZHD2cSqwhRqchUacvtdzO2C3b16 hn0/hSMRHavA6Mf5yDx0GvxoWVcjrufyTuVkKfiPKjc0J8vmDnSK1dthMwJUNS17rmFPuJ8KAmkhb /jGHlqWyRg7cQkYnlbjYwgBksLT2jzJG5wWefZKQSdqgQYjWUCJ4Xg6IPJcYCoBupsx9x8OBKw4XJ ZvCYtjxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Mis-0000000Bjk3-1EvD; Tue, 07 May 2024 15:27:18 +0000 Received: from mail-db8eur05on20626.outbound.protection.outlook.com ([2a01:111:f400:7e1a::626] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Min-0000000Bjgf-01c4 for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 15:27:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T2H69TVf6nI0n/D7PaG3y9YuTc2NCC08X+k7OHiCMZHk0d4MJjZD1DJ2HS/Vqt63+mMfCsa3Bg098we8M0PFebt4Fmk87GITZqVnRejK1uW5EfNz9XK+SeVsG+Y4PPzuV9AbKJhxPYyk32u6MdnBzmMZfRvYpYL5mMAcinj1B/7KHaDbk4HsL5zc7P+ja1JaLhgsLCB/CNvsY08H1Dp8kl6BkgoWCKf2WzAq8AJI4+xLMV5OQpMVVoSUl9/Plq+kEuy9M4P6h7nvI+8IzmaZmuN6WGB5qGgGkhi3TDHEWEXCf93CCKxu2fOZIRPsLCqyGtlNtM7V3gf2kh+XIvyicw== 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=SNjq1Rr7GHU2gUnO00+xtZ9Dho4tMQRZc3CW2tpqWDmIIrYHpemTs8GYS1C3S8FpUU2eJHrBTyuzI+B4Ypkq7BBZ2QFcPw+uhh3gxJlAGVLdtzrPLiuHGvbH+zhVDoEYTDs+YvKsMgdDNGhjpMPnWF1d7v6y+o/hw74F/1vvl43mCC6lTlXwSGE78Q9sImKdDFUqg9rEPFsdopQhk5W8TzjV5o3mCD5YjHrqtswdZJ04oDZ1dK+rSYZEGJrMeTDpIc85UT0/1QJVXh5BnKcdsNsU+UTarV+jOiCK6+V+qIEtw2j5NdGPIfMCge2AlmkbgcEto2IcgS45V1GxX/3H9w== 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=hzn94hTsGd9N20shwrnw2zaIBtSMPpxaidsWHmmMb9+3tWkkDakHjZRj84VMMl2gL58uKIlalL/utqDP7ZkTLxZEZs48Gq8mQExnVJzkn9CY0P82CGL7dIR6uRprQHo15cNo/kfjSd7TYAtdHvKMIelRbR4zoP7oxusCQHy0k/Q= 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 AM9PR04MB9014.eurprd04.prod.outlook.com (2603:10a6:20b:430::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Tue, 7 May 2024 15:27:05 +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.041; Tue, 7 May 2024 15:27:05 +0000 From: "Peng Fan (OSS)" Date: Tue, 07 May 2024 23:35:00 +0800 Subject: [PATCH 1/2] dt-bindings: firmware: arm,scmi: Support notification completion channel Message-Id: <20240507-scmi-notify-v1-1-1fdefc984d53@nxp.com> References: <20240507-scmi-notify-v1-0-1fdefc984d53@nxp.com> In-Reply-To: <20240507-scmi-notify-v1-0-1fdefc984d53@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=1715096110; l=2485; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ZD6kTC1LKyAdyC7MdJ92p2toAQCDTFJKKmtOf1wMmI8=; b=FEhFyMWsu5SbxyF05GBwh5OLzi5juPjF+FYtq7IIz2QtB0IfMeyl10bV4EBRPb+3PqCx+nict E5HHep4yw7ZB3UAjMlvX1ilrZDiex7tlie8C9FJMY/KHUUR9vZXcGz7 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0018.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::9) 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_|AM9PR04MB9014:EE_ X-MS-Office365-Filtering-Correlation-Id: 305786df-0d4a-40af-fa32-08dc6eaa26c0 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|52116005|376005|1800799015|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ciJrP5iLIo2MJinpbPabURfSJzz5ybX?= =?utf-8?q?2mee3R3FF6C465G6rr5teN6I53M4IBHfqGssM0hrUcUh4rVe0Ry6rVVZVYhVQuGfP?= =?utf-8?q?f4rR6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Tl8jO6HcPrqDuajh1dsL5Ny1nJozgi7XTFdVMlHN1FV5Hnl1TpgoLd?= =?utf-8?q?1+mGrUwkHgmyhi8rtyfKoMgdkDYFS0Iu+75pSa7LuSlfpChleYnFJDXJpoJy9xq2V?= =?utf-8?q?22ADW3sJ0WrMU5QzOwpLimH8O5f80gYGJrweDmeINrPVoCF/Bg8DuRJLFNkoXztNY?= =?utf-8?q?zEB0eidtcKJXQkSBa+oTPkLbe07aH49f9uwqUMImApi0Dr7/RcCuxBfd+H4Ozx2PN?= =?utf-8?q?UG/stteV/a429sxTwrleqiBtgoU/x6Z8iPSb08E5Rkf0yo2HW/t/UKycrIsJ89rBX?= =?utf-8?q?Y1J12GN0dyKElpohz2MgTZsz8zKCWoHzVaw=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)(52116005)(376005)(1800799015)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mn9eRITy5Z/IpUNsVNwlZ7AlA6Hq?= =?utf-8?q?mgZ11eiYgM6BKzJU6kD92wCl0wDOMlOUrLdTbc3nI/oryyS/0Znojd3mTG2no/rHy?= =?utf-8?q?J27ct+ud4o+X1KlhWrJ6q2l1pykf/lrL5wUDqgTI/TCeK/BYZdzvUs7l11tWQzUkT?= =?utf-8?q?nCHqCVemt7HWrEL/d5XMfHqdtsWI/WHPnkqJLog7eOKcDYS4chFJmmAKRdOah29Ih?= =?utf-8?q?rfewwUl1vKNGFcBk6sGluxPdf0Jt85cBHl/HXm3OiLE0dxmHXnbTeCe1XZn/2jQm2?= =?utf-8?q?WpsLTnOkZayGlbLxwEawrYlt+qE3dds2Y1+4PUuPfol251t8go1+UBLARQaqoGe86?= =?utf-8?q?ThfRR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FOMulAiEgHBT4Com1G4rWbBjzF6bOqHxNqxwkIVs5B0bfhUUDN?= =?utf-8?q?xY5VJ2v/0anYszjFy+uZ2qyq3y9QpfGn3Udf7iqJ+Li11W/Wlrx2Bl+lsZfN2Y91l?= =?utf-8?q?rGgZ6nS4F3PQ6SCQkqpcw5yZ13MEtRmDseSKwsvQ6a/XUUjuF/hM0oORtlUCvPhjF?= =?utf-8?q?4OZ/x/JGju1Yqd784q3W939QVJtxOU1gRAewMTfKNcVoAeU60vGw8wzte5cYCoH/c?= =?utf-8?q?w+or3OaEyBBrVlJEAi+PK788MU1BDd/F67Wctq6eWUELl350UcpE35AYNXBYYQtZU?= =?utf-8?q?h2HXZ3RhqHMo?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 305786df-0d4a-40af-fa32-08dc6eaa26c0 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 15:27:05.4947 (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: DwyR6QyGJKyaDwMsFcc7m3fkI1Fie+uZXEDuuWm/McebDxO0jrUQ96QUDDEu4GOk1tm07V1yDcSITijX9fZOjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB9014 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_082713_091850_8EA221D7 X-CRM114-Status: GOOD ( 12.60 ) 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 --- 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 Tue May 7 15:35:01 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: 13657298 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 69AF2C10F1A for ; Tue, 7 May 2024 15:27:33 +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=oW8lNYkhp/54FhM+uPx1F1gEBG0BMhsCCrHzShv0FA0=; b=aqqJU4HSwFhXWpnQcGKAIIn9Kb 5rgNWq2RhRO5cjyF8Utcn+c7JD9Y6N1juuSbm6c+hsf+sNDJ8pBBXkTwixX9WsKBJLFoGhCAnHMbx VjET3B+FeN3fasjwykhizZ/KXa0ngynCUNkR5uSQfVVE133EEfEZpTK2smQhFGHzFzxZroChnZfNh pNHPuYyXi9JIXeewFkR0nkvowNVdRw4Hp3WE+/XGqUtm7kmCyIujNacOV+TZchxcfqhC+9ZqPYmSv d9xq5HiQFQKyPWf0HRqOaR6fTsEU0xIQXkaU2dCZqjUYle9XcENQOwI42DyfwBep48ect4wryJH8x 9aiNxH6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Mit-0000000Bjkm-0Jdj; Tue, 07 May 2024 15:27:19 +0000 Received: from mail-db8eur05on20626.outbound.protection.outlook.com ([2a01:111:f400:7e1a::626] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Mio-0000000Bjgf-3OOs for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 15:27:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FmfLTSsJE309wxGqF284eaBJe78SVtJJuvMsGiqQv6Y1b0kUgrX14d+b21MA44Jm9d2mOQunYcd0qmPGSt9/33D/s3FXZTvBO7ecr8qd4QcDYp0d+/XKGaEeiEwmaVZtoUFZEII8srFoTZfLacB9QNK4zpOOn0/P4Htjb6W3EqKz7++PwnNoMoMFI9NRBwI2OHhj695h7QXouyKjYjwtT5BIaNdoTOnhZEVG0xp4YhkCKCB3u2Nhq38vFZu2Ezn0t1uuoc+UDgpmrrG1oXgeidQi5v1kigzr47lc9BcZ4CM43nTtsZfnR04Y5byLj/3zrJWFTnf1ogCyVv4NzWpgsQ== 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=b8W6QroVXRCpCfE3XgHPNIW55+hj09hN6D5oQdhQUfU=; b=I1kZijLJxdJn+G+4ttjJthquTlTJG2Sgcx+/eQ+b7IgcOjOcDGPl6IGqY3dYYqEcAcXr00SUfRp9b+kUpI0LtgtYING0Sp+pAnxaNVTQTWtoDAOfUAk9S5Z5PBdWRwukxL+r3wggcdgMJciXJB/dJRvh3L4GoV8quC4JvsacMAOQc7Vn7FabBNLaD9VcpwPhTmCesSbEcsUP1wi7/HtixPGvFSbn5Imx4ckYrnf+4zf+Jx2z8NhaHY7PlLZcWPvniUAfpOG7wVALnyDMbzFW/xs0xgC60j2pffaCBJ/vtBDq2Qid1r1gDM3Ewr2vQ9valqrmEYoLRFi1DfVdRFEbAQ== 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=b8W6QroVXRCpCfE3XgHPNIW55+hj09hN6D5oQdhQUfU=; b=fY8S2lN0vHYe/bXdyYpcZ42PkgvAPCZnpFpjrCYWHUlTPwATKzA4EjhBLiQ53CfXeqKJAD9z44PrDoRc9zbWsKS0roErdduktiirAKQytQotHr0WFSKpMvWDeXw70HmwrkXU9/NvKsBcudz2AFn+iUw5jSEUq1Pu39h3qHYLYyk= 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 AM9PR04MB9014.eurprd04.prod.outlook.com (2603:10a6:20b:430::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Tue, 7 May 2024 15:27:09 +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.041; Tue, 7 May 2024 15:27:09 +0000 From: "Peng Fan (OSS)" Date: Tue, 07 May 2024 23:35:01 +0800 Subject: [PATCH 2/2] firmware: arm_scmi: mailbox: support P2A channel completion Message-Id: <20240507-scmi-notify-v1-2-1fdefc984d53@nxp.com> References: <20240507-scmi-notify-v1-0-1fdefc984d53@nxp.com> In-Reply-To: <20240507-scmi-notify-v1-0-1fdefc984d53@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=1715096110; l=6970; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=NraZrTIh1CTKRDWgkHiH7fWJ14BXSdQDjIzIxPoolEU=; b=NidSZ+xByfvkRpnRR9RsCgCyIKNIB7dWBiIwq2/doiQs66LRCA9mMc0tWtrbRhID4GDrZicth S63ujB+PVvjCjG3GULCyRWnyGqUnVBItuHUXbhS3uKGC6X8FLjOv3gP X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0018.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::9) 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_|AM9PR04MB9014:EE_ X-MS-Office365-Filtering-Correlation-Id: 8454446d-98d0-46b0-9e32-08dc6eaa28cf 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|52116005|376005|1800799015|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?nNIYPrWHIFhtnHtdJnjG4rzPag/DYf+?= =?utf-8?q?LeGMEjUpa5uhayRwKzxhQNCxhAiqEUbFm7FI3750UTekbJ2AZT9KNgG4FGW3JP6cT?= =?utf-8?q?0fb4VGiYCmvDWLpLZdpOV6wZeBPhGeD4jokRyVxUbkjDyUpYxIEe4ojdjDx+cVgh0?= =?utf-8?q?nhLMdJRMTOegHkjeB8RRkHlZrEZRqTj5IiIQfZ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/LvdvN+bS/4?= =?utf-8?q?y7JE6ZV6pAF2UBjnwXRXRX+x/vH8jsDH3mJLYsDyN9ZEkg5WBdHhhsm7PLqSH+g4F?= =?utf-8?q?5mrbsbDtOTY4IyiZiHCKW8R9+0HBayk4QvSDOpl6FUHkZ3hZPi+8M1WaZgDzq7zCN?= =?utf-8?q?MtS6ULGMTO9DtKcX5Lt6KUnuSj57LiaaDNx1jr2g6i+y9soEyWDvT0lsoJpVjUSEb?= =?utf-8?q?drbA35gbIzSixknrVWSnhpEHjKUJrph5LEw=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)(52116005)(376005)(1800799015)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/wE/d9B9B66fGnUgNQ9xLhddgDKU?= =?utf-8?q?zUioPmBwv3YlEmXY+w8HxGTc1QmirJZ4Q/jv2L9qBuEq0CX14/f3t2ZgY8cheCDij?= =?utf-8?q?EOXdwdpZ26XvEOsalaU08wx4/Y9ZjozwPoiXwjzK4vrnxfVKz7592dxE9N+ma5nyH?= =?utf-8?q?5CPolgVJ8ev8ztMvFZsF7Qob8WGNRNQQ3I6LilYpT36qhUNah1KkYOpfdDWomshMo?= =?utf-8?q?ZppHNfq5E7g4zpTRGg7UaUVJh5npe/A6+dd6aODaI5GldFLxKVmmGyV/NfApzZsqW?= =?utf-8?q?Yo47vmParbbx59glSBugyG6d16HGjr07j8zatL8GJG8PnWoVlonhXRNHxwZtfieCf?= =?utf-8?q?0UZ/6YuGinVBb/SqlqeFEGvUN68IFdG7dSSAXk4ujabH7/zkDWbk0tbjm9WIP5eC0?= =?utf-8?q?je56fTCmxdqM6c37XUH1BLaZHmCV8r7GH9O4NA+soVK0E5e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GBBHPtO38Fj17?= =?utf-8?q?6hVnUsBT1N+Kx2m0dSzRz19rBpMynY6AFVNuJGhyt1xcke8p105mr0Xb/dilzQYaW?= =?utf-8?q?HZiG2296scey+wA0H/DnOTsVXi/2+pCXPj7/msAu7n4f+Qg8y+z99Xhm88wGfd/1r?= =?utf-8?q?qkQ6pzmMOHpXwMWlig/1d3YvrdKPeS1FtqQHVS0mAi3o9Dr93gDEF0KE5ugid+6KY?= =?utf-8?q?VQ6b7C/jfHcO?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8454446d-98d0-46b0-9e32-08dc6eaa28cf X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 15:27:08.9349 (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: RbMNZXrV61PcoVBRbyov7DTClo7yCrSlpw0XK5QvCSc9DYdLEF9SfdaIQ6PB479FK/L7e5tyhp/aYg/Hw/woMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB9014 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_082715_058394_35972A0B X-CRM114-Status: GOOD ( 18.93 ) 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 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. Signed-off-by: Peng Fan --- drivers/firmware/arm_scmi/common.h | 1 + drivers/firmware/arm_scmi/mailbox.c | 51 ++++++++++++++++++++++++++++++++----- drivers/firmware/arm_scmi/shmem.c | 5 ++++ 3 files changed, 51 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..59a3085ce366 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,21 @@ 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; + int ret; shmem_clear_channel(smbox->shmem); + + if (smbox->chan_platform_receiver) { + if (!shmem_channel_intr_enabled(smbox->shmem)) + return; + + ret = mbox_send_message(smbox->chan_platform_receiver, NULL); + /* mbox_send_message returns non-negative value on success, so reset */ + if (ret > 0) + ret = 0; + + mbox_client_txdone(smbox->chan_platform_receiver, 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; +}