From patchwork Mon Jun 24 21:56:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 167664 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4733657ilk; Mon, 24 Jun 2019 14:59:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7iBveGG9WZFESuZqTUaI/C+DjMC5nt792Zjaf3D5eGkdu9hUNiAOJoF2Ci0q2z7NqnH2F X-Received: by 2002:a63:570c:: with SMTP id l12mr7943987pgb.25.1561413575373; Mon, 24 Jun 2019 14:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561413575; cv=none; d=google.com; s=arc-20160816; b=R/u7p2kYp1XX2XL8dxvd6ZcWbT/qhNVTlvYEBot1r/mfUrhbgOBrLPTSKkAU+85mSA 3I8nH3uU46fPgDCGLmhjtvKu+7l+SEC72AjgAgjJu6KBqf8oQLfN511GcyjqxznvzMaa Kv3ghacZ65SOk3B+pINsIXSh19b5U/ocfdXpjZaWmpLe51+KNMS77AtiNL1c+GB8F3vz G1EFWjQOIpnZ8iFDFWx/MFk8dDUc6tFLBdt8jysd8h4yvPTc8nrT6Y/D1fnbSzCAtQ8l f51p8ITcx4VnLLc4BNyvJc6NfHE/8QW0+kiGRK/wmgikJuTh0kUI3yFQlrxJduZr2OIV WOFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=eEq2VcJ7eepR1CHyDJPWW+LZBnAVnkUNvQmw7UDOfkA=; b=SgO2E841vXJ/6AGsWQ0rSF2KPZ75TsQa+O7TLO91AOtc7LFv91tw/5k5911GHPtWN7 5i3P8w8GGb7gEvnyJIufbOfvU4SYfTiP0w0KilVrKTOuYu5VJv4wuTIkTyGUg52wzD11 h7xQ0DxuN6QlVyKmdbvLTAyarktYkDDSk7Q4Uf2i6I1M4gzh0ijml3XWTHJxFINzUFSd JujYrqm97ySVfniNkLbU1nXlM0ry83lJXuIKvxSx2/5Sy4FJm6sZzML2Es27u/joe/YK l/2u+ceIy+Q/yA51/vrGR977gJpI5UzAVvtGll124ghbS3Ove2utf28XGqbhEnGxaKi3 SLCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j9si10541369pgq.555.2019.06.24.14.59.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jun 2019 14:59:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D719789E3F; Mon, 24 Jun 2019 21:59:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A1DD89E1B for ; Mon, 24 Jun 2019 21:59:08 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id r185so751210iod.6 for ; Mon, 24 Jun 2019 14:59:08 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=mwUOQlLuJ3XhE9Np0zOsuYiPvKJ0VZzFo8+UtVJgieA=; b=oLqlPkTqTL99iXig72A59y2BnQUbRTXOaK6b/cyAh9cHJ1lmIfplgSHzrXkGfP0D3p F+aVAUnB2ddQPLgVAjJqT6wYFhciiH7dGob5yGAbASz3/VUslKCX1w4gpkaOdOaRrmv/ YK0W8Axmu8Hqdg2+VhhzsaAEIFMMNTw6zAe2oP/Wf2aLPK6vfiwdg9gwgVG/v1FkEZLb 8cbZPYPkrCoEgAfo28UXQw561NDzm7TC0+ynifliU+QUaPJM3is79FT7el8xUJDLm4nO TW9uM8zlb8FX0pYTwJiB8MQPtwuy94otVcWQhx3Hx84U1FE9zpqRXu3ECgAkk36e7jG6 rjKg== X-Gm-Message-State: APjAAAXNB7xZe3bPTCryMeMzAXopH/MQSKFOmMeDfavAktst6A39CEw/ PYI7jYqiaUOFPfN+BajV1pVQd7c= X-Received: by 2002:a6b:7d49:: with SMTP id d9mr1606554ioq.50.1561413547310; Mon, 24 Jun 2019 14:59:07 -0700 (PDT) Received: from localhost.localdomain ([64.188.179.247]) by smtp.googlemail.com with ESMTPSA id l5sm14717301ioq.83.2019.06.24.14.59.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 14:59:06 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v2 10/15] dt-bindings: display: Convert tpo, tpg110 panel to DT schema Date: Mon, 24 Jun 2019 15:56:44 -0600 Message-Id: <20190624215649.8939-11-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624215649.8939-1-robh@kernel.org> References: <20190624215649.8939-1-robh@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , linux-kernel@vger.kernel.org, Thierry Reding , Laurent Pinchart , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Convert the tpo,tpg110 panel binding to DT schema. Cc: Linus Walleij Cc: Thierry Reding Cc: Sam Ravnborg Cc: Maxime Ripard Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring --- .../bindings/display/panel/tpo,tpg110.txt | 70 ------------ .../bindings/display/panel/tpo,tpg110.yaml | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+), 70 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml diff --git a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt deleted file mode 100644 index 40f3d7c713bb..000000000000 --- a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt +++ /dev/null @@ -1,70 +0,0 @@ -TPO TPG110 Panel -================ - -This panel driver is a component that acts as an intermediary -between an RGB output and a variety of panels. The panel -driver is strapped up in electronics to the desired resolution -and other properties, and has a control interface over 3WIRE -SPI. By talking to the TPG110 over SPI, the strapped properties -can be discovered and the hardware is therefore mostly -self-describing. - - +--------+ -SPI -> | TPO | -> physical display -RGB -> | TPG110 | - +--------+ - -If some electrical strap or alternate resolution is desired, -this can be set up by taking software control of the display -over the SPI interface. The interface can also adjust -for properties of the display such as gamma correction and -certain electrical driving levels. - -The TPG110 does not know the physical dimensions of the panel -connected, so this needs to be specified in the device tree. - -It requires a GPIO line for control of its reset line. - -The serial protocol has line names that resemble I2C but the -protocol is not I2C but 3WIRE SPI. - -Required properties: -- compatible : one of: - "ste,nomadik-nhk15-display", "tpo,tpg110" - "tpo,tpg110" -- grestb-gpios : panel reset GPIO -- width-mm : see display/panel/panel-common.txt -- height-mm : see display/panel/panel-common.txt - -The device needs to be a child of an SPI bus, see -spi/spi-bus.txt. The SPI child must set the following -properties: -- spi-3wire -- spi-max-frequency = <3000000>; -as these are characteristics of this device. - -The device node can contain one 'port' child node with one child -'endpoint' node, according to the bindings defined in -media/video-interfaces.txt. This node should describe panel's video bus. - -Example -------- - -panel: display@0 { - compatible = "tpo,tpg110"; - reg = <0>; - spi-3wire; - /* 320 ns min period ~= 3 MHz */ - spi-max-frequency = <3000000>; - /* Width and height from data sheet */ - width-mm = <116>; - height-mm = <87>; - grestb-gpios = <&foo_gpio 5 GPIO_ACTIVE_LOW>; - backlight = <&bl>; - - port { - nomadik_clcd_panel: endpoint { - remote-endpoint = <&foo>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml new file mode 100644 index 000000000000..a51660b73f28 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tpo,tpg110.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TPO TPG110 Panel + +maintainers: + - Linus Walleij + - Thierry Reding + +description: |+ + This panel driver is a component that acts as an intermediary + between an RGB output and a variety of panels. The panel + driver is strapped up in electronics to the desired resolution + and other properties, and has a control interface over 3WIRE + SPI. By talking to the TPG110 over SPI, the strapped properties + can be discovered and the hardware is therefore mostly + self-describing. + + +--------+ + SPI -> | TPO | -> physical display + RGB -> | TPG110 | + +--------+ + + If some electrical strap or alternate resolution is desired, + this can be set up by taking software control of the display + over the SPI interface. The interface can also adjust + for properties of the display such as gamma correction and + certain electrical driving levels. + + The TPG110 does not know the physical dimensions of the panel + connected, so this needs to be specified in the device tree. + + It requires a GPIO line for control of its reset line. + + The serial protocol has line names that resemble I2C but the + protocol is not I2C but 3WIRE SPI. + + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - ste,nomadik-nhk15-display + - const: tpo,tpg110 + - const: tpo,tpg110 + + reg: true + + grestb-gpios: + maxItems: 1 + description: panel reset GPIO + + spi-3wire: true + + spi-max-frequency: + const: 3000000 + +required: + - compatible + - reg + - grestb-gpios + - width-mm + - height-mm + - spi-3wire + - spi-max-frequency + - port + +examples: + - |+ + spi { + #address-cells = <1>; + #size-cells = <0>; + + panel: display@0 { + compatible = "tpo,tpg110"; + reg = <0>; + spi-3wire; + /* 320 ns min period ~= 3 MHz */ + spi-max-frequency = <3000000>; + /* Width and height from data sheet */ + width-mm = <116>; + height-mm = <87>; + grestb-gpios = <&foo_gpio 5 1>; + backlight = <&bl>; + + port { + nomadik_clcd_panel: endpoint { + remote-endpoint = <&foo>; + }; + }; + }; + }; + +...