From patchwork Thu Aug 18 15:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 12947287 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C1BCC00140 for ; Thu, 18 Aug 2022 15:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343541AbiHRPMS (ORCPT ); Thu, 18 Aug 2022 11:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344156AbiHRPML (ORCPT ); Thu, 18 Aug 2022 11:12:11 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2076.outbound.protection.outlook.com [40.107.20.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 888DFBD77F; Thu, 18 Aug 2022 08:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SpLSUfyEY2okFKNvyDJzPlhqGcjx1og0EkYo+5WVTIoUP9YGOznv6rzqfsRNzl3XjsrouSvTTXUxY/w+zmY1BOzy/L87BUQ9JWSZPR1NHg3e7JTAXJevvf08uL72Cn/35mSDgLPUzhel90Iq0phiS4DPubyXtctigYy7qYAMzfPvRDIudWCv0ifWbDz+nXsG3la7ucvUNo9k2v8q4B2HyGn6Toet79tOVv2qIs0Z/qb67AGa73qf/wkMbXRlVRI6fC5i0KOPRzvZN/NbfiJQFIiLkTmN8CQa1IbW53YmoylAobkgF5iwLPE/4aULM+Ls3Mg3w8KFW0DHAdbCWX3KJg== 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=OVFJJkHBYbxdRZKhWWlDd3nZUmM3IMXu087up/Kc5H4=; b=O5s6Pvtj2B9C4YCwtwG9rXb69LP6RtjKzb5sFlOo1bEnlfqZBoiRLU15gkCCf0UMb5aGI09wNZpLINf10lIsA/p8hys75vCYTwsuG9eIUzXl/3cSWxOlmFYD4IndssBUqv7gu3a2g+20PjcVIN78iX/cBPq7MlGJseJwedpMQ5fWNdnj9urfzlsPKrQOvvDlilMGbGIPEexez29jGBFtp5a1/ny4bWUBc3JKltbr7rXCUecoLoTle+MqU9LH/UhEX3QoReDbebO6F/ZswoRVuOiKRUG6AG6nSsvWcmVEliuhkwBIOZU846GAxbHhXZOKX8zKO2wNjEt8esDzJ0+s0A== 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=OVFJJkHBYbxdRZKhWWlDd3nZUmM3IMXu087up/Kc5H4=; b=E/ZPgUp/zqQkHgvNj0UJ65OD0sFOaeRGmOzk5qKNao5IHjAlfki+bvFRXniWsYNy3UnJlgw4tGMQvSnBTmCe6tg5/i6hDO9jY/L+WqPCOhBoRw+jvK0uR5PfAekSUDQbGyHMY5D1QGoEC0Q03L297ZRRqb/cdJN0YbWyWym0IT8= 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 AM0PR04MB5713.eurprd04.prod.outlook.com (2603:10a6:208:125::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Thu, 18 Aug 2022 15:12:05 +0000 Received: from PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::40a9:93e4:75d4:f73c]) by PAXPR04MB9186.eurprd04.prod.outlook.com ([fe80::40a9:93e4:75d4:f73c%3]) with mapi id 15.20.5546.016; Thu, 18 Aug 2022 15:12:05 +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 Subject: [PATCH v6 3/4] dt-bindings: irqchip: imx mu work as msi controller Date: Thu, 18 Aug 2022 10:11:26 -0500 Message-Id: <20220818151127.2449064-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220818151127.2449064-1-Frank.Li@nxp.com> References: <20220818151127.2449064-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0141.namprd13.prod.outlook.com (2603:10b6:a03:2c6::26) 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: 86e43333-e1b3-4fd0-57b7-08da812c02af X-MS-TrafficTypeDiagnostic: AM0PR04MB5713:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WDXnbX+NmEhXbbCh0soY36n1+mp636e/o7t78uHbjgvGs0gck+JKr001AWzefEKq3aGEaca4TGlFDROVBO3tjNjC1R02Ph42fn/La25Iuv4BOFksID+RKCRtcCNpru0vWyxANV0+3XJerofMjxoco7kicvG7J+l7tLwhSJVCQveUL5Z8SIMJwAu3+NxxBUPCJ1DgybGrhNw9+RllV2zP2xMUGuo22ThromRn+Mb9Eoj7WKX+MouJPpaMcDItfDtwrRJ9AjpHXNq7xX8cUQ/jPxd4MoS5IDUrd8do9v5CUSewyMfR5SnQRK3LfR4PpiKPotY2oXWKrsao/VrXQPps9OLPkbFMxMeWvwnno/RUtK2cuLJ3fi44uJh2By/JDuXcnDYejuWTPuQWKtAP4HysqNwYYIXAzTvdt9mQgUgM09B0yLXcyGpRbhcm5VuTiZLQoca9haZ8jVMR27yv1YlLEI3a4hHDXeGJAbzyH4auJ7HymLrm5QC42G9HADpS1UXv1DCD861ngomDDFgTqSIfaoigFkEqAveNZLFm2PNs3epxIFvBsAdcidRYo/EvtVKSOcrOILM9d6pjv18cnr/rL101BVIf/MYLxRIwotcWSCoaai3458mxnxQ+ac99stBbcdYCUXxjKglfuueO5gI1I+pjfY06Rk34kg00sX+MKR8y23AIlAhHFaXFCQAphf7f/F0bJnyzxROCt+yPP/RuF29VZnzxL7Je0jLKex3XSRRAchjcyXxOZZeax4Hv89UGI4nIAqvsfd7FqAn/R6w2sTlmeOpv/Xh2ej67YgsHuJUGeEuM8Jme4v3ZpTx61RcArX2kDWKWRmkv7lYuPQ2kEQ== 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)(136003)(346002)(366004)(376002)(39860400002)(396003)(2616005)(316002)(1076003)(186003)(83380400001)(36756003)(38350700002)(38100700002)(6506007)(52116002)(4326008)(66946007)(66476007)(66556008)(2906002)(966005)(8676002)(6486002)(86362001)(6512007)(41300700001)(478600001)(26005)(6666004)(8936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WEYjwMVq5NHj8Hm3CJ6Y/hnXKxPpXFDNtSqDOL/ntR5WeUGKdpMY4TynemOlEWEtZxghRqGvHVt5ZWm67gNmBO0zx31RS6Gx4gIA3/XDWdl0Ablx+oejNwP631ehvdUf92QdkrmaeJ+eIMImABszJfpmzcZxnJZQvVtKY5LNhzCegn++7aRlsvw0NTeanOdetAtkY+v2qyMvZrzQmjVeKqvF3Cvx5OdoEIOHcg3T8gVwdwVjZ/zCL95ubspcwqU0g5j7203z0hugADmsIfGDWkGickiST/hA/Z3tsoLwNcbV72lG4AX4LrLyy+maZOfvzxUlhOT9oyEZQr31rwszuNufsbSjhQGw18y0U5Jx1KZhxrICqmtuJr0Zuoo5OJwMfrUwMI86fQRR0zS44/8fo26GEvF/iweFoNR+5F5lAeOZBRC5pI6uIB61slzneVwtIJ2f1TMw2l8ZLoGoMyMx45oWwodnIco92GOjgSQ76ASejXdS7QrAlm8S5smMuGLUx5xv52iDiie5NKdTMDgveq6EJLlIFcCCNVmLrzxoRFy+v35nbUe8kXAaLu60rZVlZTks7M3AgV8yJzo= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86e43333-e1b3-4fd0-57b7-08da812c02af X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9186.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2022 15:12:05.1655 (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: xxaGMpG9UAw9kgszJwa36ylzNyD8m3VKKShSH00EzFyTi55gySMariJ6b42OpqvU8peD7Ua5yjIej5c9Y0o9+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5713 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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 | 98 +++++++++++++++++++ 1 file changed, 98 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..ac07b138e24c0 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,mu-msi.yaml @@ -0,0 +1,98 @@ +# 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-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: processor a-facing + - const: processor b-facing + + 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-facing + - const: processor b-facing + + interrupt-controller: true + + msi-controller: true + + "#msi-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - msi-controller + +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-facing", "processor b-facing"; + interrupts = ; + power-domains = <&pd IMX_SC_R_MU_12A>, + <&pd IMX_SC_R_MU_12B>; + power-domain-names = "processor a-facing", "processor b-facing"; + };