From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B1AC2BA1E for ; Mon, 6 Apr 2020 11:33:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FD4020780 for ; Mon, 6 Apr 2020 11:33:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vEkYowfw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727481AbgDFLdA (ORCPT ); Mon, 6 Apr 2020 07:33:00 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:43974 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727181AbgDFLc7 (ORCPT ); Mon, 6 Apr 2020 07:32:59 -0400 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 16A2680E; Mon, 6 Apr 2020 13:32:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586172777; bh=6fhIA5nfV7r2zVpwvnNnjFKY7TSbzhwCVVuZ+u7eMX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vEkYowfwWdiryLeQqKjd1hSkOc9je4zQKN4SvwnYW3IT+bt0Cmdeh2U/HfqPzMLmm ChA/dX08EhvgTCVwOunGJvzgzaQTCLoYqt25eseW6NwjI46WWPFbPmWIQhsnBcov6w WyfaZ7AToGfaTxiKjRynotwQKDCO+ibBj0LK/Z1g= Date: Mon, 6 Apr 2020 14:32:47 +0300 From: Laurent Pinchart To: Maxime Ripard Cc: Laurent Pinchart , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Rob Herring , Philipp Zabel , Mark Yao , Sandy Huang , Chen-Yu Tsai Subject: Re: [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas,dw-hdmi: Convert binding to YAML Message-ID: <20200406113247.GF4757@pendragon.ideasonboard.com> References: <20200405233935.27599-1-laurent.pinchart+renesas@ideasonboard.com> <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> <20200406075705.a67tjx7jamdvqpl3@gilmour.lan> <20200406112856.GE4757@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200406112856.GE4757@pendragon.ideasonboard.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hallo again, On Mon, Apr 06, 2020 at 02:28:57PM +0300, Laurent Pinchart wrote: > On Mon, Apr 06, 2020 at 09:57:05AM +0200, Maxime Ripard wrote: > > On Mon, Apr 06, 2020 at 02:39:31AM +0300, Laurent Pinchart wrote: > > > diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml > > > new file mode 100644 > > > index 000000000000..9a543740c81d > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml > > > @@ -0,0 +1,142 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/display/bridge/renesas,dw-hdmi.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Renesas R-Car DWC HDMI TX Encoder > > > + > > > +maintainers: > > > + - Laurent Pinchart > > > + > > > +description: | > > > + The HDMI transmitter is a Synopsys DesignWare HDMI 1.4 TX controller IP > > > + with a companion PHY IP. > > > + > > > +allOf: > > > + - $ref: synopsys,dw-hdmi.yaml# > > > + > > > +properties: > > > + compatible: > > > + items: > > > + - enum: > > > + - renesas,r8a774a1-hdmi # for R8A774A1 (RZ/G2M) compatible HDMI TX > > > + - renesas,r8a774b1-hdmi # for R8A774B1 (RZ/G2N) compatible HDMI TX > > > + - renesas,r8a7795-hdmi # for R8A7795 (R-Car H3) compatible HDMI TX > > > + - renesas,r8a7796-hdmi # for R8A7796 (R-Car M3-W) compatible HDMI TX > > > + - renesas,r8a77965-hdmi # for R8A77965 (R-Car M3-N) compatible HDMI TX > > > + - const: renesas,rcar-gen3-hdmi > > > + > > > + reg: true > > > + > > > + reg-io-width: > > > + const: 1 > > > + > > > + clocks: > > > + minItems: 2 > > > + maxItems: 2 > > > > You don't need both, if one is missing the other will be filled by the > > dt-schema tools. In this particular case, I guess maxItems would make > > more sense. > > Fixed. > > > > + > > > + clock-names: > > > + items: > > > + - const: iahb > > > + - const: isfr > > > + > > > + interrupts: true > > > + > > > + ports: > > > + type: object > > > + description: | > > > + This device has three video ports. Their connections are modelled using the > > > + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. > > > + Each port shall have a single endpoint. > > > + > > > + properties: > > > + '#address-cells': > > > + const: 1 > > > + > > > + '#size-cells': > > > + const: 0 > > > + > > > + port@0: > > > + type: object > > > + description: Parallel RGB input port > > > + > > > + port@1: > > > + type: object > > > + description: HDMI output port > > > + > > > + port@2: > > > + type: object > > > + description: Sound input port > > > + > > > + required: > > > + - port@0 > > > + - port@1 > > > + - port@2 > > > + > > > + additionalProperties: false Would it also make sense to use unevaluatedProperties here, and drop #address-cells and #size-cells above as they're already evaluated in synopsys,dw-hdmi.yaml ? > > > + > > > + power-domains: > > > + maxItems: 1 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - clocks > > > + - clock-names > > > + - interrupts > > > + - ports > > > + > > > +additionalProperties: false > > > > In the case where you have some kind of generic schema and then a more > > specific one like you have here, unevaluatedProperties make more sense > > that additionalProperties. > > > > additionalProperties checks that there are no extra properties on the > > current schema, which is a problem here since you have to duplicate > > the entire list of properties found in the generic schema, while > > unevaluatedProperties checks that there are no extra properties in the > > entire set of all schemas that apply to this node. > > > > This way, you can just put what is different from the generic schema, > > and you don't have to keep it in sync. > > > > It's a feature that has been added in the spec of the schemas that > > went on right after the one we support in the tools, so for now the > > kernel meta-schemas only allows that property to be there (just like > > deprecated) but won't do anything. > > > > This should be fixed quite soon however, the library we depend on > > has started to work on that spec apparently. > > Should I postpone this series until support for unevaluatedProperties is > available, to be able to test this ? Also, to make sure I understand this correctly, does it mean I can drop "reg: true" and "interrupts: true" ? -- Regards, Laurent Pinchart From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07DE8C2BA2B for ; Mon, 6 Apr 2020 11:33:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3C29206C3 for ; Mon, 6 Apr 2020 11:33:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vEkYowfw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3C29206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41DF16E338; Mon, 6 Apr 2020 11:33:01 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 328BC6E338 for ; Mon, 6 Apr 2020 11:32:59 +0000 (UTC) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 16A2680E; Mon, 6 Apr 2020 13:32:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586172777; bh=6fhIA5nfV7r2zVpwvnNnjFKY7TSbzhwCVVuZ+u7eMX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vEkYowfwWdiryLeQqKjd1hSkOc9je4zQKN4SvwnYW3IT+bt0Cmdeh2U/HfqPzMLmm ChA/dX08EhvgTCVwOunGJvzgzaQTCLoYqt25eseW6NwjI46WWPFbPmWIQhsnBcov6w WyfaZ7AToGfaTxiKjRynotwQKDCO+ibBj0LK/Z1g= Date: Mon, 6 Apr 2020 14:32:47 +0300 From: Laurent Pinchart To: Maxime Ripard Subject: Re: [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas,dw-hdmi: Convert binding to YAML Message-ID: <20200406113247.GF4757@pendragon.ideasonboard.com> References: <20200405233935.27599-1-laurent.pinchart+renesas@ideasonboard.com> <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> <20200406075705.a67tjx7jamdvqpl3@gilmour.lan> <20200406112856.GE4757@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200406112856.GE4757@pendragon.ideasonboard.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Laurent Pinchart , Sandy Huang , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Mark Yao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hallo again, On Mon, Apr 06, 2020 at 02:28:57PM +0300, Laurent Pinchart wrote: > On Mon, Apr 06, 2020 at 09:57:05AM +0200, Maxime Ripard wrote: > > On Mon, Apr 06, 2020 at 02:39:31AM +0300, Laurent Pinchart wrote: > > > diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml > > > new file mode 100644 > > > index 000000000000..9a543740c81d > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml > > > @@ -0,0 +1,142 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/display/bridge/renesas,dw-hdmi.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Renesas R-Car DWC HDMI TX Encoder > > > + > > > +maintainers: > > > + - Laurent Pinchart > > > + > > > +description: | > > > + The HDMI transmitter is a Synopsys DesignWare HDMI 1.4 TX controller IP > > > + with a companion PHY IP. > > > + > > > +allOf: > > > + - $ref: synopsys,dw-hdmi.yaml# > > > + > > > +properties: > > > + compatible: > > > + items: > > > + - enum: > > > + - renesas,r8a774a1-hdmi # for R8A774A1 (RZ/G2M) compatible HDMI TX > > > + - renesas,r8a774b1-hdmi # for R8A774B1 (RZ/G2N) compatible HDMI TX > > > + - renesas,r8a7795-hdmi # for R8A7795 (R-Car H3) compatible HDMI TX > > > + - renesas,r8a7796-hdmi # for R8A7796 (R-Car M3-W) compatible HDMI TX > > > + - renesas,r8a77965-hdmi # for R8A77965 (R-Car M3-N) compatible HDMI TX > > > + - const: renesas,rcar-gen3-hdmi > > > + > > > + reg: true > > > + > > > + reg-io-width: > > > + const: 1 > > > + > > > + clocks: > > > + minItems: 2 > > > + maxItems: 2 > > > > You don't need both, if one is missing the other will be filled by the > > dt-schema tools. In this particular case, I guess maxItems would make > > more sense. > > Fixed. > > > > + > > > + clock-names: > > > + items: > > > + - const: iahb > > > + - const: isfr > > > + > > > + interrupts: true > > > + > > > + ports: > > > + type: object > > > + description: | > > > + This device has three video ports. Their connections are modelled using the > > > + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. > > > + Each port shall have a single endpoint. > > > + > > > + properties: > > > + '#address-cells': > > > + const: 1 > > > + > > > + '#size-cells': > > > + const: 0 > > > + > > > + port@0: > > > + type: object > > > + description: Parallel RGB input port > > > + > > > + port@1: > > > + type: object > > > + description: HDMI output port > > > + > > > + port@2: > > > + type: object > > > + description: Sound input port > > > + > > > + required: > > > + - port@0 > > > + - port@1 > > > + - port@2 > > > + > > > + additionalProperties: false Would it also make sense to use unevaluatedProperties here, and drop #address-cells and #size-cells above as they're already evaluated in synopsys,dw-hdmi.yaml ? > > > + > > > + power-domains: > > > + maxItems: 1 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - clocks > > > + - clock-names > > > + - interrupts > > > + - ports > > > + > > > +additionalProperties: false > > > > In the case where you have some kind of generic schema and then a more > > specific one like you have here, unevaluatedProperties make more sense > > that additionalProperties. > > > > additionalProperties checks that there are no extra properties on the > > current schema, which is a problem here since you have to duplicate > > the entire list of properties found in the generic schema, while > > unevaluatedProperties checks that there are no extra properties in the > > entire set of all schemas that apply to this node. > > > > This way, you can just put what is different from the generic schema, > > and you don't have to keep it in sync. > > > > It's a feature that has been added in the spec of the schemas that > > went on right after the one we support in the tools, so for now the > > kernel meta-schemas only allows that property to be there (just like > > deprecated) but won't do anything. > > > > This should be fixed quite soon however, the library we depend on > > has started to work on that spec apparently. > > Should I postpone this series until support for unevaluatedProperties is > available, to be able to test this ? Also, to make sure I understand this correctly, does it mean I can drop "reg: true" and "interrupts: true" ? -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel