From patchwork Wed Jun 19 21:51:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 167274 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1236534ilk; Wed, 19 Jun 2019 14:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRW2Y2SWYhfD69xK26rM53j5Mv8gPW/2XWhh+FjoqflfYDzH40HXSjwSlL2Fa5x0+Y/xc4 X-Received: by 2002:a63:6cc9:: with SMTP id h192mr9588050pgc.339.1560981123092; Wed, 19 Jun 2019 14:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560981123; cv=none; d=google.com; s=arc-20160816; b=haqLfdLMD9W997aTwoPH2llUCrOmJ10E3me7CYhSZw78u7nJRm3kaleMCM0AH5hZ0D /w/4kdESuBBlRs8DoJ9oxwGJFlGAJ02d6ccLOcLa0KwWSMxkEAlEWTAvzlM9oJAexCP8 Jg6s+zBnWpumilhujgHVGwqQt7QndnkeIf2Tyx2tb/ZTJlwE7M72f/Q3o0rSzrReu3ay dLY7CzaGzvgvV7xlStp+sFJOpmdmx8GLUROMdXQw36AuRb+Ijdu/P1NQbSxvs990BxMU KHeIPfPgZqDKB8n95xIC7js5q/fA9vaGBqwF7E3aWtADLB3oMET68sYOgLthkkJPp6hq mvlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SeU+6ayX57pqUJgQ0nugUAqwXL5OiS+VO6UHEChU69Q=; b=s99tTvX23cCrNeZgQmi0c/WGum3Lj3ZBRk7hqvMArTPCI/LtHmIMiSxWp7IHGvSH6e zcD1f5uILAJve5dQ7VqPerW3nhtUS3WiSAQQN2Ey2TOPxA6tYTWheJoPRz5HFCauENFS fJSJmO/kINCEVz2LqpvqlBgvCZExCwff6iPIXbpnwNkpwI9RPPdUslq4KKUdQjf+NkrI 7+Ve+lkSmFg0bBgpUaEUZfUzboqw3oEmHLKufoVm3T+NAQOwkjr9a5BQmvw3/Vy3JILl FKcfw3EoK65GzDSq7+MH7GT74aEFLICsVVGq4xssfzD2QrFPJEqXOT7NsZGb2wvC/MG0 U9/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si3836219pgs.168.2019.06.19.14.52.02; Wed, 19 Jun 2019 14:52:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726321AbfFSVwB (ORCPT + 8 others); Wed, 19 Jun 2019 17:52:01 -0400 Received: from mail-io1-f51.google.com ([209.85.166.51]:39221 "EHLO mail-io1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfFSVwB (ORCPT ); Wed, 19 Jun 2019 17:52:01 -0400 Received: by mail-io1-f51.google.com with SMTP id r185so732386iod.6; Wed, 19 Jun 2019 14:52:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SeU+6ayX57pqUJgQ0nugUAqwXL5OiS+VO6UHEChU69Q=; b=o7BjArAvmhFpm4Aj96gfaalyS4K9qyG+0UnsnEzvo16aRiUizzFHcRtD8RwyatuDZM /fX59PtmHWluFHDMds3MYE+Rrh8EvVT2kM+H+os861kgBuAPjm2gA/Bfcq+b73xjhUb2 AlFpy8gMsA3KivXZHhGa6OOAI/bu/SBgsKWdHJSI4F/6MqAvlg2CJuoblxhY+OgXwi9b cKFcvoj4q5x9rjO3LI5UOpD3hp+f3r1Wt6B5ZvKN2CIT/S42Ir9HosemnHBB/fTeSwCU N/HzgIljAK0nsPNeUFNytQ39Rn4gIRmjFZtp2riNNtksD9K5MbNSaOlDVYVryJnofSyq VOfg== X-Gm-Message-State: APjAAAXu2hCBEigZ/2RoUeQIJVOhFezviM/WOsUOugUZRPlbTLPNfD6o 2Y2ougt+BbJtsDVpW0aTIQ== X-Received: by 2002:a6b:c80a:: with SMTP id y10mr10747931iof.170.1560981120173; Wed, 19 Jun 2019 14:52:00 -0700 (PDT) Received: from localhost.localdomain ([64.188.179.247]) by smtp.googlemail.com with ESMTPSA id e84sm37754698iof.39.2019.06.19.14.51.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 14:51:59 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Thierry Reding , Sam Ravnborg , Maxime Ripard , Laurent Pinchart Subject: [RFC PATCH 1/4] dt-bindings: display: Convert common panel bindings to DT schema Date: Wed, 19 Jun 2019 15:51:53 -0600 Message-Id: <20190619215156.27795-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert the common panel bindings to DT schema consolidating scattered definitions to a single schema file. The 'simple-panel' binding just a collection of properties and not a complete binding itself. All of the 'simple-panel' properties are covered by the panel-common.txt binding with the exception of the 'no-hpd' property, so add that to the schema. As there are lots of references to simple-panel.txt, just keep the file with a reference to panel-common.yaml for now until all the bindings are converted. Cc: Thierry Reding Cc: Sam Ravnborg Cc: Maxime Ripard Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring --- Note there's still some references to panel-common.txt that I need to update or just go ahead and convert to schema. .../bindings/display/panel/panel-common.txt | 101 ------------- .../bindings/display/panel/panel-common.yaml | 143 ++++++++++++++++++ .../bindings/display/panel/panel.txt | 4 - .../bindings/display/panel/simple-panel.txt | 29 +--- 4 files changed, 144 insertions(+), 133 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.yaml delete mode 100644 Documentation/devicetree/bindings/display/panel/panel.txt -- 2.20.1 Acked-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Maxime Ripard Reviewed-by: Maxime Ripard Acked-by: Thierry Reding Acked-by: Thierry Reding Acked-by: Thierry Reding diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.txt b/Documentation/devicetree/bindings/display/panel/panel-common.txt deleted file mode 100644 index 5d2519af4bb5..000000000000 --- a/Documentation/devicetree/bindings/display/panel/panel-common.txt +++ /dev/null @@ -1,101 +0,0 @@ -Common Properties for Display Panel -=================================== - -This document defines device tree properties common to several classes of -display panels. It doesn't constitue a device tree binding specification by -itself but is meant to be referenced by device tree bindings. - -When referenced from panel device tree bindings the properties defined in this -document are defined as follows. The panel device tree bindings are -responsible for defining whether each property is required or optional. - - -Descriptive Properties ----------------------- - -- width-mm, -- height-mm: The width-mm and height-mm specify the width and height of the - physical area where images are displayed. These properties are expressed in - millimeters and rounded to the closest unit. - -- label: The label property specifies a symbolic name for the panel as a - string suitable for use by humans. It typically contains a name inscribed on - the system (e.g. as an affixed label) or specified in the system's - documentation (e.g. in the user's manual). - - If no such name exists, and unless the property is mandatory according to - device tree bindings, it shall rather be omitted than constructed of - non-descriptive information. For instance an LCD panel in a system that - contains a single panel shall not be labelled "LCD" if that name is not - inscribed on the system or used in a descriptive fashion in system - documentation. - - -Display Timings ---------------- - -- panel-timing: 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. - - -Connectivity ------------- - -- ports: Panels receive video data through one or multiple connections. While - the nature of those connections is specific to the panel type, the - connectivity is expressed in a standard fashion using ports as specified in - the device graph bindings defined in - Documentation/devicetree/bindings/graph.txt. - -- ddc-i2c-bus: Some panels expose EDID information through an I2C-compatible - bus such as DDC2 or E-DDC. For such panels the ddc-i2c-bus contains a - phandle to the system I2C controller connected to that bus. - - -Control I/Os ------------- - -Many display panels can be controlled through pins driven by GPIOs. The nature -and timing of those control signals are device-specific and left for panel -device tree bindings to specify. The following GPIO specifiers can however be -used for panels that implement compatible control signals. - -- enable-gpios: Specifier for a GPIO connected to the panel enable control - signal. The enable signal is active high and enables operation of the panel. - This property can also be used for panels implementing an active low power - down signal, which is a negated version of the enable signal. Active low - enable signals (or active high power down signals) can be supported by - inverting the GPIO specifier polarity flag. - - Note that the enable signal control panel operation only and must not be - confused with a backlight enable signal. - -- reset-gpios: Specifier for a GPIO coonnected to the panel reset control - signal. The reset signal is active low and resets the panel internal logic - while active. Active high reset signals can be supported by inverting the - GPIO specifier polarity flag. - -Power ------ - -- power-supply: display panels require power to be supplied. While several - panels need more than one power supply with panel-specific constraints - governing the order and timings of the power supplies, in many cases a single - power supply is sufficient, either because the panel has a single power rail, - or because all its power rails can be driven by the same supply. In that case - the power-supply property specifies the supply powering the panel as a phandle - to a regulator. - -Backlight ---------- - -Most display panels include a backlight. Some of them also include a backlight -controller exposed through a control bus such as I2C or DSI. Others expose -backlight control through GPIO, PWM or other signals connected to an external -backlight controller. - -- backlight: For panels whose backlight is controlled by an external backlight - controller, this property contains a phandle that references the controller. diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml new file mode 100644 index 000000000000..6fe87254edad --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@ -0,0 +1,143 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for Display Panels + +maintainers: + - Thierry Reding + - Laurent Pinchart + +description: | + This document defines device tree properties common to several classes of + display panels. It doesn't constitue a device tree binding specification by + itself but is meant to be referenced by device tree bindings. + + When referenced from panel device tree bindings the properties defined in this + document are defined as follows. The panel device tree bindings are + responsible for defining whether each property is required or optional. + + +properties: + # Descriptive Properties + width-mm: + description: The width-mm and height-mm specify the width and height of the + physical area where images are displayed. These properties are expressed + in millimeters and rounded to the closest unit. + + height-mm: + description: The width-mm and height-mm specify the width and height of the + physical area where images are displayed. These properties are expressed + in millimeters and rounded to the closest unit. + + label: + description: | + The label property specifies a symbolic name for the panel as a + string suitable for use by humans. It typically contains a name inscribed + on the system (e.g. as an affixed label) or specified in the system's + documentation (e.g. in the user's manual). + + If no such name exists, and unless the property is mandatory according to + device tree bindings, it shall rather be omitted than constructed of + non-descriptive information. For instance an LCD panel in a system that + contains a single panel shall not be labelled "LCD" if that name is not + inscribed on the system or used in a descriptive fashion in system + documentation. + + rotation: + description: + Display rotation in degrees counter clockwise (0,90,180,270) + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 0, 90, 180, 270 ] + + # 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. + + # Connectivity + ports: + type: object + description: + Panels receive video data through one or multiple connections. While + the nature of those connections is specific to the panel type, the + connectivity is expressed in a standard fashion using ports as specified + in the device graph bindings defined in + Documentation/devicetree/bindings/graph.txt. + + ddc-i2c-bus: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Some panels expose EDID information through an I2C-compatible + bus such as DDC2 or E-DDC. For such panels the ddc-i2c-bus contains a + phandle to the system I2C controller connected to that bus. + + no-hpd: + type: boolean + description: + This panel is supposed to communicate that it's ready via HPD + (hot plug detect) signal, but the signal isn't hooked up so we should + hardcode the max delay from the panel spec when powering up the panel. + + # Control I/Os + + # Many display panels can be controlled through pins driven by GPIOs. The nature + # and timing of those control signals are device-specific and left for panel + # device tree bindings to specify. The following GPIO specifiers can however be + # used for panels that implement compatible control signals. + + enable-gpios: + maxItems: 1 + description: | + Specifier for a GPIO connected to the panel enable control signal. The + enable signal is active high and enables operation of the panel. This + property can also be used for panels implementing an active low power down + signal, which is a negated version of the enable signal. Active low enable + signals (or active high power down signals) can be supported by inverting + the GPIO specifier polarity flag. + + Note that the enable signal control panel operation only and must not be + confused with a backlight enable signal. + + reset-gpios: + maxItems: 1 + description: + Specifier for a GPIO coonnected to the panel reset control signal. + The reset signal is active low and resets the panel internal logic + while active. Active high reset signals can be supported by inverting the + GPIO specifier polarity flag. + + # Power + power-supply: + description: + Display panels require power to be supplied. While several panels need + more than one power supply with panel-specific constraints governing the + order and timings of the power supplies, in many cases a single power + supply is sufficient, either because the panel has a single power rail, or + because all its power rails can be driven by the same supply. In that case + the power-supply property specifies the supply powering the panel as a + phandle to a regulator. + + # Backlight + + # Most display panels include a backlight. Some of them also include a backlight + # controller exposed through a control bus such as I2C or DSI. Others expose + # backlight control through GPIO, PWM or other signals connected to an external + # backlight controller. + + backlight: + $ref: /schemas/types.yaml#/definitions/phandle + description: + For panels whose backlight is controlled by an external backlight + controller, this property contains a phandle that references the + controller. + +... diff --git a/Documentation/devicetree/bindings/display/panel/panel.txt b/Documentation/devicetree/bindings/display/panel/panel.txt deleted file mode 100644 index e2e6867852b8..000000000000 --- a/Documentation/devicetree/bindings/display/panel/panel.txt +++ /dev/null @@ -1,4 +0,0 @@ -Common display properties -------------------------- - -- rotation: Display rotation in degrees counter clockwise (0,90,180,270) diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index b2b872c710f2..e11208fb7da8 100644 --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt @@ -1,28 +1 @@ -Simple display panel -==================== - -panel node ----------- - -Required properties: -- power-supply: See panel-common.txt - -Optional properties: -- ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing -- enable-gpios: GPIO pin to enable or disable the panel -- backlight: phandle of the backlight device attached to the panel -- no-hpd: This panel is supposed to communicate that it's ready via HPD - (hot plug detect) signal, but the signal isn't hooked up so we should - hardcode the max delay from the panel spec when powering up the panel. - -Example: - - panel: panel { - compatible = "cptt,claa101wb01"; - ddc-i2c-bus = <&panelddc>; - - power-supply = <&vdd_pnl_reg>; - enable-gpios = <&gpio 90 0>; - - backlight = <&backlight>; - }; +See panel-common.yaml in this directory.