From patchwork Thu Sep 26 11:14:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Macpaul Lin X-Patchwork-Id: 13813292 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 B073FCCFA13 for ; Thu, 26 Sep 2024 11:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=0qs5n6aiVKXUZ4oPXJXzyukG/oL76swZuP9snTdQB3c=; b=5FUABtY3mZo/hjyQ4oL8zgxtBv ehVc7YlvDlhuHPSLWGj0HHEV3lcNM8wV3fkD1+s3SP2IN0dtmc0KhdK8XoJi9o8S66RYN6O3mAQHD Tz0e6a2XyL8cfRbPoOHWLKdlGHfUfyEvFofP/60gEE58GsiiSPNwvl5+hFH7OI5q+daaTNF/KGnT4 NYQwl7iN4tE4m2Kk81NxYBHy0Xc2h2uaapXQbJcqOe0McmWpOG0w2Rv4razgFoQrNs1UBhibGWf/W 0xMtDlNTx3Fug8mOVyfhRwGo6Z7t7Ktlra1ae8MUaNmldNFO+aTBFUnKq6sGntPziO4JYkKj1I3H0 DO4UsDDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stmY2-00000008DBt-2cJg; Thu, 26 Sep 2024 11:20:38 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stmSl-00000008C32-1q78; Thu, 26 Sep 2024 11:15:13 +0000 X-UUID: 95a4103c7bf811efb3adad29d29602c1-20240926 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=0qs5n6aiVKXUZ4oPXJXzyukG/oL76swZuP9snTdQB3c=; b=kLJbUNqTtw3xcBRt0Q7WkR+TX5IfmbarZW+ENV7wMfS0pRstIOYDF4UM/EtvJhnlGQ3zR0FBh5tktRUOyczPTlfZGjmtsIwvUfEcgZjXB4ScYjzLAQySA2p1tAygvZGpCgmo0FeME2Zg9ewaNB79WBoKCGTkLDPA2VEQnM/3PuE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.41,REQID:77600e5c-896b-48aa-9938-e1406e1a405e,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6dc6a47,CLOUDID:da964b18-b42d-49a6-94d2-a75fa0df01d2,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 95a4103c7bf811efb3adad29d29602c1-20240926 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1881022570; Thu, 26 Sep 2024 04:15:06 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 26 Sep 2024 19:15:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 26 Sep 2024 19:15:00 +0800 From: Macpaul Lin To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yong Wu , "Joerg Roedel" , Will Deacon , Robin Murphy , Matthias Brugger , AngeloGioacchino Del Regno , CK Hu , Jitao shi , Tinghan Shen , Seiya Wang , Ben Lok , Macpaul Lin , "Nancy . Lin" , , , , , , , Alexandre Mergnat CC: Bear Wang , Pablo Sun , Macpaul Lin , Sen Chu , "Chris-qj chen" , MediaTek Chromebook Upstream , Chen-Yu Tsai Subject: [PATCH v2 2/5] dt-bindings: iommu: mediatek: Fix interrupt count constraint for new SoCs Date: Thu, 26 Sep 2024 19:14:46 +0800 Message-ID: <20240926111449.9245-2-macpaul.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240926111449.9245-1-macpaul.lin@mediatek.com> References: <20240926111449.9245-1-macpaul.lin@mediatek.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10-1.215000-8.000000 X-TMASE-MatchedRID: P0y1Pz0bU7nwBTQ+XvV6VYzb2GR6Ttd3MZm0+sEE9msY0A95tjAn+9EQ LJPlYQqE0KHDXPxFjpD1VmTZnVKT+CaIC0lz+Wv3rQcmzcV8ovxbAoaK+wS4jUS/boWSGMtdi3N TyIt6V8peAwsJFuYQ4wTqbINU49IGbC1/2cudIH8SS5pQAyYxiqAPS3vFyaW6SSUXkvSVAdxZoZ UwtnkREuLzNWBegCW2wgn7iDBesS0qyYS0oyUVZrz092AhSRMerXqvQ7Xsx4NYyfd5fyfN9NdvP HFMK5cWUMepMtjA+idw3nV6gQuaZHRLk7foSK6ptbu7GfNV+t87DHWNfN2q6oSVUZZHNLr+RgV6 Hsqyx11QaONuZ6Jr4g9k3l8EaYIcOQLK/ZH4rlaeqD9WtJkSIw== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-1.215000-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 3C0E2BE1189122A4A3757AF41D63E367D739BF21E4BD2B17129FB16398AB53EB2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_041511_558210_223D7018 X-CRM114-Status: GOOD ( 11.55 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The infra-iommu node in mt8195.dtsi was triggering a CHECK_DTBS error due to an excessively long 'interrupts' property. The error message was: infra-iommu@10315000: interrupts: [[0, 795, 4, 0], [0, 796, 4, 0], [0, 797, 4, 0], [0, 798, 4, 0], [0, 799, 4, 0]] is too long To address this issue, add "minItems: 1" and "maxItems: 5" constraints to the 'interrupts' property in the DT binding schema. This change allows for flexibility in the number of interrupts for new SoCs. The purpose of these 5 interrupts is also added. Fixes: bca28426805d ("dt-bindings: iommu: mediatek: Convert IOMMU to DT schema") Signed-off-by: Macpaul Lin --- .../bindings/iommu/mediatek,iommu.yaml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) Changes for v2: - commit message: re-formatting and add a description of adding 5 interrupts. - add 'description' and 'maxItems: 5' for 'interrupt' property of 'mt8195-iommu-infra' - others keeps 'maxItems: 1' diff --git a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml index ea6b0f5f24de..fdd2996d2a31 100644 --- a/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml +++ b/Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml @@ -96,7 +96,8 @@ properties: maxItems: 1 interrupts: - maxItems: 1 + minItems: 1 + maxItems: 5 clocks: items: @@ -210,6 +211,28 @@ allOf: required: - mediatek,larbs + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8195-iommu-infra + + then: + properties: + interrupts: + description: | + The IOMMU of MT8195 has 5 banks: 0/1/2/3/4. + Each bank has a set of APB registers corresponding to the + normal world, protected world 1/2/3, and secure world, respectively. + Therefore, 5 interrupt numbers are needed. + maxItems: 5 + + else: + properties: + interrupts: + maxItems: 1 + additionalProperties: false examples: