From patchwork Wed Jul 20 21:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 12924531 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 6809EC43334 for ; Wed, 20 Jul 2022 21:32:52 +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=HlWpXnhzjS01wLAd+QuEsS5ayy1UJGeb43idChngezc=; b=PIqkMs/5rxKYA4 M4j1PCwjEM1OP0OKvh1q3rkrSLZB8BaLC9bbUBd3uFVr6m2ZKuq9x4rS/7FSwKBhQ7SW/dgc6gept +ya6uy/slGahJCmZJSWJIaQI38YmvfsB1DjfXitFEX+UFPh6z0TwR3O3HLkh4GawCsv5V7s27flYf pAvPt27DL+cvYP3UTfpCFF0q61gQUzz02gn+5MPCYQJWR0ubEYK7e+/+rLxU7nocdInjO24uIS5rk lB2P+kfJffdnFjC6S5NVu80GluEfsPEK9S7mVGBXLXK+mB+aUCW2jc9LnOKJ4ghRRItuMLmLy6dkc dPCCFAbeoO42+oQrZ2Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEHIF-00BUvZ-4q; Wed, 20 Jul 2022 21:31:43 +0000 Received: from mail-eopbgr130081.outbound.protection.outlook.com ([40.107.13.81] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEHHq-00BULX-Oj for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2022 21:31:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lIILyRtfj5I+MUq58laD7y8LxAKf/EeNdPHD6oF9HQnDVml9lgheq253Vq5MQNFyB4EwOKhVTyIkWd1jEkhjOAGl/JoXfG052MDYdrCh42Gf9EUS1gk7H6EmwH7LMyrmkxqPajHcVVg/RyhRPeyF4Em6UGQ6PZk3Qf5ofryJFem5/UtZNDqB0LVMw0UUsJtX6fFlOwLlhs47h5mlJqg/mXGxcTdMPC5+9fra+hkjap3LJEB7wJdhCkS45q+xNNL8X1SovlymJgd9xOGw76b3EncOp7d2uq+whjYAI7rph7AW6WHC872CUlVCeWCTSEUYuEoXFrBvlA5NAUWsVArR9Q== 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=FkwQ47gYhSAEPm++wPMu0IyfyIHL4r7W3jd+aeYHTnk=; b=A57rQvMAaYyaPrhkUQ07FLyWcR8y3HNxI/lMTdGHaDGcB0rxftpWkXvwHrfCnxrkXWArTv99X0Or5n0fx3rOh2dMzj3WxogcZMsyIafQwpKHjIIqvNAI3RlutJzyPghsNF84qyeQq/mmM4salqqYWsU9hgZ6Qj7wIS+jVbw06ojn0Ukea1Z0jpQwKVMz3X7dJMkYaoGgJ35d4vxiZ/AwcUNx5QmMxL6mA0cJppMwbpIDKwK8fhwVrhUmM+lzZaU9hurBkN6ERmStIJJog7SOW2JSfyZLDkfFg3nWW0F8u0wUqX1kV4XNMQ9BAbqLGi6McYzqoWXltkHJzEwMAVXJ3w== 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=FkwQ47gYhSAEPm++wPMu0IyfyIHL4r7W3jd+aeYHTnk=; b=fP3RE8db0GgY0JDrd0rwa3ktDuqvCiPmbu/VCYjIahKlruiQGodHJS8F2JKiBbaZSWjeV+Yot9mpT4cvL03P+p72/RUY6D4odTuDCXq4iX+KGjneZ7L3o8Epdkh9A0+GWNayXR/VREsqvM9MNqT+20CTmNePJ+NnvKzuAD6FRnE= 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 AS1PR04MB9479.eurprd04.prod.outlook.com (2603:10a6:20b:4d7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.24; Wed, 20 Jul 2022 21:31:13 +0000 Received: from PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::54aa:b7cb:a13c:66ab]) by PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::54aa:b7cb:a13c:66ab%9]) with mapi id 15.20.5438.023; Wed, 20 Jul 2022 21:31:13 +0000 From: Frank Li To: jdmason@kudzu.us, 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, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, kishon@ti.com, lorenzo.pieralisi@arm.com, ntb@lists.linux.dev Subject: [PATCH v3 3/4] dt-bindings: irqchip: imx mu work as msi controller Date: Wed, 20 Jul 2022 16:30:35 -0500 Message-Id: <20220720213036.1738628-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220720213036.1738628-1-Frank.Li@nxp.com> References: <20220720213036.1738628-1-Frank.Li@nxp.com> X-ClientProxiedBy: BY3PR10CA0005.namprd10.prod.outlook.com (2603:10b6:a03:255::10) 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: b54f57e2-39fc-4645-48fb-08da6a972bb8 X-MS-TrafficTypeDiagnostic: AS1PR04MB9479:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Eqe4MlNXG2K90gu0RHvdBhi2f8E7nxvuV3SXUQUB0fKQEVejx6cGIyVODeqeLBS2jBLm45ogIS7JTANHoFeP/MHCm347kg/wt6ZAMgnPj5QvNMWO4wqZOrZMrhW0IARai3WwWZoG3eaymmEMlXnMIaR9bcMOwlGVwrESp2XtR/5fePBJRD75ClSuoDB5GIxU+WHd4CPMI/HwNUIpNAKcGRafhavqAbdC9W3b4v2hL9PZCvdI0Ui83VNFI0etPGuiJxJKAIEollwpOTXM901yBjjPvh0mGvvKQQL8LJ05aj0FUK1VVYyP+YuJRN7qCIRd3RDe6pSNnQKNuQpOaXSIE1DaDry6V+079zNvyvnze2wm+kl7nFUZcV1D7aV7I41d6vyytserBg7PQt1TV7axFdEMyhgcC43ANDnfhHxPWg3aqW2bVaGSQkyOJUJ1331w3nEMsbVfYxSAB5EKcotrjAUTbkQafhkwHujN+g6A90velrYFdpYWQ33WRvM1p1WLkD5bcGXDlXbUVqNutdzN6mXKuRtBnAICRlHNvTO+NGjsPOrvXHxIFaTlj2iOoBoiEy/8+rrTHkJ4n/dpBkSW3FlI0mTj58bLx0sHsWURKQuCu7f9z8RJ06Bj9+hueJsctwxZTCecH4FoTK5ZwOnmPqKgcCxCdDH8z4iiIqjfcv4Kc/W2I1HDhkldmSpTfU0Avo+59HzjUbj81ZY5dlIE0C/kJQoEphqwrXHE2Q3APKlEOvNmIBDl2PtIRSMSgFCerfXmxLzwV5iZ7h+lq8uh9G2gSvgxxmP+oy0lf9vI2pw1NE0FSNGVfIUrVUbdkK6DLcQgiv9SfyUg06oXwu5ouP5x14Z1yKLCcBr8aYX4P64= 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)(346002)(376002)(136003)(396003)(366004)(39860400002)(4326008)(66556008)(66476007)(36756003)(966005)(83380400001)(6486002)(86362001)(8936002)(478600001)(5660300002)(316002)(7416002)(66946007)(1076003)(6666004)(6506007)(8676002)(186003)(38350700002)(41300700001)(38100700002)(52116002)(2616005)(2906002)(26005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sICVCEl2gI88gd51hQf9zw3vggrF5b5yMej4H14ogNq2qbs42FsYT7v6XqrnLKZ5QvXGEAWxZYgzs4OPrzKVOP2YHwfB4E2RRYZgAWx5AedXFc9GPJ48hAR808yVAmafzsWFrz8Tf3cVfS156n376wPZGvk0Cw0NKtcb/8RRtZFDHZ1rqqDx+hocu8o95P6yLBsff82vqXLxoS+3hLNvY0cNlzkqhqxwRI7J6R84TqvWgDFWPk+k0E/fj5QD8wLl7G0n/o2QymkMy/A+6AQvRNf1iwFTGvuCe/nJ048IEwmXgFWoNLTBgFiOY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Hvr1oHCMlSzAXDQEYX8wrTNbh6hqV0BDcQ3iZBoXoU4h2Qxn5Pwov47ZyWZpqvWgqOXQ+AWeFieVnUZ0+/s3lUTcG0cUk1ighla2LhG8bXlkaBd7EPr6WE7hx3LCFkAV2fuyIFyFzGs8UmfkbcnvHAMb7c6AwCLX1jB+inPGz5kFqNU= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b54f57e2-39fc-4645-48fb-08da6a972bb8 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9186.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 21:31:13.4168 (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: yO/XoPUQTTB2uV80xgypaculIhP3AUuAouvYQPhWE5RMMzTNH9lXVL949yoxKCYJ/BWdkXKA3su6Q4loM77x5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9479 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220720_143118_876270_457C58BC X-CRM114-Status: GOOD ( 12.57 ) 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..e125294243af3 --- /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/msi-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: 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"; + };