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 44BC3C2BA19 for ; Mon, 6 Apr 2020 07:57:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19F7A20731 for ; Mon, 6 Apr 2020 07:57:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="mT9xqArb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dbgXULK3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbgDFH5J (ORCPT ); Mon, 6 Apr 2020 03:57:09 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52491 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgDFH5J (ORCPT ); Mon, 6 Apr 2020 03:57:09 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4D5705C00FF; Mon, 6 Apr 2020 03:57:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 06 Apr 2020 03:57:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=uipbJ06evO1VWcERbTQwcDSZSz6 wiDJ3u9oVtH6H1PU=; b=mT9xqArbayew8An+Cs02objwfBKX0A3SEjcLnFiwWSx 2Vpezay7VUkviAttp0sWMo8hsn2Fr+f5zQavI4Y182ChEp20OPUyqjAHyJCmHePo 2PI7kfl1L+xlOonMNOV1vR362ntNzsrdFxom8NskVlnqmxIfbslg8qZ/Bgu479jf uHvyI9vSE/u7gxYXcRRRhk3NObUsofRUH8c4DSTon0J1t7wCI+6nlXkXqKWi4EsD FMKxC9+exWF6dmUWX5j7dPWZg8Ot8weHt94QX0lNVJndnmfaJTvB2ELGzS7A4Dd6 Rz1ZmZfHX3HWkHB0fxsXQI72JSN+AM291zvpHlRWD7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uipbJ0 6evO1VWcERbTQwcDSZSz6wiDJ3u9oVtH6H1PU=; b=dbgXULK36Ts/4nbbv39hh+ Wp+zH9pBB0t9uI96NisCvIW0H5phaJNCfeMXzljhseKWfdoc3ofrRgujTfP6/U3a dUyX5/2IeBmxSha2/P1GW7KMJxZbNmCADt2EkktQOqzXeFhjVzmGXbt6xWgHjeeB Sq6QxhLKMEgPr5aP1Kj7Gk1kREGnxIfEivxyhviC+m04U7la2lkcIjI7wewlWHM/ MLUvR0waAcf7at1uyea863H1pUXVusu/xHXnN72qK1YJX+qucXpsJeZtzNqh2NmL vHxCk6rDYp6rCeAo4Q8tKuE9/LBBuTCC/eqvKWn14gHxh+KUUuoK0d5XV/5dkt0w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuffhomhgrih hnpeguvghvihgtvghtrhgvvgdrohhrghenucfkphepledtrdekledrieekrdejieenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvg estggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id C7DC9328005D; Mon, 6 Apr 2020 03:57:06 -0400 (EDT) Date: Mon, 6 Apr 2020 09:57:05 +0200 From: Maxime Ripard To: Laurent Pinchart Cc: 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: <20200406075705.a67tjx7jamdvqpl3@gilmour.lan> References: <20200405233935.27599-1-laurent.pinchart+renesas@ideasonboard.com> <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r46jetkjwl7c5lrh" Content-Disposition: inline In-Reply-To: <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --r46jetkjwl7c5lrh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, 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. > + > + 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 > + > + 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. Maxime --r46jetkjwl7c5lrh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXorg0QAKCRDj7w1vZxhR xSn9AQDZooBi+cEuzpY81Mw7K18vMAyT3l83sgKXhjGIk9xvowD7B3lpQdTGblz4 W5wB2hPhkp+cVu9VkpSFh4tpuXYvXAI= =GFZ5 -----END PGP SIGNATURE----- --r46jetkjwl7c5lrh-- 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.5 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 3C3E4C2BA16 for ; Tue, 7 Apr 2020 08:09:41 +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 0ED6B2074F for ; Tue, 7 Apr 2020 08:09:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="mT9xqArb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dbgXULK3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0ED6B2074F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech 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 0E9386E59B; Tue, 7 Apr 2020 08:09:33 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id C06296E2D5 for ; Mon, 6 Apr 2020 07:57:09 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4D5705C00FF; Mon, 6 Apr 2020 03:57:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 06 Apr 2020 03:57:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=uipbJ06evO1VWcERbTQwcDSZSz6 wiDJ3u9oVtH6H1PU=; b=mT9xqArbayew8An+Cs02objwfBKX0A3SEjcLnFiwWSx 2Vpezay7VUkviAttp0sWMo8hsn2Fr+f5zQavI4Y182ChEp20OPUyqjAHyJCmHePo 2PI7kfl1L+xlOonMNOV1vR362ntNzsrdFxom8NskVlnqmxIfbslg8qZ/Bgu479jf uHvyI9vSE/u7gxYXcRRRhk3NObUsofRUH8c4DSTon0J1t7wCI+6nlXkXqKWi4EsD FMKxC9+exWF6dmUWX5j7dPWZg8Ot8weHt94QX0lNVJndnmfaJTvB2ELGzS7A4Dd6 Rz1ZmZfHX3HWkHB0fxsXQI72JSN+AM291zvpHlRWD7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uipbJ0 6evO1VWcERbTQwcDSZSz6wiDJ3u9oVtH6H1PU=; b=dbgXULK36Ts/4nbbv39hh+ Wp+zH9pBB0t9uI96NisCvIW0H5phaJNCfeMXzljhseKWfdoc3ofrRgujTfP6/U3a dUyX5/2IeBmxSha2/P1GW7KMJxZbNmCADt2EkktQOqzXeFhjVzmGXbt6xWgHjeeB Sq6QxhLKMEgPr5aP1Kj7Gk1kREGnxIfEivxyhviC+m04U7la2lkcIjI7wewlWHM/ MLUvR0waAcf7at1uyea863H1pUXVusu/xHXnN72qK1YJX+qucXpsJeZtzNqh2NmL vHxCk6rDYp6rCeAo4Q8tKuE9/LBBuTCC/eqvKWn14gHxh+KUUuoK0d5XV/5dkt0w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuffhomhgrih hnpeguvghvihgtvghtrhgvvgdrohhrghenucfkphepledtrdekledrieekrdejieenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvg estggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id C7DC9328005D; Mon, 6 Apr 2020 03:57:06 -0400 (EDT) Date: Mon, 6 Apr 2020 09:57:05 +0200 From: Maxime Ripard To: Laurent Pinchart Subject: Re: [PATCH/RFC 2/6] dt-bindings: display: bridge: renesas,dw-hdmi: Convert binding to YAML Message-ID: <20200406075705.a67tjx7jamdvqpl3@gilmour.lan> References: <20200405233935.27599-1-laurent.pinchart+renesas@ideasonboard.com> <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 In-Reply-To: <20200405233935.27599-3-laurent.pinchart+renesas@ideasonboard.com> X-Mailman-Approved-At: Tue, 07 Apr 2020 08:09:31 +0000 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, Sandy Huang , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Mark Yao Content-Type: multipart/mixed; boundary="===============1371709643==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1371709643== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r46jetkjwl7c5lrh" Content-Disposition: inline --r46jetkjwl7c5lrh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, 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. > + > + 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 > + > + 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. Maxime --r46jetkjwl7c5lrh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXorg0QAKCRDj7w1vZxhR xSn9AQDZooBi+cEuzpY81Mw7K18vMAyT3l83sgKXhjGIk9xvowD7B3lpQdTGblz4 W5wB2hPhkp+cVu9VkpSFh4tpuXYvXAI= =GFZ5 -----END PGP SIGNATURE----- --r46jetkjwl7c5lrh-- --===============1371709643== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1371709643==--