From patchwork Fri Aug 12 21:52:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 12942560 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 70226C2BB9D for ; Fri, 12 Aug 2022 21:55:02 +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=vaT43p7a0aSxJAxLO8gXXdTODH9E6TO5ElHigZO0Y/k=; b=h0SdmO9bO3kQqF pscH86dBO1sMTzCe1G+eZEkXSnMaCdl+bJsymdS+X+meWvOldPhkGYno+MXyKTR2E0A4jr9AVcPQE ExwFhyDWIc7rntNMGrXhV+vbFvbsn6G6q7HUvXVRrfNRTIJymdYDCD/YmdKtb65+o3oycBwUfvFgo TO/u2vXu4dsFXnSyYGeh+ZeDTcy9b9eUqDt9RkEBBjQ2m+A7V8Mfq9Tzk8GPzNqlkMIsMV5b7wOZp lHOT8TQYmvKKULVLVPHDAI/kOS0wBC5h4txcT7lt0Kf3q5Us+mhKds+sDiSeDA/RvZlwVVjcspAiY Q9OTYj14zqAqIy65kREw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMcb9-00Dvb7-3G; Fri, 12 Aug 2022 21:53:43 +0000 Received: from mail-am6eur05on2043.outbound.protection.outlook.com ([40.107.22.43] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMcan-00DvIC-G2 for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2022 21:53:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AU8Fc9jCpm8ZT3k5j66WrQxnyqXdD/VsG65jruJyUqiJUjxy6kuBizvsMVacw7nSwwkuLJEyAx2NK/9upidHzHqJ04gI2sIS1OVx8zEWoB+OudrFLTUyrPFUym1aX8Nb5cD4VCXKy7PV+XiZhftqgD2Z+JP3HQWFnv6iwGFwJ1jy4VeiEfyoxXQz893t4nGMjHFKYZqnE3zoALALfa/OtInjLZaM10Bw9zq0SUVzX023me674dWpe6xZBjKApteVSRR8783oWX97ypK7CfEiMiz6tAGkGZKTI+BcP8+uJORmfM9P4KqyTdUtC+ymoIaWsMI/QOtgIkTMeYVvEZSj6g== 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=GO0Ukq5z/FFzjOPzQO5TFDzJmzH1zovnfAtQ1pbPsbU=; b=XRETAkWR2zKfGHxVT3/R4y2QY1JQgNn2aA8o0VWJrY4mBDhlRIIeZAeC3eY6J2ElCFIzPJPmH8iAjRkZ/r11s+2nTTH1rX5QkRD2CiVY4QOk3G6O4j+FiD1TT5tXMhrQDm7RcUEcg87ROng1VyxPlY+BtkGkNV9UlMhwhhDFw891u2y7jxwJnuHi95xEcxSl6mqx25D6SCFs0EF7PNETc2Q9KulvD70AABS9FSdHatflrIQA5Ufe543Q4GVDpA2dctOyIcSq97IwlFm3UlLYpopudqcASfmLozcdQQUScjqwRJLvENQJCmtWXle2010SQzcoG+4p7/7Kr6cqOY2iOA== 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=GO0Ukq5z/FFzjOPzQO5TFDzJmzH1zovnfAtQ1pbPsbU=; b=iCTJLvxxKdKgmAhb1H2zKlx5wqwOMWCYABu9cYJnATTAP1271qP+rim95rEBXmvrV3Z9fjPDofjG5VyW7KQT/LBqeOHlsr/FYz/ZGPS3T19A2Pa7nNOVLDjLJjHy+SLoHU+Qco13MqNfVYMTzPCSfJiIlERFjGrqIYoIF47O3Zg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9186.eurprd04.prod.outlook.com (2603:10a6:102:232::18) by GV1PR04MB9087.eurprd04.prod.outlook.com (2603:10a6:150:22::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Fri, 12 Aug 2022 21:53:18 +0000 Received: from PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::c5f1:b708:61db:a004]) by PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::c5f1:b708:61db:a004%6]) with mapi id 15.20.5504.023; Fri, 12 Aug 2022 21:53:18 +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: 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 Subject: [PATCH v4 3/4] dt-bindings: irqchip: imx mu work as msi controller Date: Fri, 12 Aug 2022 16:52:41 -0500 Message-Id: <20220812215242.2255824-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220812215242.2255824-1-Frank.Li@nxp.com> References: <20220812215242.2255824-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR06CA0064.namprd06.prod.outlook.com (2603:10b6:a03:14b::41) To PAXPR04MB9186.eurprd04.prod.outlook.com (2603:10a6:102:232::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1b69adbf-c88c-488b-ccdb-08da7cad102d X-MS-TrafficTypeDiagnostic: GV1PR04MB9087:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NpByzxxatGTfVPN6puLCmJxZ1KrSzTtbLmECzxejEywbM8qbsDVoeAATPZN/b5vu9RAdht+EM6XEhBlC1ZV16c5r8LwvZEWCCDWTQ7k+ETEIhtBVEGZxl7OtD9OXaVJPb5z+Ai3na2X+lsidXnOPjp/WsuukHmMU5+/WufIwhh7lruoxhVyyhdCB4Kjt4IQnAmGLFEbrmBqsNoP5LZWqTq0jSS8solWIfjooQasUj4qObbU7R69bqRh/m7oRDThyXAwtBjtsSnMOA0O4E3x0OMCBTer17rZMEE4h8Xc/fhXwplgo9OJ+h7mzxwwPu97Vol1yU04/wkpKkmn57vn7p1qb00rjVqWEVujWwSmmwUpKuaAkwLN6lnJGpNn+0/q0BAZ6eCqEU46sI+WJ1bj1AC3cU/7T/SUnoE2qZ4lgC/JZwg2ici7UeL7IDMRfZW9azh6/X8Ufcarx5DeKt4NBf3bZ72huKy/uRI84wjFeyQ7aJMT+71hKkCK+2zfZ5/Fxo8IZcYAIljg8oy3tvgddZJxbPoOOgDH2M56bj03bnalQtAar/5c7BEcJg5AWtZn8Heo2AvQI30a48AFep07w47JhVtyemhuSTBZHLKReyKCy1WC+0NUONvyvgnKND/ffIU+OpTpDKVpPLu3AU8WX88fz5mIAHY9obUuEnzbTiuzZF9Z7dbvuy0r1PFLaJ7MyKDFdNcglU760lbH9tQ4Hr5ferkL9JAE+KPwqEciFloyWhhjIPGZgLjWZFw0dWJbNKibQTmtJ7DjbaQY2PI67AgCoYogkAuvHElSoA1yZCuIi9AU8Pnq+CQzAVr3CldXzhWlQlqWp+UFAqYb+zhJSMQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9186.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(396003)(346002)(136003)(39860400002)(376002)(1076003)(2616005)(186003)(83380400001)(38100700002)(6486002)(478600001)(38350700002)(966005)(316002)(66556008)(41300700001)(6666004)(7416002)(5660300002)(52116002)(2906002)(8936002)(26005)(6512007)(66946007)(8676002)(6506007)(4326008)(66476007)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tvfBheJqSqFl/I9eqiobXHqN5/JfyK6Pnqa+6RJVkBoTMtw8T/K2zOsV9qp2w8z8NE0R1Qmov2RUGkFOb8M+BrSjrvln/ndab7jmlSHbL+IDZOoHM5fDxr/sSDmtE4qM8qSH1Cw3MylBBAqW0mhk9H6CRuTMx3zCbV8rNhnKxgmFOEIorhF988Ai1EcXXTspHBpuBt6REf7R1Qcp/Rqc0aTfq9f+7fjJJHNS9WNbm+fbnFfnjlfBPdwpVUMxOFgeFmTr+6aqi46EVi/aEzWeX4iICNymsYQKiiPS2WPBmKK3fZpLlN3oC5RCDg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9imfjbaP+nOU3gelpomCRmtFRvfy5pE92YCC6JZo84MgYVwfunzNGQRb2nfVsw7157rNbfT+wohn1/LdpD1VoH0k3NYr2YRJ9yRXBicTHJvlkGvEUM1iu9+IDAmlB/yzr9dX2Fj/L8OHfaEP8IXGcyA+MWqdYifgkRhhkClW/sxY44vkfS+h8xS099gWTXeNZEq2bfNs= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b69adbf-c88c-488b-ccdb-08da7cad102d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9186.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2022 21:53:17.9436 (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: /4mbsob6BwDZWVfZ4AxiA7g/l3DZUG+mEvoDnqRBB/r7Na6EQP/GQB6PrZIRI5qyGIIfg7h6gC9zz+9ROabpiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9087 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220812_145321_587514_D2DDA4A1 X-CRM114-Status: GOOD ( 13.44 ) 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. Signed-off-by: Frank Li --- .../interrupt-controller/fsl,mu-msi.yaml | 93 +++++++++++++++++++ 1 file changed, 93 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..f60fa8b686879 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml @@ -0,0 +1,93 @@ +# 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: 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-facing, Processor B-facing). + + 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: a + - const: b + + interrupts: + description: a side interrupt number. + + clocks: + maxItems: 1 + + power-domains: + items: + - description: a side power domain + - description: b side power domain + + power-domain-names: + items: + - const: a + - const: b + + interrupt-controller: true + + msi-controller: true + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - msi-controller + +additionalProperties: false + +examples: + - | + #include + #include + + lsio_mu12: msi-controller@5d270000 { + compatible = "fsl,imx6sx-mu-msi"; + msi-controller; + interrupt-controller; + reg = <0x5d270000 0x10000>, /* A side */ + <0x5d300000 0x10000>; /* B side */ + reg-names = "a", "b"; + interrupts = ; + power-domains = <&pd IMX_SC_R_MU_12A>, + <&pd IMX_SC_R_MU_12B>; + power-domain-names = "a", "b"; + };