[v7,1/3] media: dt-bindings: media: renesas,vsp1: Document RZ/{G2L,V2L} VSPD bindings To: Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>
Message ID | 20220414142605.26235-2-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | Superseded |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1nf153-000XMj-4F; Thu, 14 Apr 2022 15:08:21 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240422AbiDNPKg (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Thu, 14 Apr 2022 11:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353061AbiDNOfC (ORCPT <rfc822;linux-media@vger.kernel.org>); Thu, 14 Apr 2022 10:35:02 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 21C00CF4B3; Thu, 14 Apr 2022 07:26:16 -0700 (PDT) X-IronPort-AV: E=Sophos;i="5.90,259,1643641200"; d="scan'208";a="117980235" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 14 Apr 2022 23:26:16 +0900 Received: from localhost.localdomain (unknown [10.226.92.190]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id A112F42B069B; Thu, 14 Apr 2022 23:26:12 +0900 (JST) From: Biju Das <biju.das.jz@bp.renesas.com> Cc: Biju Das <biju.das.jz@bp.renesas.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be>, Chris Paterson <Chris.Paterson2@renesas.com>, Biju Das <biju.das@bp.renesas.com>, Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>, Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Subject: [PATCH v7 1/3] media: dt-bindings: media: renesas,vsp1: Document RZ/{G2L,V2L} VSPD bindings To: Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org> Date: Thu, 14 Apr 2022 15:26:03 +0100 Message-Id: <20220414142605.26235-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220414142605.26235-1-biju.das.jz@bp.renesas.com> References: <20220414142605.26235-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
Add support for RZ/G2L VSPD
|
|
Commit Message
Biju Das
April 14, 2022, 2:26 p.m. UTC
Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is similar to VSP2-D found on R-Car SoC's, but it does not have a version register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle these differences. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v6->v7: * No change v5->v6: * Removed LCDC reference clock description * Changed the clock name from du.0->aclk v4->v5: * No change v3->v4: * No change v2->v3: * Added Rb tag from Krzysztof. v1->v2: * Changed compatible from vsp2-rzg2l->rzg2l-vsp2 RFC->v1: * Updated commit description * Changed compatible from vsp2-r9a07g044->vsp2-rzg2l * Defined the clocks * Clock max Items is based on SoC Compatible string RFC: * https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-20-biju.das.jz@bp.renesas.com/ --- .../bindings/media/renesas,vsp1.yaml | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-)
Comments
Hi Biju, Thank you for the patch. On Thu, Apr 14, 2022 at 03:26:03PM +0100, Biju Das wrote: > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > similar to VSP2-D found on R-Car SoC's, but it does not have a version > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > these differences. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > --- > v6->v7: > * No change > v5->v6: > * Removed LCDC reference clock description > * Changed the clock name from du.0->aclk > v4->v5: > * No change > v3->v4: > * No change > v2->v3: > * Added Rb tag from Krzysztof. > v1->v2: > * Changed compatible from vsp2-rzg2l->rzg2l-vsp2 > RFC->v1: > * Updated commit description > * Changed compatible from vsp2-r9a07g044->vsp2-rzg2l > * Defined the clocks > * Clock max Items is based on SoC Compatible string > RFC: > * https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220112174612.10773-20-biju.das.jz@bp.renesas.com/ > --- > .../bindings/media/renesas,vsp1.yaml | 52 ++++++++++++++----- > 1 file changed, 39 insertions(+), 13 deletions(-) > > diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > index 990e9c1dbc43..a236b266fa4b 100644 > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > @@ -19,6 +19,7 @@ properties: > enum: > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L > > reg: > maxItems: 1 > @@ -26,8 +27,8 @@ properties: > interrupts: > maxItems: 1 > > - clocks: > - maxItems: 1 > + clocks: true > + clock-names: true clock-names shouldn't be true here, as it should only be set on rzg2l-vsp2. I think you can actually drop both clocks and clock-names here. With this addressed, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > power-domains: > maxItems: 1 > @@ -50,17 +51,42 @@ required: > > additionalProperties: false > > -if: > - properties: > - compatible: > - items: > - - const: renesas,vsp1 > -then: > - properties: > - renesas,fcp: false > -else: > - required: > - - renesas,fcp > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: renesas,vsp1 > + then: > + properties: > + renesas,fcp: false > + else: > + required: > + - renesas,fcp > + > + - if: > + properties: > + compatible: > + contains: > + const: renesas,rzg2l-vsp2 > + then: > + properties: > + clocks: > + items: > + - description: Main clock > + - description: Register access clock > + - description: Video clock > + clock-names: > + items: > + - const: aclk > + - const: pclk > + - const: vclk > + required: > + - clock-names > + else: > + properties: > + clocks: > + maxItems: 1 > > examples: > # R8A7790 (R-Car H2) VSP1-S
Hi Laurent, Thanks for the feedback. > Subject: Re: [PATCH v7 1/3] media: dt-bindings: media: renesas,vsp1: > Document RZ/{G2L,V2L} VSPD bindings > > Hi Biju, > > Thank you for the patch. > > On Thu, Apr 14, 2022 at 03:26:03PM +0100, Biju Das wrote: > > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > > similar to VSP2-D found on R-Car SoC's, but it does not have a version > > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > > these differences. > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > > --- > > v6->v7: > > * No change > > v5->v6: > > * Removed LCDC reference clock description > > * Changed the clock name from du.0->aclk > > v4->v5: > > * No change > > v3->v4: > > * No change > > v2->v3: > > * Added Rb tag from Krzysztof. > > v1->v2: > > * Changed compatible from vsp2-rzg2l->rzg2l-vsp2 > > RFC->v1: > > * Updated commit description > > * Changed compatible from vsp2-r9a07g044->vsp2-rzg2l > > * Defined the clocks > > * Clock max Items is based on SoC Compatible string > > RFC: > > * > > > --- > > .../bindings/media/renesas,vsp1.yaml | 52 ++++++++++++++----- > > 1 file changed, 39 insertions(+), 13 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > index 990e9c1dbc43..a236b266fa4b 100644 > > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > @@ -19,6 +19,7 @@ properties: > > enum: > > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L > > > > reg: > > maxItems: 1 > > @@ -26,8 +27,8 @@ properties: > > interrupts: > > maxItems: 1 > > > > - clocks: > > - maxItems: 1 > > + clocks: true > > + clock-names: true > > clock-names shouldn't be true here, as it should only be set on rzg2l-vsp2. > I think you can actually drop both clocks and clock-names here. If I drop clocks, then I get below dt_binding_check error biju@biju-VirtualBox:~/rzg2l-linux$ make ARCH=arm64 DT_CHECKER_FLAGS=-m DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dt_binding_check -j8 LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/media/renesas,vsp1.example.dts CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json DTC Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb CHECK Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe928000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe920000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml If I drop clock-names, I get dtbs-check error for RZ/G2{L,LC}, make ARCH=arm64 DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dtbs_check -j8 /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044l2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml So looks like both are required. Please correct me, If I am missing anything here. Cheers, Biju > > With this addressed, > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > > power-domains: > > maxItems: 1 > > @@ -50,17 +51,42 @@ required: > > > > additionalProperties: false > > > > -if: > > - properties: > > - compatible: > > - items: > > - - const: renesas,vsp1 > > -then: > > - properties: > > - renesas,fcp: false > > -else: > > - required: > > - - renesas,fcp > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: renesas,vsp1 > > + then: > > + properties: > > + renesas,fcp: false > > + else: > > + required: > > + - renesas,fcp > > + > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: renesas,rzg2l-vsp2 > > + then: > > + properties: > > + clocks: > > + items: > > + - description: Main clock > > + - description: Register access clock > > + - description: Video clock > > + clock-names: > > + items: > > + - const: aclk > > + - const: pclk > > + - const: vclk > > + required: > > + - clock-names > > + else: > > + properties: > > + clocks: > > + maxItems: 1 > > > > examples: > > # R8A7790 (R-Car H2) VSP1-S > > -- > Regards, > > Laurent Pinchart
Hi Biju, On Mon, Apr 18, 2022 at 07:34:19PM +0000, Biju Das wrote: > > Subject: Re: [PATCH v7 1/3] media: dt-bindings: media: renesas,vsp1: > > Document RZ/{G2L,V2L} VSPD bindings > > > > Hi Biju, > > > > Thank you for the patch. > > > > On Thu, Apr 14, 2022 at 03:26:03PM +0100, Biju Das wrote: > > > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > > > similar to VSP2-D found on R-Car SoC's, but it does not have a version > > > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > > > > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > > > these differences. > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > > > --- > > > v6->v7: > > > * No change > > > v5->v6: > > > * Removed LCDC reference clock description > > > * Changed the clock name from du.0->aclk > > > v4->v5: > > > * No change > > > v3->v4: > > > * No change > > > v2->v3: > > > * Added Rb tag from Krzysztof. > > > v1->v2: > > > * Changed compatible from vsp2-rzg2l->rzg2l-vsp2 > > > RFC->v1: > > > * Updated commit description > > > * Changed compatible from vsp2-r9a07g044->vsp2-rzg2l > > > * Defined the clocks > > > * Clock max Items is based on SoC Compatible string > > > RFC: > > > * > > > > > --- > > > .../bindings/media/renesas,vsp1.yaml | 52 ++++++++++++++----- > > > 1 file changed, 39 insertions(+), 13 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > index 990e9c1dbc43..a236b266fa4b 100644 > > > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > @@ -19,6 +19,7 @@ properties: > > > enum: > > > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > > > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > > > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L > > > > > > reg: > > > maxItems: 1 > > > @@ -26,8 +27,8 @@ properties: > > > interrupts: > > > maxItems: 1 > > > > > > - clocks: > > > - maxItems: 1 > > > + clocks: true > > > + clock-names: true > > > > clock-names shouldn't be true here, as it should only be set on rzg2l-vsp2. > > I think you can actually drop both clocks and clock-names here. > > If I drop clocks, then I get below dt_binding_check error > > biju@biju-VirtualBox:~/rzg2l-linux$ make ARCH=arm64 DT_CHECKER_FLAGS=-m DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dt_binding_check -j8 > LINT Documentation/devicetree/bindings > DTEX Documentation/devicetree/bindings/media/renesas,vsp1.example.dts > CHKDT Documentation/devicetree/bindings/processed-schema.json > SCHEMA Documentation/devicetree/bindings/processed-schema.json > DTC Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb > CHECK Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb > /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe928000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe920000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > If I drop clock-names, I get dtbs-check error for RZ/G2{L,LC}, > > make ARCH=arm64 DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dtbs_check -j8 > > /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044l2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > So looks like both are required. Indeed, we would need to switch from additionalProperties to unevaluatedProperties then, and that's not allowed for schemas without a $ref. > Please correct me, If I am missing anything here. Let's keep both properties here, but then ... (see below) > > With this addressed, > > > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > > > > > power-domains: > > > maxItems: 1 > > > @@ -50,17 +51,42 @@ required: > > > > > > additionalProperties: false > > > > > > -if: > > > - properties: > > > - compatible: > > > - items: > > > - - const: renesas,vsp1 > > > -then: > > > - properties: > > > - renesas,fcp: false > > > -else: > > > - required: > > > - - renesas,fcp > > > +allOf: > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: renesas,vsp1 > > > + then: > > > + properties: > > > + renesas,fcp: false > > > + else: > > > + required: > > > + - renesas,fcp > > > + > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: renesas,rzg2l-vsp2 > > > + then: > > > + properties: > > > + clocks: > > > + items: > > > + - description: Main clock > > > + - description: Register access clock > > > + - description: Video clock > > > + clock-names: > > > + items: > > > + - const: aclk > > > + - const: pclk > > > + - const: vclk > > > + required: > > > + - clock-names > > > + else: > > > + properties: > > > + clocks: > > > + maxItems: 1 ... you will need clock-names: false here. > > > > > > examples: > > > # R8A7790 (R-Car H2) VSP1-S
On Tue, Apr 19, 2022 at 11:29:39AM +0300, Laurent Pinchart wrote: > Hi Biju, > > On Mon, Apr 18, 2022 at 07:34:19PM +0000, Biju Das wrote: > > > Subject: Re: [PATCH v7 1/3] media: dt-bindings: media: renesas,vsp1: > > > Document RZ/{G2L,V2L} VSPD bindings > > > > > > Hi Biju, > > > > > > Thank you for the patch. > > > > > > On Thu, Apr 14, 2022 at 03:26:03PM +0100, Biju Das wrote: > > > > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > > > > similar to VSP2-D found on R-Car SoC's, but it does not have a version > > > > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > > > > > > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > > > > these differences. > > > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > > > > --- > > > > v6->v7: > > > > * No change > > > > v5->v6: > > > > * Removed LCDC reference clock description > > > > * Changed the clock name from du.0->aclk > > > > v4->v5: > > > > * No change > > > > v3->v4: > > > > * No change > > > > v2->v3: > > > > * Added Rb tag from Krzysztof. > > > > v1->v2: > > > > * Changed compatible from vsp2-rzg2l->rzg2l-vsp2 > > > > RFC->v1: > > > > * Updated commit description > > > > * Changed compatible from vsp2-r9a07g044->vsp2-rzg2l > > > > * Defined the clocks > > > > * Clock max Items is based on SoC Compatible string > > > > RFC: > > > > * > > > > > > > --- > > > > .../bindings/media/renesas,vsp1.yaml | 52 ++++++++++++++----- > > > > 1 file changed, 39 insertions(+), 13 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > index 990e9c1dbc43..a236b266fa4b 100644 > > > > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > @@ -19,6 +19,7 @@ properties: > > > > enum: > > > > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > > > > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > > > > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L > > > > > > > > reg: > > > > maxItems: 1 > > > > @@ -26,8 +27,8 @@ properties: > > > > interrupts: > > > > maxItems: 1 > > > > > > > > - clocks: > > > > - maxItems: 1 > > > > + clocks: true > > > > + clock-names: true > > > > > > clock-names shouldn't be true here, as it should only be set on rzg2l-vsp2. > > > I think you can actually drop both clocks and clock-names here. > > > > If I drop clocks, then I get below dt_binding_check error > > > > biju@biju-VirtualBox:~/rzg2l-linux$ make ARCH=arm64 DT_CHECKER_FLAGS=-m DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dt_binding_check -j8 > > LINT Documentation/devicetree/bindings > > DTEX Documentation/devicetree/bindings/media/renesas,vsp1.example.dts > > CHKDT Documentation/devicetree/bindings/processed-schema.json > > SCHEMA Documentation/devicetree/bindings/processed-schema.json > > DTC Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb > > CHECK Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb > > /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe928000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' > > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.example.dtb: vsp@fe920000: 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' > > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > If I drop clock-names, I get dtbs-check error for RZ/G2{L,LC}, > > > > make ARCH=arm64 DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/renesas,vsp1.yaml CROSS_COMPILE=~/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- dtbs_check -j8 > > > > /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044c2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' > > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > /home/biju/rzg2l-linux/arch/arm64/boot/dts/renesas/r9a07g044l2-smarc.dtb: vsp@10870000: 'clock-names' does not match any of the regexes: 'pinctrl-[0-9]+' > > From schema: /home/biju/rzg2l-linux/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > > > So looks like both are required. > > Indeed, we would need to switch from additionalProperties to > unevaluatedProperties then, and that's not allowed for schemas without a > $ref. The issue is here if we allow properties to be defined in if/then schemas, we can't have some meta-schema checks on them as we don't know if the property is defined elsewhere or not. That's primarily a problem for vendor specific properties where we need to ensure a type and description. Rob
Hi Biju, On Thu, Apr 14, 2022 at 4:26 PM Biju Das <biju.das.jz@bp.renesas.com> wrote: > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > similar to VSP2-D found on R-Car SoC's, but it does not have a version > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > these differences. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Thanks for your patch! > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > @@ -19,6 +19,7 @@ properties: > enum: > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L Given there is no version register, probably you want to define SoC-specific compatible values. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Thanks for the feedback. > Subject: Re: [PATCH v7 1/3] media: dt-bindings: media: renesas,vsp1: > Document RZ/{G2L,V2L} VSPD bindings To: Mauro Carvalho Chehab > <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski > <krzk+dt@kernel.org> > > Hi Biju, > > On Thu, Apr 14, 2022 at 4:26 PM Biju Das <biju.das.jz@bp.renesas.com> > wrote: > > Document VSPD found in RZ/G2L and RZ/V2L family SoC's. VSPD block is > > similar to VSP2-D found on R-Car SoC's, but it does not have a version > > register and it has 3 clocks compared to 1 clock on vsp1 and vsp2. > > > > This patch introduces a new compatible 'renesas,rzg2l-vsp2' to handle > > these differences. > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml > > @@ -19,6 +19,7 @@ properties: > > enum: > > - renesas,vsp1 # R-Car Gen2 and RZ/G1 > > - renesas,vsp2 # R-Car Gen3 and RZ/G2 > > + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L > > Given there is no version register, probably you want to define SoC- > specific compatible values. Yes, that is the plan which is in line with Kieran's suggestion. Cheers, Biju
diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml index 990e9c1dbc43..a236b266fa4b 100644 --- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml @@ -19,6 +19,7 @@ properties: enum: - renesas,vsp1 # R-Car Gen2 and RZ/G1 - renesas,vsp2 # R-Car Gen3 and RZ/G2 + - renesas,rzg2l-vsp2 # RZ/G2L and RZ/V2L reg: maxItems: 1 @@ -26,8 +27,8 @@ properties: interrupts: maxItems: 1 - clocks: - maxItems: 1 + clocks: true + clock-names: true power-domains: maxItems: 1 @@ -50,17 +51,42 @@ required: additionalProperties: false -if: - properties: - compatible: - items: - - const: renesas,vsp1 -then: - properties: - renesas,fcp: false -else: - required: - - renesas,fcp +allOf: + - if: + properties: + compatible: + contains: + const: renesas,vsp1 + then: + properties: + renesas,fcp: false + else: + required: + - renesas,fcp + + - if: + properties: + compatible: + contains: + const: renesas,rzg2l-vsp2 + then: + properties: + clocks: + items: + - description: Main clock + - description: Register access clock + - description: Video clock + clock-names: + items: + - const: aclk + - const: pclk + - const: vclk + required: + - clock-names + else: + properties: + clocks: + maxItems: 1 examples: # R8A7790 (R-Car H2) VSP1-S