Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3520025imw; Thu, 7 Jul 2022 03:14:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vav2a5dLDjajmof/Ua+w9DrjOj51yMk3XuTx3EP9vV8dUOspUdUh2RIM14DzFFICAMs6FI X-Received: by 2002:a17:90b:240b:b0:1ef:8a68:1596 with SMTP id nr11-20020a17090b240b00b001ef8a681596mr4256244pjb.234.1657188847629; Thu, 07 Jul 2022 03:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657188847; cv=none; d=google.com; s=arc-20160816; b=la/mFf7iZFn/kkO9/Q6OiLF+mrrNhpAreGz36zhh84MfVIYqd/3w2Qr2XRmYoC1OxO kLbGlqamOTsowYF6+DtLZBdLPbTLoCxFADfRyCvRLN7Hxoc5/l6uFamhPcHNlm63bplD 3zjAUVzl90URul3zKCZucfOQiRApGgBgJjrMY35cwqOVQA3GJ4BNvOSnHVHE4YoXDBHV rNW2lpp0/KUxWZFLUFiMkMSrbchRAEOhcQ3PKHtnrwZD0wIbkoFrxIonYYsNfcm0a9xJ YSu6fiW1E4wy2IKepKy/Uj01wU6nYuqk/FUBxk6W5z4Jsubqgo79WxIFxxWDvvWoif6M sE9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=brfmkoi7IC7Lao+cCHmswSNZ0X10qI675pZJZtqwGCc=; b=qYKx1cbiSiFlzVze7rX36O+He9Al0dDcEBBQkBA2G/CZVirPvpBJUUo73Bn43PhGtj 2UahxFT9G+92X5XwCBwxEszgjnWcu9Ooozvv3vsICvLnZ3id8DpuJNYXfq67TRL7bKdO TIz6OmSAkNkMpjn+zZEZr3MzNzQTMLP5NgESFONyaO8zA0vyKBh9i7awMNC0LndJUYUf qJTh8tglQHfM3LndlhdIdXg2Q4HCdpnAgVHibw3HTwoMY+xdRBJfFQN3Fc6LSlQnPRY0 fdDjoMsfzzDKP67OR0kuGtXZKr475Yzcl0NFjq1/iRLip67bHaCpgqHetlr4mkpHZ1g/ ln2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VYhIUy8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a170902e54300b0016bf7f945eesi10391803plf.371.2022.07.07.03.13.51; Thu, 07 Jul 2022 03:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VYhIUy8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235094AbiGGJwG (ORCPT + 99 others); Thu, 7 Jul 2022 05:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235129AbiGGJv6 (ORCPT ); Thu, 7 Jul 2022 05:51:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4214D4F3; Thu, 7 Jul 2022 02:51:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 50F2162221; Thu, 7 Jul 2022 09:51:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86F47C341C8; Thu, 7 Jul 2022 09:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657187515; bh=X9w7uVsbJ8D49JtdMTWnUpAeLaS1lt4n7lQokogX2X8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VYhIUy8P5C0fo+IEGbD1P2twNLp/9Prh3hbA4Ac2TUtNf6wbiQW6v8U+NGUVOMovg GoP/iCZm4XFmCW7IL54ueWlsfOWZ/ULGilnEKbEeeu8r0A+laqd2DMt/m/5gzrU6Lb w3Yqm6UP/mHsRK05etjucasJv9hYUzuvO9m3DT+Ypj7oaiMki5MINfyhPxd2YZbhgU 4EU6I5t/ft9ygpj2JcSKHnraPG8oV0WsTyRxWdraQh88+k2x5xiAz62FJxDbnvCqvq LEJNMtZQutndXtu0t8hOQKO7ECUOltn3sO7x/0t+nSk5GYOCqe56df3jNqNtwtxSRA iqWUG3EoNBTdw== Received: from [185.201.63.253] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o9OAq-005snH-U1; Thu, 07 Jul 2022 10:51:53 +0100 Date: Thu, 07 Jul 2022 10:51:33 +0100 Message-ID: <87a69lmesa.wl-maz@kernel.org> From: Marc Zyngier To: Rob Herring Cc: "Lad, Prabhakar" , Lad Prabhakar , Thomas Gleixner , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Sagar Kadam , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-riscv , Geert Uytterhoeven , LKML , Linux-Renesas , Phil Edworthy , Biju Das Subject: Re: [PATCH RFC 1/2] dt-bindings: interrupt-controller: sifive,plic: Document Renesas RZ/Five SoC In-Reply-To: <20220706215827.GA572635-robh@kernel.org> References: <20220524172214.5104-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220524172214.5104-2-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220605142333.GA3439339-robh@kernel.org> <20220706215827.GA572635-robh@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.201.63.253 X-SA-Exim-Rcpt-To: robh@kernel.org, prabhakar.csengg@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, tglx@linutronix.de, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, sagar.kadam@sifive.com, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, geert+renesas@glider.be, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, phil.edworthy@renesas.com, biju.das.jz@bp.renesas.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 06 Jul 2022 22:58:27 +0100, Rob Herring wrote: > > On Fri, Jun 24, 2022 at 10:59:40AM +0100, Lad, Prabhakar wrote: > > Hi Rob, > > > > Thank you for the review. > > > > On Sun, Jun 5, 2022 at 3:23 PM Rob Herring wrote: > > > > > > On Tue, May 24, 2022 at 06:22:13PM +0100, Lad Prabhakar wrote: > > > > Document Renesas RZ/Five (R9A07G043) SoC. > > > > > > > > Signed-off-by: Lad Prabhakar > > > > --- > > > > .../sifive,plic-1.0.0.yaml | 38 +++++++++++++++++-- > > > > 1 file changed, 35 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > index 27092c6a86c4..78ff31cb63e5 100644 > > > > --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > > > @@ -28,7 +28,10 @@ description: > > > > > > > > While the PLIC supports both edge-triggered and level-triggered interrupts, > > > > interrupt handlers are oblivious to this distinction and therefore it is not > > > > - specified in the PLIC device-tree binding. > > > > + specified in the PLIC device-tree binding for SiFive PLIC (and similar PLIC's), > > > > + but for the Renesas RZ/Five Soc (AX45MP AndesCore) which has NCEPLIC100 we need > > > > + to specify the interrupt type as the flow for EDGE interrupts is different > > > > + compared to LEVEL interrupts. > > > > > > > > While the RISC-V ISA doesn't specify a memory layout for the PLIC, the > > > > "sifive,plic-1.0.0" device is a concrete implementation of the PLIC that > > > > @@ -57,6 +60,7 @@ properties: > > > > - enum: > > > > - allwinner,sun20i-d1-plic > > > > - const: thead,c900-plic > > > > + - const: renesas-r9a07g043-plic > > Also, this should be 'renesas,r9...' > > > > > > > > > reg: > > > > maxItems: 1 > > > > @@ -64,8 +68,7 @@ properties: > > > > '#address-cells': > > > > const: 0 > > > > > > > > - '#interrupt-cells': > > > > - const: 1 > > > > + '#interrupt-cells': true > > > > > > > > interrupt-controller: true > > > > > > > > @@ -91,6 +94,35 @@ required: > > > > - interrupts-extended > > > > - riscv,ndev > > > > > > > > +if: > > > > + properties: > > > > + compatible: > > > > + contains: > > > > + const: renesas-r9a07g043-plic > > > > +then: > > > > + properties: > > > > + clocks: > > > > + maxItems: 1 > > > > + > > > > + resets: > > > > + maxItems: 1 > > > > + > > > > + power-domains: > > > > + maxItems: 1 > > > > > > Did you test this? The above properties won't be allowed because of > > > additionalProperties below. You need to change it to > > > 'unevaluatedProperties' or move these to the top level. > > > > > Yes I have run the dt_binding check. > > > > So with the below diff it does complain about the missing properties. > > > > prasmi@prasmi:~/work/renasas/renesas-drivers$ git diff > > Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > index 20ded037d444..bb14a4b1ec0a 100644 > > --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > @@ -130,7 +130,7 @@ examples: > > plic: interrupt-controller@c000000 { > > #address-cells = <0>; > > #interrupt-cells = <1>; > > - compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; > > + compatible = "renesas-r9a07g043-plic"; > > interrupt-controller; > > interrupts-extended = <&cpu0_intc 11>, > > <&cpu1_intc 11>, <&cpu1_intc 9>, > > prasmi@prasmi:~/work/renasas/renesas-drivers$ make ARCH=riscv > > CROSS_COMPILE=riscv64-linux-gnu- dt_binding_check > > LINT Documentation/devicetree/bindings > > CHKDT Documentation/devicetree/bindings/processed-schema.json > > SCHEMA Documentation/devicetree/bindings/processed-schema.json > > DTEX Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dts > > DTC Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb > > CHECK Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb: > > interrupt-controller@c000000: #interrupt-cells:0:0: 2 was expected > > From schema: > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb: > > interrupt-controller@c000000: 'clocks' is a required property > > From schema: > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb: > > interrupt-controller@c000000: 'resets' is a required property > > From schema: > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.example.dtb: > > interrupt-controller@c000000: 'power-domains' is a required property > > From schema: > > /home/prasmi/work/renasas/renesas-drivers/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml > > prasmi@prasmi:~/work/renasas/renesas-drivers$ > > prasmi@prasmi:~/work/renasas/renesas-drivers$ > > > > Is there something I'm missing here? > > You've said these properties are required, but you didn't add them. > > If you don't have the above 3 properties, then it's not going to > complain that they are present. But it will when you do add them for the > reason I gave. Can you please have a look at the latest instance[1][2] of this series, as posted by Samuel? I've provisionally queued it, but only on the provision that you would eventually ack these patches. Thanks, M. [1] https://lore.kernel.org/r/20220630100241.35233-2-samuel@sholland.org [2] https://lore.kernel.org/r/20220630100241.35233-4-samuel@sholland.org -- Without deviation from the norm, progress is not possible.