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=-8.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 41FE0C3F2C6 for ; Tue, 3 Mar 2020 18:47:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F39282072D for ; Tue, 3 Mar 2020 18:47:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="J9tCIWgh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728113AbgCCSrN (ORCPT ); Tue, 3 Mar 2020 13:47:13 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:52950 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726899AbgCCSrN (ORCPT ); Tue, 3 Mar 2020 13:47:13 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 72EC32AF; Tue, 3 Mar 2020 19:47:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583261230; bh=U/Og/71bdeBJxFVqfT9cTiJGEF4Dp+GH3QbsZDHKb/0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J9tCIWgh0w8kGnEMwDaF8cd9frQ5hd8uhKmHzPuuh8TFY9mzgFgGEGOGVOqHi4V4d hO19JB/Sz8OZHv6cErjD6liV9jB7dnkfxGg6S9kY5ZrZa5MDoqIxYZ20NC9K+Nu+jW Mgh2k026EFlXSp/t8qsgsEl32jmcVx/8QoApL5qo= Date: Tue, 3 Mar 2020 20:46:49 +0200 From: Laurent Pinchart To: Sam Ravnborg Cc: Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Oleksandr Suvorov , Maxime Ripard , Thierry Reding , Peter Ujfalusi , Steffen Trumtrar , Philipp Zabel Subject: Re: [PATCH v3 2/5] dt-bindings: display: convert display-timings to DT schema Message-ID: <20200303184649.GH11333@pendragon.ideasonboard.com> References: <20200216181513.28109-1-sam@ravnborg.org> <20200216181513.28109-3-sam@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200216181513.28109-3-sam@ravnborg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Sam, Thank you for the patch. On Sun, Feb 16, 2020 at 07:15:10PM +0100, Sam Ravnborg wrote: > Add display-timings.yaml - that references panel-timings.yaml. > display-timings.yaml will be used for display bindings > when they are converted to meta-schema format. > > For now the old display-timing.txt points to the new > display-timings.yaml - and all users are left as-is. > > v2: > - Updated native-mode description > > v3: > - Simpler "^timing" pattern (Rob) > - timing node is of type object (Rob) > - added display-timings to panel-common.yaml > - added yaml document terminator "..." > > Signed-off-by: Sam Ravnborg > Reviewed-by: Rob Herring > Cc: Laurent Pinchart > Cc: Thierry Reding > Cc: Oleksandr Suvorov > Cc: devicetree@vger.kernel.org > --- > .../bindings/display/panel/display-timing.txt | 124 +----------------- > .../display/panel/display-timings.yaml | 77 +++++++++++ > .../bindings/display/panel/panel-common.yaml | 8 ++ > 3 files changed, 86 insertions(+), 123 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yaml > > diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt > index 78222ced1874..7f55ad4a40c4 100644 > --- a/Documentation/devicetree/bindings/display/panel/display-timing.txt > +++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt > @@ -1,123 +1 @@ > -display-timing bindings > -======================= > - > -display-timings node > --------------------- > - > -required properties: > - - none > - > -optional properties: > - - native-mode: The native mode for the display, in case multiple modes are > - provided. When omitted, assume the first node is the native. > - > -timing subnode > --------------- > - > -required properties: > - - hactive, vactive: display resolution > - - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters > - in pixels > - vfront-porch, vback-porch, vsync-len: vertical display timing parameters in > - lines > - - clock-frequency: display clock in Hz > - > -optional properties: > - - hsync-active: hsync pulse is active low/high/ignored > - - vsync-active: vsync pulse is active low/high/ignored > - - de-active: data-enable pulse is active low/high/ignored > - - pixelclk-active: with > - - active high = drive pixel data on rising edge/ > - sample data on falling edge > - - active low = drive pixel data on falling edge/ > - sample data on rising edge > - - ignored = ignored > - - syncclk-active: with > - - active high = drive sync on rising edge/ > - sample sync on falling edge of pixel > - clock > - - active low = drive sync on falling edge/ > - sample sync on rising edge of pixel > - clock > - - omitted = same configuration as pixelclk-active > - - interlaced (bool): boolean to enable interlaced mode > - - doublescan (bool): boolean to enable doublescan mode > - - doubleclk (bool): boolean to enable doubleclock mode > - > -All the optional properties that are not bool follow the following logic: > - <1>: high active > - <0>: low active > - omitted: not used on hardware > - > -There are different ways of describing the capabilities of a display. The > -devicetree representation corresponds to the one commonly found in datasheets > -for displays. If a display supports multiple signal timings, the native-mode > -can be specified. > - > -The parameters are defined as: > - > - +----------+-------------------------------------+----------+-------+ > - | | ^ | | | > - | | |vback_porch | | | > - | | v | | | > - +----------#######################################----------+-------+ > - | # ^ # | | > - | # | # | | > - | hback # | # hfront | hsync | > - | porch # | hactive # porch | len | > - |<-------->#<-------+--------------------------->#<-------->|<----->| > - | # | # | | > - | # |vactive # | | > - | # | # | | > - | # v # | | > - +----------#######################################----------+-------+ > - | | ^ | | | > - | | |vfront_porch | | | > - | | v | | | > - +----------+-------------------------------------+----------+-------+ > - | | ^ | | | > - | | |vsync_len | | | > - | | v | | | > - +----------+-------------------------------------+----------+-------+ > - > -Note: In addition to being used as subnode(s) of display-timings, the timing > - subnode may also be used on its own. This is appropriate if only one mode > - need be conveyed. In this case, the node should be named 'panel-timing'. > - > - > -Example: > - > - display-timings { > - native-mode = <&timing0>; > - timing0: 1080p24 { > - /* 1920x1080p24 */ > - clock-frequency = <52000000>; > - hactive = <1920>; > - vactive = <1080>; > - hfront-porch = <25>; > - hback-porch = <25>; > - hsync-len = <25>; > - vback-porch = <2>; > - vfront-porch = <2>; > - vsync-len = <2>; > - hsync-active = <1>; > - }; > - }; > - > -Every required property also supports the use of ranges, so the commonly used > -datasheet description with minimum, typical and maximum values can be used. > - > -Example: > - > - timing1: timing { > - /* 1920x1080p24 */ > - clock-frequency = <148500000>; > - hactive = <1920>; > - vactive = <1080>; > - hsync-len = <0 44 60>; > - hfront-porch = <80 88 95>; > - hback-porch = <100 148 160>; > - vfront-porch = <0 4 6>; > - vback-porch = <0 36 50>; > - vsync-len = <0 5 6>; > - }; > +See display-timings.yaml in this directory. > diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml > new file mode 100644 > index 000000000000..c8c0c9cb0492 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml > @@ -0,0 +1,77 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/panel/display-timings.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: display timing bindings s/timing/timings/ > + > +maintainers: > + - Thierry Reding > + - Laurent Pinchart > + - Sam Ravnborg > + > +description: | > + A display panel may be able to handle several display timings, > + with different resolutions. > + The display-timings node makes it possible to specify the timing s/the timing/the timings/ > + and to specify the timing that is native for the display. > + > +properties: > + $nodename: > + const: display-timings > + > + native-mode: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: | > + The default display timing is the one specified as native-mode. > + If no native-mode is specified then the first node is assumed the s/assumed the/assumed to be the/ > + native mode. > + > +patternProperties: > + "^timing": Should this be "^timing[0-9]*$", or do we want to allow or names ? > + type: object > + allOf: > + - $ref: panel-timing.yaml# > + > +additionalProperties: false > + > +examples: > + - |+ > + > + /* > + * Example that specifies panel timing using minimum, typical, > + * maximum values as commonly used in datasheet description. > + * timing1 is the native-mode. > + */ > + display-timings { > + native-mode = <&timing1>; Does this compile, as there's no phandle named timing1 ? > + timing0 { > + /* 1920x1080p24 */ > + clock-frequency = <148500000>; > + hactive = <1920>; > + vactive = <1080>; > + hsync-len = <0 44 60>; > + hfront-porch = <80 88 95>; > + hback-porch = <100 148 160>; > + vfront-porch = <0 4 6>; > + vback-porch = <0 36 50>; > + vsync-len = <0 5 6>; > + }; > + timing1 { > + /* 1920x1080p24 */ > + clock-frequency = <52000000>; > + hactive = <1920>; > + vactive = <1080>; > + hfront-porch = <25>; > + hback-porch = <25>; > + hsync-len = <0 25 25>; > + vback-porch = <2>; > + vfront-porch = <2>; > + vsync-len = <2>; > + hsync-active = <1>; > + pixelclk-active = <1>; > + }; > + }; > + > +... > diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml > index 8070c439adbd..ed051ba12084 100644 > --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml > @@ -61,6 +61,14 @@ properties: > allOf: > - $ref: panel-timing.yaml# > > + display-timings: > + description: > + Some display panels supports several resolutions with different timing. s/timing/timings/ > + The display-timings bindings supports specifying several timings and > + optional specify which is the native mode. s/optional/optionally/ With these small issues fixed, Reviewed-by: Laurent Pinchart Great work ! > + allOf: > + - $ref: display-timings.yaml# > + > # Connectivity > port: > type: object -- Regards, Laurent Pinchart