From patchwork Mon Sep 19 15:40:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 12980675 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 ACF4DECAAD3 for ; Mon, 19 Sep 2022 15:54:20 +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:References:In-Reply-To: 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: List-Owner; bh=4HxoZ3QfHugXqNkkCLMaYN7KRooqGI0ikJcmmepZLAI=; b=G1FYGuUlvTY9oF Q+Ct/q5+GlgU2FkxLGii3Fzbp4erKW2/i4Pta8LGdV/dedmUrb4I975gUu/n5E2C7w9ZDUhgPn6eL Fxw5/8AcZjis1a/sKEThk4ONUEhs3vxGEvLw9nOWJF73PWJMVMF9xnHAlPfYtAPQlN3pA298IlACj hdjV8hAV6nQFC6BuZcaJIGz8wQuq6LaAkclZOEaW6Kext1K5WcBFiXX5IqO7/ok2KYmcN7tg0VAQX UWyQAeiY1ILoHSxFeiiiJqral6mqrb6Px+C//SjM07xSQXszwqS5LuxvxVybwf/H3KreZgm5czn5l 7h5Ee/7pD/Q1QWSfn2VQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaJ4g-00CfJU-1Q; Mon, 19 Sep 2022 15:52:47 +0000 Received: from mail-eopbgr00062.outbound.protection.outlook.com ([40.107.0.62] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaItj-00Ca15-0i for linux-arm-kernel@lists.infradead.org; Mon, 19 Sep 2022 15:41:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V0rUo3a36WCdpNSeWClnlTYZzfL1nDCUo0iMno2oMd+/bQPTRHusrMQAa0QARZovNcD6uBnUPdKaC4YUOVVtrNPDEQwsh1Puc7N+W+QZvmDoHCAweCycpm9vChx4DOcg5w80Buc3xWQDh3Ejsq5zS3d5omeeshNNzf4+KvCnZ9yU6H2wrWM53Pylzgtg3VFYTGqPt6gIpC30C+XgTMi/rxVBfwh379MfE8h2PVQNoKsCCV23LAIjKmk6HPRnX7XVTP7LmDij9e1LgeS5APEAnLooHOwSTMfs6kp+Zi6ogE++828tcHwdi7nct8XcbSM+upincViD3j3q0wIq8GisHw== 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=ankBqv4m+mipQUAqC6qml7eN2IMIGbUtiVkPxPMXbW0=; b=lLmdYaIgJ7Ap+hp/3eyKLkumte2/bGVRsBjQ67SpkWuEvHjf7qglCr2Eh45fvaXM6H6mOqdLgbfWp9vmCGP1RIftOg7hv236SMRboRvAUMcbFeiPdEMpLySCxAh55BgKPkE5q6u+rmxmvQlIXRL7VKfY+TPyE48n7woEuq7l2fXHBIpuldW8x9HN31vdRthn4h6maRxINlkDacVaccoIUZhV/uzilqU0vJKF0XZQdB2NDWNfy7imIs5UdZGIba/0v+ML+5kEB2wR4I1Jg0tuXYBc5gQrzTz1aHWEmQgXvVtUwIV4bVpw6X9hPTdzBE+t7c95iiTbFOYypwKQ4t0ZTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ankBqv4m+mipQUAqC6qml7eN2IMIGbUtiVkPxPMXbW0=; b=FIrGaAynjGN6RXC2ojvwSEQvQideA2uLKHP/mGBWdGNT14bFVf9fSZz5iFVan4+kBQeD71MRR0JLu6o+3vyKNJCXooeYgOrF5Pc4rkf5cEvyaRLRBPUkN4gsN6erJTLEvuzHCTKAqRuWiTkgiE+Pxz9L0jnMkCIuOs0PXPwucmo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8793.eurprd04.prod.outlook.com (2603:10a6:20b:408::22) by PAXPR04MB9665.eurprd04.prod.outlook.com (2603:10a6:102:240::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.19; Mon, 19 Sep 2022 15:41:23 +0000 Received: from AM9PR04MB8793.eurprd04.prod.outlook.com ([fe80::5a3:ff70:317d:a99e]) by AM9PR04MB8793.eurprd04.prod.outlook.com ([fe80::5a3:ff70:317d:a99e%7]) with mapi id 15.20.5632.021; Mon, 19 Sep 2022 15:41:23 +0000 From: Frank Li To: maz@kernel.org, tglx@linutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kw@linux.com, bhelgaas@google.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, peng.fan@nxp.com, aisheng.dong@nxp.com, jdmason@kudzu.us, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, kishon@ti.com, lorenzo.pieralisi@arm.com, ntb@lists.linux.dev, lznuaa@gmail.com, imx@lists.linux.dev, manivannan.sadhasivam@linaro.org Subject: [PATCH v11 4/6] dt-bindings: irqchip: imx mu work as msi controller Date: Mon, 19 Sep 2022 10:40:36 -0500 Message-Id: <20220919154038.187168-5-Frank.Li@nxp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220919154038.187168-1-Frank.Li@nxp.com> References: <20220919154038.187168-1-Frank.Li@nxp.com> X-ClientProxiedBy: BY3PR05CA0059.namprd05.prod.outlook.com (2603:10b6:a03:39b::34) To AM9PR04MB8793.eurprd04.prod.outlook.com (2603:10a6:20b:408::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8793:EE_|PAXPR04MB9665:EE_ X-MS-Office365-Filtering-Correlation-Id: 69268d2c-5ada-4433-d657-08da9a5567c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VuDWnKw8F/uvAJ/YMCKVIqDHWZxN4QHojT1uSdJ3ja65BP4UDmqv/y037t5orqk7dS74b8bnhloYh+U77+N5VVTsQcMmcdRO1juHxc1Dbp93GSmA6vqA7rYBiveVeH73UL+1iYMJxvKFD4XHudJjtco5vUmfhAYGa3ElZWvVLyYhdetUchg46ji1coUGYOdWBXLisqLOmLYOWLU33GGfXvd/Ygvm2bOuX0D3YmvkSp+gogIJVHo9o4nxjw7wTCLfM/N22OB4vY1laLGkCCAFpUIX2en+ewn+jq5SUZA74YsBEW6g/wNf0mlEfez0iTYouEwV9Lq7JZvtKeSbOG9fia3PLinPF3/n2Cw9iiIe0sXYg8SK+by3xHXSHgGlAlbeLCLC07fxdl30dEdEWGPiLb/LkR84L+/PSUFwcY0pUNj8Cx5M7lcvbBYaHf1zrleyrsQJgltPfGvzUfIqVujIyDprglmzPFTFVbuqAkn21xYxHqr6Ajc9bSwgcDZ8j210uoc0c0H2ndvjQ97E6Lnl+qRY+6YOiHQMDUMX7H7aNxDGv/oZH+iGiHiXXK0UFWhbezV5958OJIXbShWY11F6Wl/bHj0j8P4uvT3vBVT1jD2FhDeoTF8XjAKrDLWJR67+B3+ZjVOzNBBfAu/6qRIaQLFTU+0YIIzWIiwDYTOlsQLY3T/gqqlEkP/G0sL03ck6jIcHhyMut85Pz12a60UAJrwrxBadHj1fbLDlCV5pz2pIxYFP4/hW8HzQtIuIDlygk+eQYSCaMCpqm8LiVEakpCCpTdifOh2Rkozmuu8nOcqIxXf8C5IsR4h8/fBlaudDx3yc7ADAJj3IY4CuFFBRUg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8793.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(39860400002)(346002)(366004)(396003)(136003)(451199015)(478600001)(6486002)(966005)(36756003)(316002)(83380400001)(186003)(1076003)(2616005)(86362001)(38100700002)(38350700002)(26005)(66556008)(6506007)(6512007)(52116002)(6666004)(66476007)(41300700001)(5660300002)(8936002)(7416002)(2906002)(66946007)(8676002)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k04+0IXa51M8YeOQtiIM5yXCQ3xSYHF0+4uqnUzFke6QDOKDULQCAFhrws8vyQbpraefzlZnfIUqmuJalWiwbMSm4/rVs2NGj9AgDaGo1CZ+FEzuFK5WqWqiTM/QTHIc/B5LNjIOck5CEl4nup/PX6TmsjRdPNvdviZahtVpeQ/Jbr4Z3Y6LlndpPbu+DpllVsZSxNmbbBo3XX78q6aF0qoNJIjL8MHjYpup/Iide9Abww/FLLn7b2c8MxL5ochcU+8pKUVmHk10iYpr/2klc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WB+axWDQiS2slat5BACr8XI0Uj72NitLEhxG9T5T63bXdByUUSIRObXldyfrKCD5Qy12HVXSXKrtZ+gfTzjH4yJv4u+TQuf2ipBi3YyDvCunbLOXEHczx90NyMfo8CzwgmSxL90knbztit4Q6/DgYu9f4MlCMrqzWEW7TgjugWmmIQLEWpdFl+pAQ0FEINDJTt7wctULwjinjQusV+YW+6WAo2yYDlkNpWFSkn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69268d2c-5ada-4433-d657-08da9a5567c4 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8793.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2022 15:41:23.1447 (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: wE0HVQzK4NSFl7zgGu94KZhxB82VpcD1hXzVby5KY1COsc7q/yxbDWl2FyleWbrQWwuXpqZI/tkYdcvFQcucHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9665 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220919_084127_131242_9DF9EE23 X-CRM114-Status: GOOD ( 15.04 ) 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 I.MX mu support generate irq by write a register. Provide msi controller support so other driver such as PCI EP can use it by standard msi interface as doorbell. Reviewed-by: Rob Herring Signed-off-by: Frank Li --- .../interrupt-controller/fsl,mu-msi.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml new file mode 100644 index 0000000000000..799ae5c3e32ae --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/fsl,mu-msi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale/NXP i.MX Messaging Unit (MU) work as msi controller + +maintainers: + - Frank Li + +description: | + The Messaging Unit module enables two processors within the SoC to + communicate and coordinate by passing messages (e.g. data, status + and control) through the MU interface. The MU also provides the ability + for one processor (A side) to signal the other processor (B side) using + interrupts. + + Because the MU manages the messaging between processors, the MU uses + different clocks (from each side of the different peripheral buses). + Therefore, the MU must synchronize the accesses from one side to the + other. The MU accomplishes synchronization using two sets of matching + registers (Processor A-side, Processor B-side). + + MU can work as msi interrupt controller to do doorbell + +allOf: + - $ref: /schemas/interrupt-controller/msi-controller.yaml# + +properties: + compatible: + enum: + - fsl,imx6sx-mu-msi + - fsl,imx7ulp-mu-msi + - fsl,imx8ulp-mu-msi + - fsl,imx8ulp-mu-msi-s4 + + reg: + items: + - description: a side register base address + - description: b side register base address + + reg-names: + items: + - const: processor-a-side + - const: processor-b-side + + interrupts: + description: a side interrupt number. + maxItems: 1 + + clocks: + maxItems: 1 + + power-domains: + items: + - description: a side power domain + - description: b side power domain + + power-domain-names: + items: + - const: processor-a-side + - const: processor-b-side + + interrupt-controller: true + + msi-controller: true + + "#msi-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - msi-controller + - "#msi-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + msi-controller@5d270000 { + compatible = "fsl,imx6sx-mu-msi"; + msi-controller; + #msi-cells = <0>; + interrupt-controller; + reg = <0x5d270000 0x10000>, /* A side */ + <0x5d300000 0x10000>; /* B side */ + reg-names = "processor-a-side", "processor-b-side"; + interrupts = ; + power-domains = <&pd IMX_SC_R_MU_12A>, + <&pd IMX_SC_R_MU_12B>; + power-domain-names = "processor-a-side", "processor-b-side"; + };