From patchwork Fri Feb 16 09:47:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559742 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 4B0E8C48260 for ; Fri, 16 Feb 2024 09:49:54 +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=s86+yOxhO2UhH+OX9l+Slig4CrsQXfd7eCdn0NWPZP0=; b=x9eaUixwnjXSh2 9kJ3+FUOeq/jh8hiY4ZXgFUTbtL1K/3BtaEUcy8fS82XIHynwNbUIYPMc7Fw7gBehsKBqtxwEo4Nu QbCspgARUGg6l9KZW7BH7n25yBaS6qxKJXmzBx0QwLZ3r5fDTMULpRIOULDfL7Xnb3mqA8XiKBZ0Y FTaypCYtMpZ9hYXgDtK4VsHLXHAPBnjeJ9lBj2NLj3k2cvodutFLWXJCCbVZ6AS7zn/Io37c+xDj/ 9F+kAk5SariS/RxCtu0qZwVaUd8fGAnXZRiYLdQF6UlvUWuW9/yRI71LxxPPqZKH8cZVwrPWEMYpE TxhZH0mEsK7CmL6PGKCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqk-00000001n7C-1kZG; Fri, 16 Feb 2024 09:49:42 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqV-00000001myB-1Yya for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:49:30 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qHJU024968; Fri, 16 Feb 2024 10:49:07 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=6oy4aiUMKITAZcOmFqBjM6ZnhYNqhJFyPyPaNACQD3I=; b=Rb ZppuBSKRCfE/AbEaqxNqIA71yVxaQPb2Z5/M+GS+P4mUIe+YW02k722ObMuEbe9T EKAdxPvUcNWa4tPtIBTF7CBh2yzARnlJgrDLsnjy58nbPJEfaqaUStz/Gxcph/oW SbcFLnG1bKeK/5lESmWN61uv1VPCAi5hAk8Oavo4xDdpll5hX3jxhLoXJyQewWMb RdBiP6f2X7UVqApIaYeP18BxT5e/zbFYdYZattcrl9a1ykHP/cZMl5hA1Y0+Y7kC 168z3S1YxlIx7xPs7QeYXnfPcr1zT1GbDFIwFv9CwH+y7Jem0gytKix2lkHFkl+I yp0MrKV+veearNGx3GuA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3wa126gy3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:49:06 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 89DB340048; Fri, 16 Feb 2024 10:49:03 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 3D0A8237D75; Fri, 16 Feb 2024 10:48:18 +0100 (CET) Received: from localhost (10.201.20.114) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 16 Feb 2024 10:48:17 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , , Fabrice Gasnier Subject: [PATCH 02/12] dt-bindings: interrupt-controller: stm32-exti: Add irq nexus child node Date: Fri, 16 Feb 2024 10:47:47 +0100 Message-ID: <20240216094758.916722-3-antonio.borneo@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216094758.916722-1-antonio.borneo@foss.st.com> References: <20240216094758.916722-1-antonio.borneo@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.114] X-ClientProxiedBy: SAFCAS1NODE2.st.com (10.75.90.13) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-16_08,2024-02-14_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240216_014927_741252_0BCE451B X-CRM114-Status: GOOD ( 14.87 ) 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 The mapping of EXTI interrupts to its parent interrupt controller is both SoC and instance dependent. The current implementation requires adding a new table to the driver's code and a new compatible for each new EXTI instance. Add to the binding an interrupt nexus child node that will be used on the new EXTI instances and can be optionally used on the existing instances. The property 'interrupt-map' in the nexus node maps each EXTI interrupt to the parent interrupt. Align #address-cells and #interrupt-cells between the EXTI node and its nexus node. Signed-off-by: Antonio Borneo Signed-off-by: Fabrice Gasnier --- .../interrupt-controller/st,stm32-exti.yaml | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.yaml b/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.yaml index 00c10a8258f1..1a4cf9537b9e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.yaml @@ -26,6 +26,9 @@ properties: "#interrupt-cells": const: 2 + "#address-cells": + const: 0 + reg: maxItems: 1 @@ -42,6 +45,24 @@ properties: description: Interrupts references to primary interrupt controller + exti-interrupt-map: + type: object + properties: + interrupt-map: true + + interrupt-map-mask: true + + "#interrupt-cells": + const: 2 + + "#address-cells": + const: 0 + + required: + - interrupt-map + - "#interrupt-cells" + - "#address-cells" + required: - "#interrupt-cells" - compatible @@ -89,8 +110,27 @@ examples: reg = <0x5000d000 0x400>; }; + - | //Example 2 - exti2: interrupt-controller@40013c00 { + #include + exti2: interrupt-controller@5000d000 { + compatible = "st,stm32mp1-exti", "syscon"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x5000d000 0x400>; + exti-interrupt-map { + #address-cells = <0>; + #interrupt-cells = <2>; + interrupt-map-mask = <0xffffffff 0>; + interrupt-map = + <0 0 &intc GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <3 0 &intc GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + - | + //Example 3 + exti3: interrupt-controller@40013c00 { compatible = "st,stm32-exti"; interrupt-controller; #interrupt-cells = <2>;