From patchwork Fri Jul 15 19:22:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 12919602 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 9A3F3C43334 for ; Fri, 15 Jul 2022 19:24: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: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=ytocrO1+M//+qsXHp6FlkqJPBIqFK2WJwVeCh/mBRHY=; b=DYgR/piJ06ly1F kXbD5xHj6CTB0TPxGDp/FtbEtl/rapOtc4b5e6eaUbDLmsOiMGXVB41MDITPZ3iGIjVLRnWN9f5h5 b+mvhKnK8XEYffuiMQXUXROrC75HRi6zsHQF1nwytRaSuUUpRrqSzM2Zhrb9zO1gejrk3wPcNzv3q afWXkuUZr2vG2+z3V3YhF4XuLN78r9iCv7NuDrNpU+xWQvji/dF0klpZXPeEoF+1DT9DYJIXFKMOV Y8WIKbJo5SX4uthrHQoc+ev8ENNKmtyTweurI/m0K89xJWBT63t1v92iEcsraKNyDeMGf+mj70whX JAnICiAzsSt9ud5LbyfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCQuK-009jPa-Fl; Fri, 15 Jul 2022 19:23:24 +0000 Received: from mail-am6eur05on2078.outbound.protection.outlook.com ([40.107.22.78] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCQty-009jFZ-L3 for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 19:23:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MVdRrDTR/MnmqEKRSDwUMXbDO4fCQrejRo1oAfNIlvJlOxq67NASM7i4wgdkSll+gBVX81rIhKem1psFjhlTLUD5OLhXtaco94/JE+OKp7/OxIJgM+mmxvo0lK2zC8aPcSDzVJHhCSy55qOyAsImq3jVb+HmvbG+eImRT8yO0AoH9+lCfmlX1Or3wsVUoph3Xo6YCQ5HsduuTIXlJxyiqjNI9LdH/3efiiCbeBVrfwFqfCzm9i2xVJhnM6dPbKT6tT9qe+YfqXYnbhVdO+4bBZV3pFlHZhYO/HddkJmG/02dC5rqSVlTE9SPUgjui1zZSnvllDVJrRNOj/ALak1tRQ== 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=9P0p0iFRI8WwaBrD60IFdem51ePNTmOiDYDu0Jf/RlQ=; b=GIUySnr8UW6uxwuDl+T9j+DU2cM1XE2o4CnhA1xgHgfpFrqqnhSray+ewDP0ljZazW5JZuephipS+UgQ+0MYTr1OuZWBCfB0sV6C8TqkvmyuNGQz3nBS2fYuqx61FCdVGGyeZeXP//nwYP1NtFSjMjNV64dtH9ukyRrz8DHFXpZCLAdC3CEKya19aaQuBaMmRdOdTZOBnX/4XD8fGMEXJlVwR8xieMoTbYX8TNUjxGNj2xiLG5ADBvmnKSkim/ay/sl19QHgBOX3y8CeJ68iXlQ0b2RhS+UdfnkmwW+GR6f2L3IbyFKd/Dgt9UwEaob08bOXW+THmFiqA+Q+96EIug== 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=9P0p0iFRI8WwaBrD60IFdem51ePNTmOiDYDu0Jf/RlQ=; b=QcFvL7cXPK7o4pYOoBl2BQdMgz+nowBQKrKZ676ihMeN9zzAjcnwujtZTgoMX1+VzTXBuNiTX21TXJcNqxcm37vf456Ot8jn2d4tf96aQU6jmb9oaLQ7I8q7JeKYZh632VhKMpps5jdnqtrxdAsYrMuwqF0urXjmRnyhf/9chpg= 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 HE1PR0401MB2490.eurprd04.prod.outlook.com (2603:10a6:3:82::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Fri, 15 Jul 2022 19:22:59 +0000 Received: from PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::54aa:b7cb:a13c:66ab]) by PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::54aa:b7cb:a13c:66ab%7]) with mapi id 15.20.5438.017; Fri, 15 Jul 2022 19:22:59 +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 Subject: [PATCH v2 3/4] dt-bindings: irqchip: imx mu work as msi controller Date: Fri, 15 Jul 2022 14:22:18 -0500 Message-Id: <20220715192219.1489403-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220715192219.1489403-1-Frank.Li@nxp.com> References: <20220715192219.1489403-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0084.namprd13.prod.outlook.com (2603:10b6:a03:2c4::29) 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: c645b626-7fbb-4bec-291d-08da66976d9d X-MS-TrafficTypeDiagnostic: HE1PR0401MB2490:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /qBjUT5253lOqAnSRNqS78r0dhlAAzAS2ZXydn9vH8IZdo3YNy7/bWvGMXKcm3Bh3DRbMwlME0C/k3SfndbMsInh0OXV6jMl9eJR7b2J8PQ9Lo2M0HIP+XGGD76BETw93FhI3RpcfKMQ/ziOApVGxKI7hMwNCbpvT7j0THgvmc1Vlc6k8iejJQd2q0kU0kgrvvGjEGvbeg4+ZL95zjj5KOBoHWfb4d3HCdNKuQfl2Acd0xJ0/2fomzPVGbl54Nu1LtjHdBFeSy6o/BpNg7BfllCHuEH3CMIxljhG1P9q9Nau1ToQ+z2hfHxopp652uqvaXoktChpSsY4FQ5HPF4svd2UhnydB1Wd1KCHWhmnyMob7XvRV/g5QINWleJ0X6oOLwXGFat83n8LGFZ/bUdERUL8LWt/bx4/zCUZ6dHqtM8F1ZEP3yrutLl4pxw0U0+FfzMchnFZBzAlax3qMg4Qz+01cFOotG+kQNjcdPaZRqeF4lvpnX5A/zT34jOA7jeBMHi+5PVihDLhjiAC+QVGZrKERd/B/A+y3UrvcbnOlau7/uji3wmN95Wfi7VFpxq493C7Xn5Bj6joKVfhi2wIQ9+3jiuASjYQoNBo6XYPHOERfHbc+IcXMbqHfUM6HB4AC+Ip2jjoX9Ay4ZD/zJUROrIPMmWX6BzMh0M7QBVtL3TbfeveYkUYNqzAGuP5lvCrdC0RCDwh7pcxc1dLmqUAVSt3mdcW+0AnPPtJTtiXO7ypO1pb6xH5J5sJWqFpRt4QDIaqOojpZAaFZgV1Ir0qicqPKLpcvALfD6kT2qtdzAiSHkwzLb7TllL6341KldmTshg/gbWe31DxPfT6DPWx31apWvnNDq1bZ3yEzgBGMUq+vk0n5fH1jm/mLpVPJTil 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)(396003)(346002)(39860400002)(376002)(136003)(366004)(316002)(186003)(966005)(5660300002)(86362001)(8936002)(66476007)(66946007)(1076003)(66556008)(6486002)(4326008)(8676002)(6512007)(2616005)(41300700001)(38100700002)(38350700002)(478600001)(26005)(6666004)(6506007)(52116002)(2906002)(36756003)(7416002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XjZWsSnmcXA/gxqWul7qNlTFBJGZQPvogs07RXG8fnm5KJwQcpRHjT6MkvmvGxg/lKOOuq2kgIHOdYnqZMeiIE6jPSb5YD/1zu7cyBlpGEnkWDf2AHVHqebJOqsOohpkeSvqMsAi/T6npQNIup53m9SrRMzHr3Ei2LOsRnSmvmU5ZL8kTuyrK6qtgd++BhlECx2YNLSxwKNQFycj3fQohjFooRNdpPhuiLkC5JVghzUKa5v8pgHftWdNGKhoW9DAURwBlkGXXS7ts/f1xEgQt09dbT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+d2tMcLqu/OCr1y00TsJSU+U41M/FZj99uqfKdKfDu1i7Ke8DUcEpOOjxeYexVTL2OIZ9hIzuZV5GviEvcOHlzJkB5schVMpW7pmFLyjb0l84RltntjxvJN1ynpSdyTVD1aWnOkQTVY6Cl5PpYreS4gbKlSoR3lTn4Y9ht1Vj9DdlxneXoGKLGRbZLs+5QzQO2bndN3TWaNNFlo= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c645b626-7fbb-4bec-291d-08da66976d9d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9186.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 19:22:59.3175 (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: WGASoGaDsu9IrPMPHRGxXfwNkTdeKeC47IEPQMyiZ4sDF76UyUbDNQCcx1vK29jB6HRZiChM11gCH+EUCMs6cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2490 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_122302_744398_77C34F77 X-CRM114-Status: GOOD ( 12.70 ) 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 imx mu support generate irq by write a register. provide msi controller support so other driver can use it by standard msi interface. Signed-off-by: Frank Li --- .../interrupt-controller/fsl,mu-msi.yaml | 88 +++++++++++++++++++ 1 file changed, 88 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..732ce770ac3bd --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml @@ -0,0 +1,88 @@ +# 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 to signal the other processor 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.yaml# + +properties: + compatible: + enum: + - fsl,imx6sx-mu-msi + - fsl,imx7ulp-mu-msi + - fsl,imx8ulp-mu-msi + - fsl,imx8ulp-mu-msi-s4 + + reg: + minItems: 2 + + reg-names: + items: + - const: a + - const: b + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + power-domains: + maxItems: 2 + + power-domain-names: + items: + - const: a + - const: b + + interrupt-controller: true + + msi-controller: true + +required: + - compatible + - reg + - interrupts + - msi-controller + - interrupt-controller + +additionalProperties: false + +examples: + - | + #include + #include + + lsio_mu12: interrupt-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"; + };