From patchwork Sun Feb 16 18:15:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 204750 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 9387DC7619B for ; Sun, 16 Feb 2020 18:15:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5852D22B48 for ; Sun, 16 Feb 2020 18:15:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qMH1yGMx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgBPSPi (ORCPT ); Sun, 16 Feb 2020 13:15:38 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37803 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgBPSPi (ORCPT ); Sun, 16 Feb 2020 13:15:38 -0500 Received: by mail-lj1-f194.google.com with SMTP id q23so123110ljm.4 for ; Sun, 16 Feb 2020 10:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z1FS8LRkofyBHE69m1Zyhg/WI9Rx8nKgyKT0srC+cRo=; b=qMH1yGMxnCKf2wH9KEXgnVlplNDlwcNW8UjPMMuxLoMRJId7YEwuO5/GrebUE8S+FH Sulh5RCJXkyD00QMCbqYPWO52rjCXUPi/jl9orH33edagfA6DAOTn6wsLYiG+XduCji8 aoNtZk0tDrzyzuS1+JsmMdhSlMHnmJoZ40KHbtmx2G1XznVZ6NG72oZKY3qnrK/j+PLE HhpxIZNq2DUiFM+2jNwfATIABI8tQv7BOPLUFC5PlFcO02yjsWibyzk+dkYGk/OYTPr4 shSY3YmGo4zkHReFAz4+5tAvMM7P5mm1Sl5peLTFNwUPQBDmRLY+ucQPhoHzrsy3o6R1 zTxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=z1FS8LRkofyBHE69m1Zyhg/WI9Rx8nKgyKT0srC+cRo=; b=H1tNyL/L4Gue6ZJaix1jdQ/1ERYqkW6R8eEACfOOHjE9XzNFrC9DzvJdXetUYmMcoz /cku8jUczWoDDMRYGE214pVWLRBNunrqARKP4Owh8SwmDG48zAQyFLjqznyvGq3tKcOr Co5jAB8Eye29iujVJhV/lH3oAcNKcR9qSc0iPP/8yW9RMWSpmtgHzIYjDKbMxRFfBXKL /4u0BhrdDP2SCbeNcI6d+VG6ERavoAFyu36qBAtTwYpZOEQ4kTIetBKbpp9/sadvg27K /6IR1vORzSKEL0ztit//zm20DgHafjqh5y+AVo9vbtXxmaUg38WvU3rhefPYo+FGbh3k MYcQ== X-Gm-Message-State: APjAAAV/8tWS+WX02cNz3SROpW2dU1o1s9WvPFzjjW+aNdh37BZyPB7V 67DBXZiWur2CGmlpmag/mSQ= X-Google-Smtp-Source: APXvYqxJJ7oR4UI999iQrrb/Jue334NRNSViCmiMcgqZ+R5dLrf1D0klzF0tUR5OQPr7XEGmtlVYlw== X-Received: by 2002:a2e:9a04:: with SMTP id o4mr7953969lji.214.1581876934785; Sun, 16 Feb 2020 10:15:34 -0800 (PST) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id u15sm6157431lfl.87.2020.02.16.10.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 10:15:33 -0800 (PST) From: Sam Ravnborg To: Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Oleksandr Suvorov , Maxime Ripard , Laurent Pinchart , Thierry Reding , Peter Ujfalusi , Steffen Trumtrar , Philipp Zabel , Sam Ravnborg Subject: [PATCH v3 1/5] dt-bindings: display: add panel-timing.yaml Date: Sun, 16 Feb 2020 19:15:09 +0100 Message-Id: <20200216181513.28109-2-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200216181513.28109-1-sam@ravnborg.org> References: <20200216181513.28109-1-sam@ravnborg.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add meta-schema variant of panel-timing and reference it from panel-common.yaml. Part of this came form other files with other licenses - original commits: cc3f414cf2e4 ("video: add of helper for display timings/videomode") 86f46565dff3 ("dt-bindings: display: display-timing: Add property to configure sync drive edge") 9cad9c95d7e8 ("Documentation: DocBook DRM framework documentation") The original authors acked the license change to: (GPL-2.0-only OR BSD-2-Clause) v2: - Got OK from original authors for re-license Huge thanks for the quick replies! - Typo fixes (Oleksandr) - Drop -array variant when not needed (Maxime) - Replace oneOf:... with enum (Maxime) - Drop type from clock-frequency (Rob) - Drop "|" when not needed (Rob) v3: - Added comment to acks that are only for the license change - Add yaml document terminator "..." - Updated description (removed reference to native-mode) Signed-off-by: Sam Ravnborg Acked-by: Laurent Pinchart [license change] Acked-by: Peter Ujfalusi [license change] Acked-by: Steffen Trumtrar [license change] Acked-by: Philipp Zabel [license change] Reviewed-by: Rob Herring Cc: Thierry Reding Cc: Oleksandr Suvorov Cc: Maxime Ripard Cc: devicetree@vger.kernel.org --- .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-timing.yaml | 227 ++++++++++++++++++ 2 files changed, 230 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yaml diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml index ef8d8cdfcede..8070c439adbd 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@ -54,13 +54,12 @@ properties: # Display Timings panel-timing: - type: object description: Most display panels are restricted to a single resolution and require specific display timings. The panel-timing subnode expresses those - timings as specified in the timing subnode section of the display timing - bindings defined in - Documentation/devicetree/bindings/display/panel/display-timing.txt. + timings. + allOf: + - $ref: panel-timing.yaml# # Connectivity port: diff --git a/Documentation/devicetree/bindings/display/panel/panel-timing.yaml b/Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file mode 100644 index 000000000000..bd558ad7891f --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/panel-timing.yaml @@ -0,0 +1,227 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-timing.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: panel timing bindings + +maintainers: + - Thierry Reding + - Sam Ravnborg + +description: | + There are different ways of describing the timing data of a panel. The + devicetree representation corresponds to the one commonly found in datasheets + for panels. + + The parameters are defined as seen in the following illustration. + + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vback_porch | | | + | | v | | | + +----------#######################################----------+-------+ + | # ^ # | | + | # | # | | + | hback # | # hfront | hsync | + | porch # | hactive # porch | len | + |<-------->#<-------+--------------------------->#<-------->|<----->| + | # | # | | + | # |vactive # | | + | # | # | | + | # v # | | + +----------#######################################----------+-------+ + | | ^ | | | + | | |vfront_porch | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vsync_len | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + + + The following is the panel timings shown with time on the x-axis. + This matches the timing diagrams often found in data sheets. + + Active Front Sync Back + Region Porch Porch + <-----------------------><----------------><-------------><--------------> + //////////////////////| + ////////////////////// | + ////////////////////// |.................. ................ + _______________ + + Timing can be specified either as a typical value or as a tuple + of min, typ, max values. + +properties: + + clock-frequency: + description: Panel clock in Hz + + hactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Horizontal panel resolution in pixels + + vactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Vertical panel resolution in pixels + + hfront-porch: + description: Horizontal front porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels + + hback-porch: + description: Horizontal back porch timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels + + hsync-len: + description: Horizontal sync length panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels + + vfront-porch: + description: Vertical front porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + vback-porch: + description: Vertical back porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + vsync-len: + description: Vertical sync length panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + hsync-active: + description: | + Horizontal sync pulse. + 0 selects active low, 1 selects active high. + If omitted then it is not used by the hardware + enum: [0, 1] + + vsync-active: + description: | + Vertical sync pulse. + 0 selects active low, 1 selects active high. + If omitted then it is not used by the hardware + enum: [0, 1] + + de-active: + description: | + Data enable. + 0 selects active low, 1 selects active high. + If omitted then it is not used by the hardware + enum: [0, 1] + + pixelclk-active: + description: | + Data driving on rising or falling edge. + Use 0 to drive pixel data on falling edge and + sample data on rising edge. + Use 1 to drive pixel data on rising edge and + sample data on falling edge + enum: [0, 1] + + syncclk-active: + description: | + Drive sync on rising or sample sync on falling edge. + If not specified then the setup is as specified by pixelclk-active. + Use 0 to drive sync on falling edge and + sample sync on rising edge of pixel clock. + Use 1 to drive sync on rising edge and + sample sync on falling edge of pixel clock + enum: [0, 1] + + interlaced: + type: boolean + description: Enable interlaced mode + + doublescan: + type: boolean + description: Enable double scan mode + + doubleclk: + type: boolean + description: Enable double clock mode + +required: + - clock-frequency + - hactive + - vactive + - hfront-porch + - hback-porch + - hsync-len + - vfront-porch + - vback-porch + - vsync-len + +additionalProperties: false + +... From patchwork Sun Feb 16 18:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 204749 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=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 DC0C5C7619C for ; Sun, 16 Feb 2020 18:15:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6CE924676 for ; Sun, 16 Feb 2020 18:15:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JE//nzDh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbgBPSPl (ORCPT ); Sun, 16 Feb 2020 13:15:41 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:37501 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgBPSPl (ORCPT ); Sun, 16 Feb 2020 13:15:41 -0500 Received: by mail-lf1-f67.google.com with SMTP id b15so10214045lfc.4 for ; Sun, 16 Feb 2020 10:15:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VOa5BvEVC53gAxDGC2Az8GeC+PWsDupUY7BePlsJCzY=; b=JE//nzDhbJRZDEWoj65+j0fBdf4afIh+REZdLrUatpuJfHyk5SFggtpQokzTex9HOC 8N7AxOWr/+9oyWpTqYL5/QleNcV/2C1w5t7Tioj4D+Ntp35Yi9qe586UaPUX5m0ho+s7 htAGtgZEOOmQ12YhqIkDD/OVQQARgAs/hCYi+z9TNPynfyEyXoAc1Sjaq9z/JWBNuuLc X9L7EV3dnTs3+SrWrMLFdas2ZHz0YT34qGktjk5/oBhNB5fk1DMfrgwuDYT7/xnF6KHt N8hSLXpcolzW8FVsD+dK2eulCXkpu2NMEoibKnqgOmQQwrIa6dk8hHpMGZx3XAe6hW0D 4lbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VOa5BvEVC53gAxDGC2Az8GeC+PWsDupUY7BePlsJCzY=; b=BiEUi1Ws1InFdm+H77VBB5EY6DsT8B6q29BuezDaUAKQXyoiRUwWWIHCbyRW9IG7L4 Ry/pfMIsDItTDWcE1H4ezD+PITEH3KP+9GgtCCH9JeWVf/0tPbosPiu5VBRZ8Ds0suqT kbhCCxYklUrPXjDCwMHd9qUQESh25itfWJv2gMvYOWejVE/yVJz5NuMj5a5RWoLcnFUJ RVbOZKNRQn319fGqFxut343LMyzVqJKcGsHeV5BCitO6EUMRLb/iBXRUca82lwTo44Ly aIGAgeXdU5wSq6+xTkP90d2h8Ah0wP6GW43kWMC0q4BYMJVjiNEtqrT7oDpMFSOOR6NI b28A== X-Gm-Message-State: APjAAAViZp+HgMLc6iDIYDrLelvh+UNnRK7Yb0aPL/s2ZRR+FXbW2lY8 jeLJooY0XMBSe5wuoH2xwQk= X-Google-Smtp-Source: APXvYqxFx+f4n79IKFN5yY6IXfp11xLEIaNyV8NpiBY8wsoxTO2N5b6whFvxeE3ZgsfI+YSfF9wIbA== X-Received: by 2002:a19:7015:: with SMTP id h21mr6051881lfc.68.1581876938935; Sun, 16 Feb 2020 10:15:38 -0800 (PST) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id u15sm6157431lfl.87.2020.02.16.10.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 10:15:38 -0800 (PST) From: Sam Ravnborg To: Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Cc: Oleksandr Suvorov , Maxime Ripard , Laurent Pinchart , Thierry Reding , Peter Ujfalusi , Steffen Trumtrar , Philipp Zabel , Sam Ravnborg Subject: [PATCH v3 4/5] dt-bindings: display: add data-mapping to panel-dpi Date: Sun, 16 Feb 2020 19:15:12 +0100 Message-Id: <20200216181513.28109-5-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200216181513.28109-1-sam@ravnborg.org> References: <20200216181513.28109-1-sam@ravnborg.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add data-mapping property that can be used to specify the media format used for the connection betwwen the display controller (connector) and the panel. Signed-off-by: Sam Ravnborg --- .../devicetree/bindings/display/panel/panel-dpi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml index 40079fc24a63..6a03d2449701 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml @@ -21,6 +21,16 @@ properties: - {} - const: panel-dpi + data-mapping: + enum: + - rgb24 + - rgb565 + - bgr666 + - lvds666 + description: | + Describes the media format, how the display panel is connected + to the display interface. + backlight: true enable-gpios: true height-mm: true @@ -43,7 +53,7 @@ examples: compatible = "osddisplays,osd057T0559-34ts", "panel-dpi"; label = "osddisplay"; power-supply = <&vcc_supply>; - + data-mapping = "lvds666"; backlight = <&backlight>; port {