From patchwork Fri Feb 16 09:47:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559738 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 3155DC48260 for ; Fri, 16 Feb 2024 09:49:40 +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=d9rIvZSp33xFBrqROiiwSqCYyg1UheVh4JL013aSFm8=; b=UhVNvfdsbTWlyG XqrpH7ICQdzzIIk3VzsR1R4hXAELD5h9nZL3Ca7qClHdLUFafte/DKtGEnpEqAeehxva2wbu1D0AR 1hRNlw+BvSdjtHnK0WuGgykc99LjH2YHK66cvXk3+IMgESYdEchIKujHR/r6/nsZ9z0OnyiWD3ZK0 h+6dmNzfMplZsTbwLRpdiU/qJPVlVOhxqcxzhWpQ5p1F+lJpHmeYwJN2vGEhykb/JTpba95z23lPy a7DJlgEYz14jL2inJyoIVI6dK17MB0+Q1X0NvzBn/43ZMcni5JDsiHrbYpQGwcR5uiOCe5+BFTqfE lnNN/3Zv+uF285bdcRyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqX-00000001n0E-1cz8; Fri, 16 Feb 2024 09:49:29 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqV-00000001mxp-0B54 for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:49:28 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qEBw014621; Fri, 16 Feb 2024 10:49:06 +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=faFMPHLHUFEef6pRo0+gjlsQKw/4z5M29dcTxIdWFoo=; b=QN roi0dE9l84Wf+oo70n6PUmc/eR2TSrBwoo+EUOWiCuKSBP88EaS99f5N6xSuYMAA MLW+aGadoFJt2qsXZrF27+YVR8aqDkug9F168oOnl3xotQ8d8YKXLudBgGdDN8iV Bv6LeHWyCPFFdNXbn40Rp132EAMSvQ3PBDAXdldg3vtK8dEDAm1xV4hYBHFZqeYh uW3WMevQbNQhi3jUW/s7l35ysBoiZxW+MfkchLN3VwMy26rr9SI8+WsXvcbDyOHo VgayKg0kdVMZ0iwcSIDevLLp+cFfBqXE7ikpZPxYtqswb26yRphqug4De7d2isH9 LimMWR8hJ/9l7DGe2AhQ== 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 3wa124gy45-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 430A440046; 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 99A5C237D74; Fri, 16 Feb 2024 10:48:17 +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 , , , , Subject: [PATCH 01/12] irqchip/stm32-exti: Fix minor indentation issue Date: Fri, 16 Feb 2024 10:47:46 +0100 Message-ID: <20240216094758.916722-2-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_483266_BAD50BD0 X-CRM114-Status: GOOD ( 10.86 ) 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 Use only TAB for indentation, removing a leading space. Signed-off-by: Antonio Borneo Fixes: 046a6ee2343b ("irqchip: Bulk conversion to generic_handle_domain_irq()") --- drivers/irqchip/irq-stm32-exti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 971240e2e31b..69982f21126a 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -322,7 +322,7 @@ static void stm32_irq_handler(struct irq_desc *desc) while ((pending = stm32_exti_pending(gc))) { for_each_set_bit(n, &pending, IRQS_PER_BANK) generic_handle_domain_irq(domain, irq_base + n); - } + } } chained_irq_exit(chip, desc); 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>; From patchwork Fri Feb 16 09:47:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559739 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 7031CC48BEB for ; Fri, 16 Feb 2024 09:49:40 +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=IeZ09DPcK/fH30cveAXaBhDoGSGGdrolCp9zinZTers=; b=4BUs5uMjgWojWy i6bk560b9tIMx4oS2spe1w2gAiXS/wehaNgpiVZreKAR56GvJe+jiowRJ3wNhnCr5Ep+aRe61/YFO zivASOJh4ygvh21eteVBT+ZjqKOHSrbMUEHA7HJC5Le2DYR1dbcJoNINfwdVU0bG1ECyvwl5TRIVd vTaDNrL2UQ5CxN3YkTUZfLuvOEQMQf0uJn9mnL0fYPSM7wRHHlDHnSWFzP42M94KnKe4MZYdsVTCb HZw2qguv4gXUskP3H/nN7xAzTW9zihIAZc9QjXRdftB/B9X76cl4MvOesbewGaaMnuCt+X0pMmKxk 5NPIXXzQJ498dB5uNyBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqY-00000001n0U-0iNR; Fri, 16 Feb 2024 09:49:30 +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-00000001my5-0AKz for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:49:28 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qrbW018706; Fri, 16 Feb 2024 10:49:06 +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=CQbKI3q6/SH3YpK3aFqJIfLPoWvnVZQLDfz/UiKph8I=; b=Nx zL8TLZiZUowQPsg3IhFKrjHe1qZJ+qJYCC4fd+uGeJ6aJX901VAQF0X/cpMqxL6Q qZFhVP5PZmjzzH8pjq6E9Fr3f/HEgTMASYPMuHEuGpSODs7EUOeDOarVuxnj9Tvy Bmsj1oQ6aEuZipkkUwhWku8BIQAJswMo0gO3DIimuzvj0fuBg6SdHiRcYwmY471J GaqMawXT8gVUZhP3kMWCpkED8l4Qz7WYIJniWONeyPYT6O1EMO5EOH6krZ+uRkVG uod9dQ4yAQO1E0mxE6C5dqFEX9UFzWK8VZnmvPfeQ8mgu593EuU8qJMfyVfHo+NH LKCeXX8ESOt1z1FrC5QQ== 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 3wa12ary49-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 60E6040047; 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 D1539237D79; 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:18 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 03/12] irqchip/stm32-exti: Map interrupts through interrupt nexus node Date: Fri, 16 Feb 2024 10:47:48 +0100 Message-ID: <20240216094758.916722-4-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_498416_D057A53D X-CRM114-Status: GOOD ( 17.13 ) 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. Check for the presence of the optional interrupt nexus child node and use its property 'interrup-map' to map EXTI interrupts to the parent's interrupts. For old DT's without the optional nexus child node, the driver's behavior is unchanged, thus keeps backward compatibility. Signed-off-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 69982f21126a..95bb3dd10b2c 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -61,6 +61,7 @@ struct stm32_exti_host_data { struct stm32_exti_chip_data *chips_data; const struct stm32_exti_drv_data *drv_data; struct hwspinlock *hwlock; + struct device_node *irq_map_node; }; static struct stm32_exti_host_data *stm32_host_data; @@ -713,8 +714,9 @@ static int stm32_exti_h_domain_alloc(struct irq_domain *dm, u8 desc_irq; struct irq_fwspec *fwspec = data; struct irq_fwspec p_fwspec; + struct of_phandle_args out_irq; irq_hw_number_t hwirq; - int bank; + int bank, ret; u32 event_trg; struct irq_chip *chip; @@ -731,6 +733,25 @@ static int stm32_exti_h_domain_alloc(struct irq_domain *dm, irq_domain_set_hwirq_and_chip(dm, virq, hwirq, chip, chip_data); + if (host_data->irq_map_node) { + out_irq.np = host_data->irq_map_node; + out_irq.args_count = 2; + out_irq.args[0] = fwspec->param[0]; + out_irq.args[1] = fwspec->param[1]; + + ret = of_irq_parse_raw(NULL, &out_irq); + if (ret) + return ret; + /* we only support one parent, so far */ + if (of_node_to_fwnode(out_irq.np) != dm->parent->fwnode) + return -EINVAL; + + of_phandle_args_to_fwspec(out_irq.np, out_irq.args, + out_irq.args_count, &p_fwspec); + + return irq_domain_alloc_irqs_parent(dm, virq, 1, &p_fwspec); + } + if (!host_data->drv_data->desc_irqs) return -EINVAL; @@ -908,7 +929,7 @@ static int stm32_exti_probe(struct platform_device *pdev) { int ret, i; struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; + struct device_node *child, *np = dev->of_node; struct irq_domain *parent_domain, *domain; struct stm32_exti_host_data *host_data; const struct stm32_exti_drv_data *drv_data; @@ -976,6 +997,10 @@ static int stm32_exti_probe(struct platform_device *pdev) if (ret) return ret; + child = of_get_child_by_name(np, "exti-interrupt-map"); + if (child && of_property_read_bool(child, "interrupt-map")) + host_data->irq_map_node = child; + stm32_exti_h_syscore_init(host_data); return 0; From patchwork Fri Feb 16 09:47:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559740 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 DB46EC48BEB for ; Fri, 16 Feb 2024 09:49:49 +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=bSuuhjoJXvQoVVLmZhG7K4wED3aBNDxtcK0N11yi7go=; b=rHwzR5e3EP+f1x W2oA5moRrdXZFz7Nrq+OB/horjIxjrSRLi/HOCXmgGyWSreKkZdddmocaw6sD+O94u24sxgRfdDxY DINGKwRrOoYgmGZRBfKkt8Z+GwR7Gf9JcvOi8bJB7xme/Om79cxlgZuHeChez5ah9McMmQzmXFLVR PjZOr3JsCI1DLk+vSOozelxaPtaKqx49OrQ+gTUuWBJaIpY0afIXo98RaY7R+n38JRtP2AtmAhiVP Hk9sBuMTFzfEYXm5ZwOQEr9tiXdmD6O+ow4+h2Vhn1p12t4uu1NEkwz9nk3S0PRhswAVZq58BBRzg tSLPl+OadMTqf1FPS4vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauqj-00000001n6Q-1WeS; Fri, 16 Feb 2024 09:49:41 +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-00000001mxq-04Nl 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 41G4qHJT024968; Fri, 16 Feb 2024 10:49:06 +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=TGty+ngzeg7A5dCR3wVNlt1JicJKb8JKWR8Q6qrUtAE=; b=YV HE4ir1DmdHjnsMXcsmBrMmUeeUhIThLa1M0gqcZek2fdMu2f0d35ykitVYQ+vZ/o rFoAyVjTxceQhogfVUZGJGSLiPn1TSq9YHsWNM+OFNbnAGtksep8+az6cLbw/aC3 /HLugvdZGWKwaSmtkuVtjqsyfvVuGNPDV6xr5ierHx/bq4z6M7U95L8dk+yElvm5 2P2ZFGX9QPY/isp6KzURnz/xgrW2UuIaJPvZuQ4qNaOxMVj2Rlgq4wH6MZzJbzXx y+EJwVqOEVitsP8Zuyxlgv2l+2owNyqYMqP4BIJsHfdvpC/y0xWxwtpKnmQuBqVi 2JGcYKbtiHEZiO6l8enQ== 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 3wa126gy3j-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 10C414002D; 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 685D2237D77; Fri, 16 Feb 2024 10:48:19 +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:19 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 04/12] irqchip/stm32-exti: Convert driver to standard PM Date: Fri, 16 Feb 2024 10:47:49 +0100 Message-ID: <20240216094758.916722-5-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_490284_9AD737B6 X-CRM114-Status: GOOD ( 20.80 ) 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 All driver's dependencies for suspend/resume have been fixed long ago. There are no more reasons to use syscore PM for the part of this driver related to Cortex-A MPU. Switch to standard PM using NOIRQ_SYSTEM_SLEEP_PM_OPS, so all the registers of the interrupt controller get resumed before any irq gets enabled. A side effect of this change is to drop the only global variable 'stm32_host_data', used to keep the driver's data for syscore_ops. This makes the driver ready to support multiple EXTI instances. Signed-off-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 58 ++++++++++---------------------- 1 file changed, 17 insertions(+), 41 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 95bb3dd10b2c..de18cddf6b88 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include @@ -64,8 +64,6 @@ struct stm32_exti_host_data { struct device_node *irq_map_node; }; -static struct stm32_exti_host_data *stm32_host_data; - static const struct stm32_exti_bank stm32f4xx_exti_b1 = { .imr_ofst = 0x00, .emr_ofst = 0x04, @@ -622,50 +620,32 @@ static int stm32_exti_h_set_affinity(struct irq_data *d, return IRQ_SET_MASK_OK_DONE; } -static int __maybe_unused stm32_exti_h_suspend(void) +static int stm32_exti_h_suspend(struct device *dev) { + struct stm32_exti_host_data *host_data = dev_get_drvdata(dev); struct stm32_exti_chip_data *chip_data; int i; - for (i = 0; i < stm32_host_data->drv_data->bank_nr; i++) { - chip_data = &stm32_host_data->chips_data[i]; - raw_spin_lock(&chip_data->rlock); + for (i = 0; i < host_data->drv_data->bank_nr; i++) { + chip_data = &host_data->chips_data[i]; stm32_chip_suspend(chip_data, chip_data->wake_active); - raw_spin_unlock(&chip_data->rlock); } return 0; } -static void __maybe_unused stm32_exti_h_resume(void) +static int stm32_exti_h_resume(struct device *dev) { + struct stm32_exti_host_data *host_data = dev_get_drvdata(dev); struct stm32_exti_chip_data *chip_data; int i; - for (i = 0; i < stm32_host_data->drv_data->bank_nr; i++) { - chip_data = &stm32_host_data->chips_data[i]; - raw_spin_lock(&chip_data->rlock); + for (i = 0; i < host_data->drv_data->bank_nr; i++) { + chip_data = &host_data->chips_data[i]; stm32_chip_resume(chip_data, chip_data->mask_cache); - raw_spin_unlock(&chip_data->rlock); } -} -static struct syscore_ops stm32_exti_h_syscore_ops = { -#ifdef CONFIG_PM_SLEEP - .suspend = stm32_exti_h_suspend, - .resume = stm32_exti_h_resume, -#endif -}; - -static void stm32_exti_h_syscore_init(struct stm32_exti_host_data *host_data) -{ - stm32_host_data = host_data; - register_syscore_ops(&stm32_exti_h_syscore_ops); -} - -static void stm32_exti_h_syscore_deinit(void) -{ - unregister_syscore_ops(&stm32_exti_h_syscore_ops); + return 0; } static int stm32_exti_h_retrigger(struct irq_data *d) @@ -792,8 +772,6 @@ stm32_exti_host_data *stm32_exti_host_init(const struct stm32_exti_drv_data *dd, goto free_chips_data; } - stm32_host_data = host_data; - return host_data; free_chips_data: @@ -919,12 +897,6 @@ static void stm32_exti_remove_irq(void *data) irq_domain_remove(domain); } -static int stm32_exti_remove(struct platform_device *pdev) -{ - stm32_exti_h_syscore_deinit(); - return 0; -} - static int stm32_exti_probe(struct platform_device *pdev) { int ret, i; @@ -938,6 +910,8 @@ static int stm32_exti_probe(struct platform_device *pdev) if (!host_data) return -ENOMEM; + dev_set_drvdata(dev, host_data); + /* check for optional hwspinlock which may be not available yet */ ret = of_hwspin_lock_get_id(np, 0); if (ret == -EPROBE_DEFER) @@ -1001,8 +975,6 @@ static int stm32_exti_probe(struct platform_device *pdev) if (child && of_property_read_bool(child, "interrupt-map")) host_data->irq_map_node = child; - stm32_exti_h_syscore_init(host_data); - return 0; } @@ -1014,12 +986,16 @@ static const struct of_device_id stm32_exti_ids[] = { }; MODULE_DEVICE_TABLE(of, stm32_exti_ids); +static const struct dev_pm_ops stm32_exti_dev_pm_ops = { + NOIRQ_SYSTEM_SLEEP_PM_OPS(stm32_exti_h_suspend, stm32_exti_h_resume) +}; + static struct platform_driver stm32_exti_driver = { .probe = stm32_exti_probe, - .remove = stm32_exti_remove, .driver = { .name = "stm32_exti", .of_match_table = stm32_exti_ids, + .pm = &stm32_exti_dev_pm_ops, }, }; From patchwork Fri Feb 16 09:47:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559743 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 0565BC48BEB for ; Fri, 16 Feb 2024 09:50:35 +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=ddF9vrMhA6ToEjzMoW7YkX0FDA/pPdAW/xe/AoCAHf4=; b=tsGixRmLRJPIfG 1W36ARSmQYwGE230imqmU+PC+whwxxcYuP12MJx3HvdQD7v+a3Zt8h5KvAJiEdpyE4NhS6/8B5JMT 65VhN4uKGDDuF8CDY+WM1AAfxpw1dJScR4zNHF+/IZEaeB57sczMLsRWyLkCOWhPzuMY+vz9wVZTi 1F04xI0l2V3iMExGUrm4AvjX9OUJgSsqtF6Vc9UxgkjeC+Uv/rJfVrO54/OZph1dOsEZ3J7OQYBCe iNxkY+/P9Qg3foziQjVtiIDTDwLHouRV8LEFzB7Jc9B0xGgFMmOBgm77bUrxeGXvN9fBVTWYEXRXK SZbFK/0SKwbR3KuSR22g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurO-00000001ncc-3y9Q; Fri, 16 Feb 2024 09:50:22 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurJ-00000001nWy-2UbC for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:50:19 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qEC7014621; Fri, 16 Feb 2024 10:50:08 +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=wXNfPpiAtMSvOZBWcNaTSHdLVlAlOkosNoeNMWjNKJc=; b=BV Ds9+k9U0AGGVvR6N+eYzSsEFAtWb7HbUPITItNZOjlExTLWPfZoSSxjZ5KRjlx4X ZsKPJ/JgoJo6p3MxoyxYP/tarCqc9L21ZYsWHdjfMmstvFqPdTlzr6hBm4MxdeaO gFuKdr8b7IYBj3tvNAodkFiGCwmvwh+XGYMGeScoi1lh/stwL3SBeKf0eWqMFIVe zSW+tb8aI1UrrLAsHP0uBaqHCaVWweS6qrPt/0nlwbQ3vIYhksS8OpzwJCEdDxMb H9DqqAYZA3yeIgAQUG3qJBfrTKuac6ONTn71qkSxeOUaPR0FECFFDIqvUk77+nus DlRBcS2lz/PhavIpUk/g== 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 3wa124gy80-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:50:08 +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 D4F8A4002D; Fri, 16 Feb 2024 10:50:04 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 38326237D78; Fri, 16 Feb 2024 10:49:22 +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:49:21 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 05/12] irqchip/stm32-exti: Skip secure events Date: Fri, 16 Feb 2024 10:47:50 +0100 Message-ID: <20240216094758.916722-6-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_015017_949837_0FBC0B9E X-CRM114-Status: GOOD ( 15.76 ) 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 Secure OS can reserve some EXTI event, marking them as "secure" by setting the corresponding bit in register SECCFGR (aka TZENR). These events cannot be used by Linux. Read the list of reserved events and check it during irq domain allocation. Signed-off-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index de18cddf6b88..85a40e07fbc3 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -36,6 +36,7 @@ struct stm32_exti_bank { u32 rpr_ofst; u32 fpr_ofst; u32 trg_ofst; + u32 seccfgr_ofst; }; #define UNDEF_REG ~0 @@ -54,10 +55,12 @@ struct stm32_exti_chip_data { u32 mask_cache; u32 rtsr_cache; u32 ftsr_cache; + u32 event_reserved; }; struct stm32_exti_host_data { void __iomem *base; + struct device *dev; struct stm32_exti_chip_data *chips_data; const struct stm32_exti_drv_data *drv_data; struct hwspinlock *hwlock; @@ -73,6 +76,7 @@ static const struct stm32_exti_bank stm32f4xx_exti_b1 = { .rpr_ofst = 0x14, .fpr_ofst = UNDEF_REG, .trg_ofst = UNDEF_REG, + .seccfgr_ofst = UNDEF_REG, }; static const struct stm32_exti_bank *stm32f4xx_exti_banks[] = { @@ -93,6 +97,7 @@ static const struct stm32_exti_bank stm32h7xx_exti_b1 = { .rpr_ofst = 0x88, .fpr_ofst = UNDEF_REG, .trg_ofst = UNDEF_REG, + .seccfgr_ofst = UNDEF_REG, }; static const struct stm32_exti_bank stm32h7xx_exti_b2 = { @@ -104,6 +109,7 @@ static const struct stm32_exti_bank stm32h7xx_exti_b2 = { .rpr_ofst = 0x98, .fpr_ofst = UNDEF_REG, .trg_ofst = UNDEF_REG, + .seccfgr_ofst = UNDEF_REG, }; static const struct stm32_exti_bank stm32h7xx_exti_b3 = { @@ -115,6 +121,7 @@ static const struct stm32_exti_bank stm32h7xx_exti_b3 = { .rpr_ofst = 0xA8, .fpr_ofst = UNDEF_REG, .trg_ofst = UNDEF_REG, + .seccfgr_ofst = UNDEF_REG, }; static const struct stm32_exti_bank *stm32h7xx_exti_banks[] = { @@ -137,6 +144,7 @@ static const struct stm32_exti_bank stm32mp1_exti_b1 = { .rpr_ofst = 0x0C, .fpr_ofst = 0x10, .trg_ofst = 0x3EC, + .seccfgr_ofst = 0x14, }; static const struct stm32_exti_bank stm32mp1_exti_b2 = { @@ -148,6 +156,7 @@ static const struct stm32_exti_bank stm32mp1_exti_b2 = { .rpr_ofst = 0x2C, .fpr_ofst = 0x30, .trg_ofst = 0x3E8, + .seccfgr_ofst = 0x34, }; static const struct stm32_exti_bank stm32mp1_exti_b3 = { @@ -159,6 +168,7 @@ static const struct stm32_exti_bank stm32mp1_exti_b3 = { .rpr_ofst = 0x4C, .fpr_ofst = 0x50, .trg_ofst = 0x3E4, + .seccfgr_ofst = 0x54, }; static const struct stm32_exti_bank *stm32mp1_exti_banks[] = { @@ -707,6 +717,12 @@ static int stm32_exti_h_domain_alloc(struct irq_domain *dm, bank = hwirq / IRQS_PER_BANK; chip_data = &host_data->chips_data[bank]; + /* Check if event is reserved (Secure) */ + if (chip_data->event_reserved & BIT(hwirq % IRQS_PER_BANK)) { + dev_err(host_data->dev, "event %lu is reserved, secure\n", hwirq); + return -EPERM; + } + event_trg = readl_relaxed(host_data->base + chip_data->reg_bank->trg_ofst); chip = (event_trg & BIT(hwirq % IRQS_PER_BANK)) ? &stm32_exti_h_chip : &stm32_exti_h_chip_direct; @@ -806,6 +822,10 @@ stm32_exti_chip_data *stm32_exti_chip_init(struct stm32_exti_host_data *h_data, if (stm32_bank->emr_ofst != UNDEF_REG) writel_relaxed(0, base + stm32_bank->emr_ofst); + /* reserve Secure events */ + if (stm32_bank->seccfgr_ofst != UNDEF_REG) + chip_data->event_reserved = readl_relaxed(base + stm32_bank->seccfgr_ofst); + pr_info("%pOF: bank%d\n", node, bank_idx); return chip_data; @@ -911,6 +931,7 @@ static int stm32_exti_probe(struct platform_device *pdev) return -ENOMEM; dev_set_drvdata(dev, host_data); + host_data->dev = dev; /* check for optional hwspinlock which may be not available yet */ ret = of_hwspin_lock_get_id(np, 0); From patchwork Fri Feb 16 09:47:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559745 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 7DE5BC48BEB for ; Fri, 16 Feb 2024 09:50:48 +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=i3WRm22ncfgeEXlwOCR4oboZ5kZXHIDCr+nT3Nd7nhc=; b=tVgbaQv477ZtVB FjQl1iTK0hgbMLORP3RWXvI4ivpU4tB4RBegK8a2SUQJp4Xj1EEEIABFFLiBYSM1mMvq73rcuTXVA bbOwraVyaLvhdV4VGLk3uJY/hqV8UMDMXlO5mMv8VJaXrbK7GLojWY/FvYdUC+4uXATkBxAQQsdev b7VXIH3+MvP6Yb+eYhFTFuFyppmrB7sr41WIVEaceuhV+Pyi6Yhsm8J9m9T4d9N5ZWD2mKL+yVphY yHD1nN98OOTE3xDnsc0P1ipRE5MLgLc0L96wpDT9G9jc18RcTVa6arIjvIGyNQeAzyg5Q9USbTsWe GCKO4mY0kxqLZP8aFrKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurc-00000001nmf-1TYE; Fri, 16 Feb 2024 09:50:36 +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 1raurK-00000001nXU-1yp3 for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:50:21 +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 41G4pmv9024148; Fri, 16 Feb 2024 10:50:09 +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=o4W8pQnGZn5dw+D4cNQT9wm6+zlZJlcd/u0mhxC9pWw=; b=Nf DA+JwRS/Lra527nZENMYiDu5KI8chdnGipyQAnfr7XA6Ef2285Is8hKVJmgYVOkM z/l3FrXlpknrg9lTlJENLRhx6M0U9AANEUeSmPuPYq6nYBi2pA+9tD5JestuJmJX lVGXaJs01D1b2AWG8VxJJD9ogBqLYIhSwEl//qrwHpGR71cFiFUZdPiBCyR64LmL FHY3xPfId/w8GWUsFFeybWkZhhVNwcwbeI8AFK8uNHbcLvkl1NzacQiOQTZCKYBF kScRNMPygg5aZXcqPqo082NOjU5fvGtXPp8vPYPBzLVTXGfI4huYkQcp05KdQbCn /xDIjqGQAvMZJKX7wDTw== 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 3wa126gy75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:50:09 +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 7A9FD40047; Fri, 16 Feb 2024 10:50:06 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CF84E237D79; Fri, 16 Feb 2024 10:49:22 +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:49:22 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 06/12] irqchip/stm32-exti: Mark events reserved with RIF configuration check Date: Fri, 16 Feb 2024 10:47:51 +0100 Message-ID: <20240216094758.916722-7-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_015018_953830_57E0B959 X-CRM114-Status: GOOD ( 17.62 ) 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 EXTI events availability depends on Resource Isolation Framework (RIF) configuration. RIF grants access to buses with Compartment ID (CID) filtering, secure and privilege level. It also assigns EXTI events to one or several processors (CID, Secure, Privilege). EXTI events used by Linux must be CID-filtered (EnCIDCFGR.CFEN=1) and statically assigned to CID1 (EnCIDCFR.CID=CID1). EXTI events not filling these conditions are marked as reserved and can't be used by Linux. Signed-off-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 40 ++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 85a40e07fbc3..68af5fe4764b 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -23,9 +23,22 @@ #include -#define IRQS_PER_BANK 32 +#define IRQS_PER_BANK 32 -#define HWSPNLCK_TIMEOUT 1000 /* usec */ +#define HWSPNLCK_TIMEOUT 1000 /* usec */ + +#define EXTI_EnCIDCFGR(n) (0x180 + (n) * 4) +#define EXTI_HWCFGR1 0x3f0 + +/* Register: EXTI_EnCIDCFGR(n) */ +#define EXTI_CIDCFGR_CFEN_MASK BIT(0) +#define EXTI_CIDCFGR_CID_MASK GENMASK(6, 4) +#define EXTI_CIDCFGR_CID_SHIFT 4 + +/* Register: EXTI_HWCFGR1 */ +#define EXTI_HWCFGR1_CIDWIDTH_MASK GENMASK(27, 24) + +#define EXTI_CID1 1 struct stm32_exti_bank { u32 imr_ofst; @@ -910,6 +923,27 @@ static const struct irq_domain_ops stm32_exti_h_domain_ops = { .xlate = irq_domain_xlate_twocell, }; +static void stm32_exti_check_rif(struct stm32_exti_host_data *host_data) +{ + u32 cid, cidcfgr, hwcfgr1; + unsigned int bank, i, event; + + /* quit on CID not supported */ + hwcfgr1 = readl_relaxed(host_data->base + EXTI_HWCFGR1); + if ((hwcfgr1 & EXTI_HWCFGR1_CIDWIDTH_MASK) == 0) + return; + + for (bank = 0; bank < host_data->drv_data->bank_nr; bank++) { + for (i = 0; i < IRQS_PER_BANK; i++) { + event = bank * IRQS_PER_BANK + i; + cidcfgr = readl_relaxed(host_data->base + EXTI_EnCIDCFGR(event)); + cid = (cidcfgr & EXTI_CIDCFGR_CID_MASK) >> EXTI_CIDCFGR_CID_SHIFT; + if ((cidcfgr & EXTI_CIDCFGR_CFEN_MASK) && cid != EXTI_CID1) + host_data->chips_data[bank].event_reserved |= BIT(i); + } + } +} + static void stm32_exti_remove_irq(void *data) { struct irq_domain *domain = data; @@ -972,6 +1006,8 @@ static int stm32_exti_probe(struct platform_device *pdev) for (i = 0; i < drv_data->bank_nr; i++) stm32_exti_chip_init(host_data, i, np); + stm32_exti_check_rif(host_data); + parent_domain = irq_find_host(of_irq_find_parent(np)); if (!parent_domain) { dev_err(dev, "GIC interrupt-parent not found\n"); From patchwork Fri Feb 16 09:47:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559744 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 6CE24C48BEB for ; Fri, 16 Feb 2024 09:50:44 +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=qTj/2s3zUq313wbSpZoEI/X4U3FiQgcCsbBbX1dJWUU=; b=EcbZAtgp6JLAhM wh4irnmRU47ZqqIRsBjom0/lNCTDyYfo8NGjI4TL43Kvap3CHQUrXEo7C6E5RjfQO6m6wd0tROFdg 2Z1SSykS1RSuWJF7AkynzKlkNtuPOMC8Hp2tEs8OW5WL+t2R5uwQ2QEBooxh4UJRevBGGH/wDI+8o /J27ijlKSW4uFZmlj77E/wBb0/FPcPANK3nbSJsc7IfQOm0DMm+RVxBuGbnqBqFg3l3ZWEe04CRt6 2FWq1dEuRJ0O1Y6IljihV2he9Le4CK2Ki1ZsDwzYhMcSMYzv4aoUdFLBfhGRlgN8TfW74Ve2uT4DY 4nyCFv/wmL3r94pWA5mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raura-00000001nlI-3coN; Fri, 16 Feb 2024 09:50:34 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurJ-00000001nX5-3wRg for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:50:20 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qEC8014621; Fri, 16 Feb 2024 10:50:09 +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=hd2MzwoxJbxM/jRYv2mZUqaeQPiVY5o6AngfSGI029A=; b=8N WxMo7eYe88gij0BjAn1VoxqokDtuCe4XJ2VvhUp6J4rOqxojmIqFeTfTQa63GLO8 eb743fqXvYBBQ9f8Xi4zf8X8cHPGe0MEYxnsFT09UpA6HXaQ6BhqJAhzQY7vTMlP bszDrZFB9DUlC05sgmI50mntE090qbv/2oIHztUU9W1YoqSflF4rkzynrWKk9lUa vDVsIWlUtNhF8AYNAOa+8/KUx8XM5WJbeSksdCGk0vijuc+HN0qW5glvp+W7lWdt ZClENAMo+DK2GppNeUU+Y2cW0noWy7EsLj8anNLmBaMRp+HaKigURyHm0F6ehFWW dHdNaL8/S+wOXQcyHmJw== 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 3wa124gy84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:50:09 +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 14A5440045; Fri, 16 Feb 2024 10:50:06 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6BB39237D7A; Fri, 16 Feb 2024 10:49:23 +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:49:23 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 07/12] arm64: Kconfig.platforms: Enable STM32_EXTI for ARCH_STM32 Date: Fri, 16 Feb 2024 10:47:52 +0100 Message-ID: <20240216094758.916722-8-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_015018_336047_6EC71B5E X-CRM114-Status: UNSURE ( 8.99 ) X-CRM114-Notice: Please train this message. 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 ARCH_STM32 needs to use STM32 EXTI interrupt controller for GPIO and wakeup interrupts. Signed-off-by: Antonio Borneo --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 24335565bad5..19bf58a9d5e1 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -302,6 +302,7 @@ config ARCH_STM32 select GPIOLIB select PINCTRL select PINCTRL_STM32MP257 + select STM32_EXTI select ARM_SMC_MBOX select ARM_SCMI_PROTOCOL select COMMON_CLK_SCMI From patchwork Fri Feb 16 09:47:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559746 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 30909C48260 for ; Fri, 16 Feb 2024 09:50:50 +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=WROiXGKdO/l8WV4ea1OwlcyA8Bxn9HwThahXSM3vatk=; b=qpJZf/8wepe4+d gUlSYuIuvqNuMqizBY2G5VGjkwxvnjnEciuZFP34T6SjiLD4JtW1tA/82WNrirPF/EGg48yt4kavw F5FefP54rQC7HibqyK+r+/0lsezsjNZGCGvuD0fZra97BDvPt9sprMaXt8Lb6givDF/f0wx0P1gL0 kVggQGGELNs4afyfW2obQlIPg/yP12RotnRAF/DsXoIYORexWvVpfEqAeRprHabp/lmVCpAFqZ83b J9VeRfEOjbW14WDSkIv3PBDPIYF9ZuehepFnn2e8agO8WbwAvH8t4PYKbosJcN7brajm+ySNcAkQG xJsx8P7FDTZFM9gHMlUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurf-00000001noy-2PVa; Fri, 16 Feb 2024 09:50:39 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurN-00000001naT-0eWy for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:50:25 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qPtY015733; Fri, 16 Feb 2024 10:50:12 +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=+fxKXdkROzT3M+/iRky170lOst61Y8+W0nzGBLi971o=; b=Ap pw7fH4IJUX/c324kbwir6nOnL40h6y/qP0alnLqfIszOFG6JHz0jdTTMMWti158G eyMC/7WlUIbWn94woIe321T3IRDy/9LlI88eFJyeoszxvvI+JfbJhvTb6HMMCDL1 AKckjOk3AyUPsVkWr28a73agH8PAvJ5ZnWDZYB4Iv0/PQ0wD01RBBT4I85BrpYRE nwnfcLVIB/61fBBlKm8Lt//WBC+Sjy1Bas5TLH7V8PJOTjcNPtjQgKKYvzb33h/q 2aN3YNBTed9GJL5bChevjfKRSBU6O6tifA0Pfm3wqS0xdX7GdICOIiMAssudN90J G3j6Mj/uf+8yPSllASgA== 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 3wa124gy88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:50:12 +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 B33D840048; Fri, 16 Feb 2024 10:50:06 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 13158237D7B; Fri, 16 Feb 2024 10:49:24 +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:49:23 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 08/12] ARM: dts: stm32: Use exti interrupt-map on stm32mp151 Date: Fri, 16 Feb 2024 10:47:53 +0100 Message-ID: <20240216094758.916722-9-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_015021_782044_8DC72FFF X-CRM114-Status: GOOD ( 10.15 ) 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 Stop using the internal table of the exti driver and use the more flexible interrupt-map feature in DT. Convert the driver's table for stm32mp151 to the interrupt-map property in DT. Signed-off-by: Antonio Borneo --- arch/arm/boot/dts/st/stm32mp151.dtsi | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/arch/arm/boot/dts/st/stm32mp151.dtsi b/arch/arm/boot/dts/st/stm32mp151.dtsi index fa4cbd312e5a..33c460cacb04 100644 --- a/arch/arm/boot/dts/st/stm32mp151.dtsi +++ b/arch/arm/boot/dts/st/stm32mp151.dtsi @@ -1223,7 +1223,58 @@ exti: interrupt-controller@5000d000 { compatible = "st,stm32mp1-exti", "syscon"; interrupt-controller; #interrupt-cells = <2>; + #address-cells = <0>; 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>, + <1 0 &intc GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <2 0 &intc GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <3 0 &intc GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, + <4 0 &intc GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, + <5 0 &intc GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>, + <6 0 &intc GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, + <7 0 &intc GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <8 0 &intc GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <9 0 &intc GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, + <10 0 &intc GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, + <11 0 &intc GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <12 0 &intc GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>, + <13 0 &intc GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, + <14 0 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, + <15 0 &intc GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, + <16 0 &intc GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, + <19 0 &intc GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <21 0 &intc GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>, + <22 0 &intc GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>, + <23 0 &intc GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, + <24 0 &intc GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, + <25 0 &intc GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <26 0 &intc GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <27 0 &intc GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <28 0 &intc GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <29 0 &intc GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <30 0 &intc GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, + <31 0 &intc GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, + <32 0 &intc GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, + <33 0 &intc GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>, + <46 0 &intc GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>, + <47 0 &intc GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>, + <48 0 &intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <50 0 &intc GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>, + <52 0 &intc GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, + <53 0 &intc GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, + <54 0 &intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <61 0 &intc GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, + <65 0 &intc GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>, + <68 0 &intc GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, + <70 0 &intc GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, + <73 0 &intc GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>; + }; }; syscfg: syscon@50020000 { From patchwork Fri Feb 16 09:47:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559747 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 6ACDCC48BEC for ; Fri, 16 Feb 2024 09:50:50 +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=UlrUNNBhLq3nQ3KP02xoKVyD1E/Msi4HlEINt25lEhc=; b=ayaJ0TCxCFVXga TuCXTXO2MeHyk9oDlkNo7OkSVVFQxlxcGWxL+HhCfhgposY8yjS3F83TkYWWFqgRrNG2dR7v2nm3U CYwVOuJNt+pVThnqIUV3BDZ9Mvj+79GAQ7KdbkJBlRLEK4otuLK+1/BW4CsuPs8V8Yi9P4h3beyOL RX4gUmAvnU+eocmgDnaiHFQV5lVg/fLxzBPffFVyC9s4/zoZl9JH8iCyvDUo4rOtVfr4V0a6YH7rc t+x0mgI5prgEIJAT813wGXBHul7x2kfWHW7AS3/cR3iWN/9nT3YCWT7mHFRP/ILAL7+jFw2DF6ymH qJK8EsUMoNJvFJASJaEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raurd-00000001nnj-3w5R; Fri, 16 Feb 2024 09:50:37 +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 1raurL-00000001nYW-1uB5 for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:50:23 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qVQw017608; Fri, 16 Feb 2024 10:50:10 +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=6QfjCwfoPchst587wVtUs5pgmUSIzRqIF3goqDifjF0=; b=Ll +ygLH8m7mL7HU44J5/hIRcuqcTMyckqwu2ypKUNdafs6bjkld72CEWD3TgorIEh+ NYpzc+TGq6WyYiPdl3zUoJKSCX7SiENCbIaX/3WtQKKvI5kmHLcRDFvP68qlZIE3 EYgPxx7AHNXk16uhdBWoUpEI2xu0mbxv100vG2qhrahFquuMufY7Y1JFLUSRTY1M 4HAZlIDCgzU/odfgXcHXzbFXCO0efEgNOWNVHJ6J4uk6TzgZdHRIMhsQ+tJvi45S f1YSuzu0GFa28Tb5hiCJj1u7LWxIACFFzUIHoj5QfxwtrKcPu+rRVldTSi5R4sav Hm0unfd8jPSZgmprSlMg== 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 3wa12ary7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:50:10 +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 2ED2F40046; Fri, 16 Feb 2024 10:50:06 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id AAE11237D7C; Fri, 16 Feb 2024 10:49:24 +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:49:24 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 09/12] ARM: dts: stm32: Use exti interrupt-map on stm32mp131 Date: Fri, 16 Feb 2024 10:47:54 +0100 Message-ID: <20240216094758.916722-10-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_015020_107565_118313D6 X-CRM114-Status: GOOD ( 11.58 ) 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 Stop using the internal table of the exti driver and use the more flexible interrupt-map feature in DT. By switching away from using the internal table, there is no need anymore to use the specific compatible "st,stm32mp13-exti", which was introduced to select the proper internal table. Convert the driver table to interrupt-map property. Switch the compatible string to the generic "st,stm32mp1-exti", in place of the specific "st,stm32mp13-exti". Older DT using compatible "st,stm32mp13-exti" will still work as the driver remains backward compatible. Signed-off-by: Antonio Borneo --- arch/arm/boot/dts/st/stm32mp131.dtsi | 49 +++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi index b04d24c939c3..14bd1c9bedd9 100644 --- a/arch/arm/boot/dts/st/stm32mp131.dtsi +++ b/arch/arm/boot/dts/st/stm32mp131.dtsi @@ -1093,10 +1093,57 @@ rcc: rcc@50000000 { }; exti: interrupt-controller@5000d000 { - compatible = "st,stm32mp13-exti", "syscon"; + compatible = "st,stm32mp1-exti", "syscon"; interrupt-controller; #interrupt-cells = <2>; + #address-cells = <0>; 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>, + <1 0 &intc GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <2 0 &intc GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <3 0 &intc GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, + <4 0 &intc GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, + <5 0 &intc GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>, + <6 0 &intc GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + <7 0 &intc GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <8 0 &intc GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, + <9 0 &intc GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, + <10 0 &intc GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, + <11 0 &intc GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, + <12 0 &intc GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, + <13 0 &intc GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>, + <14 0 &intc GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <15 0 &intc GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <16 0 &intc GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, + <19 0 &intc GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <21 0 &intc GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>, + <22 0 &intc GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>, + <23 0 &intc GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>, + <24 0 &intc GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>, + <25 0 &intc GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <26 0 &intc GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <27 0 &intc GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <28 0 &intc GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, + <29 0 &intc GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, + <30 0 &intc GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, + <31 0 &intc GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>, + <32 0 &intc GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>, + <33 0 &intc GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>, + <44 0 &intc GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, + <47 0 &intc GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, + <48 0 &intc GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <50 0 &intc GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, + <52 0 &intc GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <53 0 &intc GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, + <68 0 &intc GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>, + <70 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + }; }; syscfg: syscon@50020000 { From patchwork Fri Feb 16 09:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559751 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 A1B02C48BEB for ; Fri, 16 Feb 2024 09:52: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=SEsZ4l+Bs08Uhjwv67rxv9XwWCMbUS7y6va5dfNZ9vA=; b=dhAfFhgziXiWOl t1rOSc0Vqk2n94fWl8d0MxQaGp4+3Z7WltJlO55U+Dwqvdf5dQw966kfO7ypeedjKqIdN4ixjniYF eiImmwxECqnK+3tPxF1K9BFXAWvrOIEIMThEAZEbKap7gI/PaxFvGEH6l4Xy54Vw27SOFm9nlft2M 2g9SWjNoz/37AdzgCqPBpnEvAhHCQ/Z4UZ5gYx57+octrREvcxxKB7pA4G2acic/kDWBpYBCR3dhu qNvGY5p+VzcjHgVptifeoIMT5fL5OKEg63wJ2lqrqNVeqUS4m/EmSO4DBmZK3/lkoKjYifPVoZY+A 4fyweFB2ZARd8nmAbvTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rauso-00000001oZG-3gTO; Fri, 16 Feb 2024 09:51:50 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rausZ-00000001oP5-232X for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:51:37 +0000 Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4pWkN008754; Fri, 16 Feb 2024 10:51:12 +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=lG/404Pv7+RWktWppSnM5oXw2eG/j2wJbKBMjahgEeU=; b=xt +JEEOw+Ke7EY8qyrUeZiwOJT3tauI1vIwgaAlXu5nGDeERibdAWnYzvHCzLdDAcD /M/Dj1RmLPL76E0HRMjqcqRLrO4psSWmYTDy6dMWg/AW1FxLiUmR22Qy61JzJnq0 r+Zpiz755STDbThG8QMFjSu6iUiP0h2+ii2B4PhbEzQNARVW5xAK6Mzo3LB3Aqk3 dVaFLpWL29O50ZXeyrZvaE+jtPEEp3ZwkkV3e1nyB3AxwcMaaHl7n5Y/w3y58ldv HVLasqjIys8nV9GYU2inrWte1DoEL/SM/yq6dXQa6JgxzHLAFm7h07NbcAVIQ38b mSQfinnDFxDLA2UtKldA== 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 3wa124gy9r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:51:12 +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 C89584002D; Fri, 16 Feb 2024 10:51:08 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 7A35522D187; Fri, 16 Feb 2024 10:50:27 +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:50:27 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , , Christian Bruel Subject: [PATCH 10/12] arm64: dts: st: Add v2m to GIC node on stm32mp251 Date: Fri, 16 Feb 2024 10:47:55 +0100 Message-ID: <20240216094758.916722-11-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_015135_880877_CDE946B3 X-CRM114-Status: GOOD ( 11.40 ) 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 From: Christian Bruel The GIC of STM32MP25 includes v2m extension for PCIEe MSI support. Add the v2m sub-node to the GIC interrupt controller and adapt the other properties accordingly. Signed-off-by: Christian Bruel Signed-off-by: Antonio Borneo --- arch/arm64/boot/dts/st/stm32mp251.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 96859d098ef8..5c9095382cc7 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -81,12 +81,20 @@ scmi_reset: protocol@16 { intc: interrupt-controller@4ac00000 { compatible = "arm,cortex-a7-gic"; #interrupt-cells = <3>; - #address-cells = <1>; + #address-cells = <2>; + #size-cells = <2>; interrupt-controller; reg = <0x0 0x4ac10000 0x0 0x1000>, <0x0 0x4ac20000 0x0 0x2000>, <0x0 0x4ac40000 0x0 0x2000>, <0x0 0x4ac60000 0x0 0x2000>; + ranges; + + v2m0: v2m@48090000 { + compatible = "arm,gic-v2m-frame"; + reg = <0x0 0x48090000 0x0 0x1000>; + msi-controller; + }; }; psci { From patchwork Fri Feb 16 09:47:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559748 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 E7029C48BEB for ; Fri, 16 Feb 2024 09:51:41 +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=I70/VZ5kTK8fsfSdCHFpFKWqlbTJ3BKrJW/EuoPT2Ps=; b=AtWu5bFgZ2iBqS CX5z4jscjUwe35Bo+Mk3baN8C5PM5ufMBkOIp2ce08U4YwyAGQGmhDoWcpkjGmAtLqd5XeJUYW0R9 7Dqc+JrIRiXpa0q9KHqaa3iBQaten7P7rEXdgHPHzw+vXokx7tp1Zne8X2q1Qkmc6QJFI+wk6zdXC M011bjyWr966t5DCv4SfZwfFNSX5eq3vKDki2AAiXJrEOIJ88TjCDkim5KXg90y1Uairr5aOGHC1o QWdohyzN1oU94TkYHnXAAqCN3mPx8wfox6lePIxvNyuYdP3GVXZER82Dz62FRrDoPpi4bNda6bS+U qzXj3bFE/6v8Uw6gctUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rausW-00000001oOY-2NAu; Fri, 16 Feb 2024 09:51:32 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rausN-00000001oIA-1cOL for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:51:28 +0000 Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G4qA1M014068; Fri, 16 Feb 2024 10:51:14 +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=71REGfTc7yoIJymQ9MkGvQ6YZAyCUgLqFHdkGlwLvK4=; b=vx Mg1fQIOdtedH7xLDUpV1gXXRThrWUXNlpwi7NFM00HiVpqQGJmuiG0eBP8WOq3II hRBWMfmzMbr40mlvapvqXpw/Le5guXK7k7sLnYJzPlafVo5b7donK1HL3hr9kFl6 EkAKGWqg4AQJ+TpXfwx9Sx5auTnhlYROX0QGfgjQy+pv+ypXd9kx7oPsPkGZnlbb eFvOCe3qa8R9OZcG18TsD5eTnYHassqacLt7cgtRFXBZl5JzEvPWAN2ZCzfVJQP+ Gkm7CIIyjWS90O+JW4EViiu0mQRMQa2xX8PM6DZgNWwBdla7RgWvkLxv0Z/i2j3B nh6xNGJ5u1Zv+UuMXteA== 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 3wa124gycx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:51:13 +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 9AD0540046; Fri, 16 Feb 2024 10:51:10 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4952022FA36; Fri, 16 Feb 2024 10:50:28 +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:50:27 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 11/12] arm64: dts: st: Add exti1 and exti2 nodes on stm32mp251 Date: Fri, 16 Feb 2024 10:47:56 +0100 Message-ID: <20240216094758.916722-12-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_015123_875742_4CCB69F3 X-CRM114-Status: GOOD ( 12.14 ) 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 Update the device-tree stm32mp251.dtsi by adding the nodes for exti1 and exti2 interrupt controllers. Signed-off-by: Antonio Borneo --- arch/arm64/boot/dts/st/stm32mp251.dtsi | 140 +++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 5c9095382cc7..4253f5bcd000 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -164,6 +164,86 @@ package_otp@1e8 { }; }; + exti1: interrupt-controller@44220000 { + compatible = "st,stm32mp1-exti", "syscon"; + interrupt-controller; + #interrupt-cells = <2>; + #address-cells = <0>; + reg = <0x44220000 0x400>; + + exti-interrupt-map { + #address-cells = <0>; + #interrupt-cells = <2>; + interrupt-map-mask = <0xffffffff 0>; + interrupt-map = + <0 0 &intc 0 0 GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>, + <1 0 &intc 0 0 GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>, + <2 0 &intc 0 0 GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>, + <3 0 &intc 0 0 GIC_SPI 271 IRQ_TYPE_LEVEL_HIGH>, + <4 0 &intc 0 0 GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>, + <5 0 &intc 0 0 GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>, + <6 0 &intc 0 0 GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>, + <7 0 &intc 0 0 GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>, + <8 0 &intc 0 0 GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>, + <9 0 &intc 0 0 GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>, + <10 0 &intc 0 0 GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>, + <11 0 &intc 0 0 GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>, + <12 0 &intc 0 0 GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>, + <13 0 &intc 0 0 GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>, + <14 0 &intc 0 0 GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>, + <15 0 &intc 0 0 GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>, + <16 0 &intc 0 0 GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, + <17 0 &intc 0 0 GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, + <18 0 &intc 0 0 GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <19 0 &intc 0 0 GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>, + <21 0 &intc 0 0 GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <22 0 &intc 0 0 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>, + <23 0 &intc 0 0 GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, + <24 0 &intc 0 0 GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>, + <25 0 &intc 0 0 GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>, + <26 0 &intc 0 0 GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <27 0 &intc 0 0 GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <28 0 &intc 0 0 GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <29 0 &intc 0 0 GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <30 0 &intc 0 0 GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, + <31 0 &intc 0 0 GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, + <32 0 &intc 0 0 GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, + <33 0 &intc 0 0 GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, + <34 0 &intc 0 0 GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, + <36 0 &intc 0 0 GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <37 0 &intc 0 0 GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <38 0 &intc 0 0 GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <39 0 &intc 0 0 GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>, + <40 0 &intc 0 0 GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>, + <41 0 &intc 0 0 GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>, + <42 0 &intc 0 0 GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, + <43 0 &intc 0 0 GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>, + <44 0 &intc 0 0 GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>, + <45 0 &intc 0 0 GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>, + <46 0 &intc 0 0 GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>, + <47 0 &intc 0 0 GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>, + <48 0 &intc 0 0 GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>, + <49 0 &intc 0 0 GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>, + <50 0 &intc 0 0 GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>, + <59 0 &intc 0 0 GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>, + <61 0 &intc 0 0 GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>, + <64 0 &intc 0 0 GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>, + <67 0 &intc 0 0 GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>, + <68 0 &intc 0 0 GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <70 0 &intc 0 0 GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, + <72 0 &intc 0 0 GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>, + <73 0 &intc 0 0 GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>, + <74 0 &intc 0 0 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <75 0 &intc 0 0 GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <76 0 &intc 0 0 GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <77 0 &intc 0 0 GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>, + <78 0 &intc 0 0 GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>, + <79 0 &intc 0 0 GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>, + <83 0 &intc 0 0 GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>, + <84 0 &intc 0 0 GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + syscfg: syscon@44230000 { compatible = "st,stm32mp25-syscfg", "syscon"; reg = <0x44230000 0x10000>; @@ -318,5 +398,65 @@ gpioz: gpio@46200000 { }; }; + + exti2: interrupt-controller@46230000 { + compatible = "st,stm32mp1-exti", "syscon"; + interrupt-controller; + #interrupt-cells = <2>; + #address-cells = <0>; + reg = <0x46230000 0x400>; + + exti-interrupt-map { + #address-cells = <0>; + #interrupt-cells = <2>; + interrupt-map-mask = <0xffffffff 0>; + interrupt-map = + <0 0 &intc 0 0 GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, + <1 0 &intc 0 0 GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, + <2 0 &intc 0 0 GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, + <3 0 &intc 0 0 GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>, + <4 0 &intc 0 0 GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>, + <5 0 &intc 0 0 GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>, + <6 0 &intc 0 0 GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>, + <7 0 &intc 0 0 GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>, + <8 0 &intc 0 0 GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>, + <9 0 &intc 0 0 GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>, + <10 0 &intc 0 0 GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>, + <11 0 &intc 0 0 GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>, + <12 0 &intc 0 0 GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, + <13 0 &intc 0 0 GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>, + <14 0 &intc 0 0 GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>, + <15 0 &intc 0 0 GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>, + <16 0 &intc 0 0 GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>, + <17 0 &intc 0 0 GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>, + <21 0 &intc 0 0 GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, + <22 0 &intc 0 0 GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, + <25 0 &intc 0 0 GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>, + <26 0 &intc 0 0 GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>, + <27 0 &intc 0 0 GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>, + <29 0 &intc 0 0 GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>, + <30 0 &intc 0 0 GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>, + <31 0 &intc 0 0 GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>, + <33 0 &intc 0 0 GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>, + <34 0 &intc 0 0 GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>, + <37 0 &intc 0 0 GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>, + <40 0 &intc 0 0 GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>, + <43 0 &intc 0 0 GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>, + <46 0 &intc 0 0 GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, + <48 0 &intc 0 0 GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <49 0 &intc 0 0 GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <50 0 &intc 0 0 GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <51 0 &intc 0 0 GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + <52 0 &intc 0 0 GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <53 0 &intc 0 0 GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <61 0 &intc 0 0 GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>, + <62 0 &intc 0 0 GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>, + <64 0 &intc 0 0 GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>, + <65 0 &intc 0 0 GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>, + <66 0 &intc 0 0 GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>, + <67 0 &intc 0 0 GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, + <70 0 &intc 0 0 GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>; + }; + }; }; }; From patchwork Fri Feb 16 09:47:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13559749 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 F3FE0C48BEC for ; Fri, 16 Feb 2024 09:51:42 +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=X8y6U6rV17SakxZ0vSM7ddOaq8kj7J6T06rT6T+IBTU=; b=LjM/Mfx22VS2KO 30IIA4fAG9dDZuRC98YSgYhwRX3D+Sh5mb+ZC5Fq5rIOdn3DUzXfS+CzPf0ruex6U72kqwztm7u/O E/EtsW6J3zrD/gF7YuUF0InyzskOAaSWVMZAhkXlMctU0Y7T7Bgy+aacavZOydwt8jpTV8W9KTR33 BACgqv46/oD76HTBQmOxgMGOr6oZg3Yv/UuMUrML2G0rgQsS35FhxbD7iHaeH3HHdY3Etuc2qvI6S I6+Ozxy3LDj8KKeqFoXC/R5t8kl9jla+Waym4lWHymvRTBth5pipENKPYs4Rg9XnzbOY3iixUbf4B c8xWwzSSokTaiDdSvJGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rausV-00000001oNN-32uc; Fri, 16 Feb 2024 09:51:31 +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 1rausO-00000001oIZ-2iUN for linux-arm-kernel@lists.infradead.org; Fri, 16 Feb 2024 09:51:27 +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 41G4pf9J024119; Fri, 16 Feb 2024 10:51:14 +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=ZRp5vGAcix3Wpj/vQ2UmL/6M8zmhJtR1etki3Khip70=; b=ty UFMbEJLmWAIHFMANH8bq2WgnktZFbF+8uSO4sIEXjyfzjtxuu3xqIj1yrNYOWWz3 Z2J1j4YlmGi4B0lESxFmT/xdmEiwP7mKCjNZqoW8UPG4qiO0tFySCb43c0sEy0xo L7nc/uLS9dNtWYcPVjulyozYjP0vATy0okMmdlTiywM0owylKJT3GaPEJ1jWcpfb Rzk3iXhASJ9PQzu+SPz00t6lAarbatgG12RyRvzM1gWAI+rbuivo7QNeB9a+QFSd Zvv24DHgfxgQXWc8vg/iq4RSFQDW75jYufYHSi5OVwqm6GBRbTYcBZbDmDVQNUNe bShuV0PKg+iBjgHemQlA== 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 3wa126gybx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 10:51:14 +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 31EB740047; Fri, 16 Feb 2024 10:51:11 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D7112229A92; Fri, 16 Feb 2024 10:50:28 +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:50:28 +0100 From: Antonio Borneo To: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon CC: Antonio Borneo , , , , Subject: [PATCH 12/12] arm64: dts: st: Add interrupt parent to pinctrl on stm32mp251 Date: Fri, 16 Feb 2024 10:47:57 +0100 Message-ID: <20240216094758.916722-13-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_015125_109672_A6A780F9 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. 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 Add exti1 as interrupt parent for the two pin controllers. Add the additional required property st,syscfg. Signed-off-by: Antonio Borneo --- arch/arm64/boot/dts/st/stm32mp251.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 4253f5bcd000..6d46450afd4d 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -254,6 +254,8 @@ pinctrl: pinctrl@44240000 { #size-cells = <1>; compatible = "st,stm32mp257-pinctrl"; ranges = <0 0x44240000 0xa0400>; + interrupt-parent = <&exti1>; + st,syscfg = <&exti1 0x60 0xff>; pins-are-numbered; gpioa: gpio@44240000 { @@ -383,6 +385,8 @@ pinctrl_z: pinctrl@46200000 { #size-cells = <1>; compatible = "st,stm32mp257-z-pinctrl"; ranges = <0 0x46200000 0x400>; + interrupt-parent = <&exti1>; + st,syscfg = <&exti1 0x60 0xff>; pins-are-numbered; gpioz: gpio@46200000 {