From patchwork Thu Oct 24 11:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 177413 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2065128ill; Thu, 24 Oct 2019 04:43:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyH2lRhrNrB31cSIALgptayb16ngehTjJHRJ7xuMarOvMdaDzW8n3jDBraM+RJLhL3Lvy+r X-Received: by 2002:aa7:db43:: with SMTP id n3mr42611943edt.176.1571917394250; Thu, 24 Oct 2019 04:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917394; cv=none; d=google.com; s=arc-20160816; b=CONgKg8rhi6TSWjY92GN6gTi7tl7vyUJeXQXu8sDqP53DAL12LjiPbRtas0nVFfbxU I3uA8WqGGzxSG0evBinexDggXNbW7Mod0pEkwDvVJfNci9WM3l90yOp5C+CEjWY8o+q9 oTV9dZO/QyUmG7afF/6EXmihQnkJsRT3i0rJUYMOFjz19jlKfnFebQ1hrNdqUM1z70/F koOl8D3S/HwIid8K26tSn2nVwKew4tCu1RI7B8hUds16vzYevbOomMs/nmG11AkuA4M/ uPOJSqZUeAH/vx1OaON+4cIWxXvt7JJe12PVnLbFwxf0OWl0w4f7NYHbOTPYDJnV6QuQ gefQ== 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:dkim-signature; bh=YA2/6tugEUXajeImGkJKBKEZmtx66gdb7sqhmJwslGY=; b=vKD3yb2/6O3H0u3scV40uAyV9j/1bMOcvWqiZxRHk0Dc5gCdqBo2EUH9bFSlvSWGMS YFq2Q1lGMpucMPnZZsAetQ62FIFRJz1QQlZ/QPElDdLYyUlIz9X1kYtCVbNLKIQeWEJx AiJLPpFqMsjSgDwA7Z/wbfUV4VSm3rKdr1Ej2+TN4aLV8R/34exWLNzi5LAYzTPcPhWN dBTWApEVLYV927B5O0QgyYbX21/A/OCo77QEImhn+nDlTf+qJDDDuKQ1QFJQR70yuOHv rPv5Qzd0/ESjZS2MFBzov2hFmBhrkeJZVe6p7mWiwmo32d7iWxJ7mXxkYW19vEKr7GZr sh5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iDAJ/s2T"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e47si7923063eda.73.2019.10.24.04.43.14; Thu, 24 Oct 2019 04:43:14 -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; dkim=pass header.i=@linaro.org header.s=google header.b="iDAJ/s2T"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbfJXLnN (ORCPT + 8 others); Thu, 24 Oct 2019 07:43:13 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46657 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfJXLnN (ORCPT ); Thu, 24 Oct 2019 07:43:13 -0400 Received: by mail-lf1-f65.google.com with SMTP id t8so18857606lfc.13 for ; Thu, 24 Oct 2019 04:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YA2/6tugEUXajeImGkJKBKEZmtx66gdb7sqhmJwslGY=; b=iDAJ/s2TGKVZ6cOgbobRLZao9OgQZQi4YmUL9dKbcSs9e/KS4Niu41OX1MSx/i5GY7 PPhVqnHLpGXdNJAiKdPcVumOOKcYfz//oupiPnFZCbsLrtNYDgkYZy0Cirn3qvpxjb20 5iIKRqM0RltwLAddbhLY4hIK0961eF/WNoi5rAE9X5r3ZtDdqL6z2cF7ge8/NS82H4AO YJUxt+tlC9o5KD60L1uGr8CoFCx9qB8gEZPlXyB1S7rAxB6TlxYJOghSGRVJBiqKJ4f7 IjN4SwgefFkxpBLTKCgS3tvS+QsdWyDy217bxwUsQFWJFJJpEQuiU4sFgTpW21s5junV mqPw== 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=YA2/6tugEUXajeImGkJKBKEZmtx66gdb7sqhmJwslGY=; b=KwPK4xyS1zxGbc5LPX7KfWLXBY7f8RtyMlcNSeQqvYqdY+MW5pDaI/Nm0rNSI+lgWh 0Bu2oC/UNkz7VYIQjgq7CzhkR8UqHXtArQzuB9K0BG/VOqYRjSIfvf7kjZe6KedCgKci vN7e+uxEH9WduRbTra/zlrZZOqItRnYIyS0q8ULpPmuvGyk7KbC5VTsqNoW25EVdtXYE twQYVqNJ2k0M4xV7P8kHm3GAf0gfEsNlPr9A1JzFTsRQIsQ9qczB7HTPcTtR+eA6Rj1e Ga+lBa4sQ9F1kdBZkcMNwDMX/ik7rwa/AFD2d4c9VcPmjO0CW7GerfqA+VN8jTyL0sxA AyLw== X-Gm-Message-State: APjAAAXoL7hdCDRZGFnAsNU7p8MLvd9xb0kDFzoTB9E08TWgXBfuWzC/ 66Xw/eEOD7lODq7X1dfwnCwrFQ== X-Received: by 2002:ac2:5443:: with SMTP id d3mr24940890lfn.58.1571917390330; Thu, 24 Oct 2019 04:43:10 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14sm4001846ljb.75.2019.10.24.04.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 04:43:09 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Cc: Linus Walleij , devicetree@vger.kernel.org, Rob Herring Subject: [PATCH 1/3 v4] drm/panel: Add generic DSI panel YAML bindings Date: Thu, 24 Oct 2019 13:43:03 +0200 Message-Id: <20191024114305.15581-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds a starting point for processing and defining generic bindings used by DSI panels. We just define one single bool property to force the panel into video mode for now. Cc: devicetree@vger.kernel.org Suggested-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Rename into display/dsi-controller.yaml - Require a virtual channel number for the DSI panel, as DSI have this 2-bit virtual address field. - Bring in some but not all properties from the existing MIPI DSI bindings. This schema can be used with simpler panels but not complex panels with multiple virtual channels for the moment. Let's handle it when we get there. - Add an example. ChangeLog v2->v3: - Make a more complete DSI panel binding including the controller and its address-cells and size-cells and a pattern for the panel nodes. The panel is one per DSI master, the reg property is compulsory but should always be 0 (as far as I can tell) as only one panel can be connected. The bus doesn't really have any addresses for the panel, the address/reg notation seems to be cargo-culted from the port graphs and is not necessary to parse some device trees, it is used to tell whether the node is a panel or not rather than any addressing. - I have no idea how many displays you can daisychain on a single DSI master, I just guess 15 will be enough. The MIPI-specs are memberwalled. Someone who knows can tell perhaps? ChangeLog v1->v2: - New patch after feedback. --- .../bindings/display/dsi-controller.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/dsi-controller.yaml -- 2.21.0 diff --git a/Documentation/devicetree/bindings/display/dsi-controller.yaml b/Documentation/devicetree/bindings/display/dsi-controller.yaml new file mode 100644 index 000000000000..2a6d872a40c5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/dsi-controller.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-dsi-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for DSI Display Panels + +maintainers: + - Linus Walleij + +description: | + This document defines device tree properties common to DSI, Display + Serial Interface panels. It doesn't constitute 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. + + Notice: this binding concerns DSI panels connected directly to a master + without any intermediate port graph to the panel. Each DSI master + can control exactly one panel. They should all just have a node "panel" + for their panel with their reg-property set to 0. + +properties: + $nodename: + pattern: "^dsi-controller(@.*)?$" + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^panel@[0-3]$": + type: object + + properties: + reg: + minimum: 0 + maximum: 3 + description: + The virtual channel number of a DSI peripheral. Must be in the range + from 0 to 3, as DSI uses a 2-bit addressing scheme. Some DSI + peripherals respond to more than a single virtual channel. In that + case the reg property can take multiple entries, one for each virtual + channel that the peripheral responds to. + + clock-master: + type: boolean + description: + Should be enabled if the host is being used in conjunction with + another DSI host to drive the same peripheral. Hardware supporting + such a configuration generally requires the data on both the busses + to be driven by the same clock. Only the DSI host instance + controlling this clock should contain this property. + + enforce-video-mode: + type: boolean + description: + The best option is usually to run a panel in command mode, as this + gives better control over the panel hardware. However for different + reasons like broken hardware, missing features or testing, it may be + useful to be able to force a command mode-capable panel into video + mode. + + required: + - reg + +examples: + - | + dsi-controller@55aa55aa { + compatible = "acme,foo"; + reg = <0x55aa55aa>; + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "acme,bar"; + reg = <0>; + vddi-supply = <&foo>; + reset-gpios = <&foo_gpio 0 GPIO_ACTIVE_LOW>; + }; + }; + +... From patchwork Thu Oct 24 11:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 177414 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2065154ill; Thu, 24 Oct 2019 04:43:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqylJVqF2a/BUvEZOtEq8qsg9OgaWJfOLY75xJ7HJ+FDSJuiPPcsnrsYTs5PwEXU0jmMK4Lu X-Received: by 2002:aa7:db43:: with SMTP id n3mr42612018edt.176.1571917395330; Thu, 24 Oct 2019 04:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917395; cv=none; d=google.com; s=arc-20160816; b=dQIinEZYV7eto2YRIIYitJQM7VDRIqYVA4DvhvC4k9pVHCm3axiVaKsCEiCg0ub/Ps WHTMliA/Aeztlk7h0vC0wMOOMCcFe8dGUEpgJ+n+ylAMy2VZSTT7oUEl0aBH9mDkKeRr kt6g4sfWbv1FhsMo8wnXAWS9w96DXA4TDr6E2sFLnMU7D+NnM1BrmFNiqwGl/e7Eykzi 7wpEOK3hqpbFCI6uw+GwWe7hGHIfF+81382ExAMBJ7+V2Kt+5VbUA5eii01TyhwVQFR7 8AUAmsAl72jB/fgbVdxVgeheQ49PfDHcHt+FWHL4406ptAYyoQ+Gn0t3DsTdFA570ZhY kk5w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y6qwseFf3sOEzysjfxOCeatUxazVlV6E5726z4gpfTk=; b=XKUDH4oUXsBzSjb3AdkPWZATcKcBDPgGp0zs7oYmJt3QQzUcxE36Eu0YHoU9g23kII zdbHRIRVJ8pPBXtlTirlpuLXga/EF+fnQ1yGTXp+ThO3n+4DiMMyCFAJUqxdWUOrt1ut aodnhXqoPKXjVRWIIECBwTMLo8AHDRNHt59ly9QLcs8nvXi70SkUOeeBrVcDS3eH/hN0 3tS9dppKhItBaqDFvu0o6+0a0lMCQ3N8Z8NK1sa6E4qlPa4xI1Bhq4VHKrrjH6mlJlRL RGGjTky4I/rYnbe32FkJhUKmsLkcCReFFfXwdwAJcLvcffVdiA6JZJNj14ishKgdLqND wzpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dN9+UiU2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e47si7923063eda.73.2019.10.24.04.43.15; Thu, 24 Oct 2019 04:43:15 -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; dkim=pass header.i=@linaro.org header.s=google header.b=dN9+UiU2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbfJXLnO (ORCPT + 8 others); Thu, 24 Oct 2019 07:43:14 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45912 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfJXLnO (ORCPT ); Thu, 24 Oct 2019 07:43:14 -0400 Received: by mail-lf1-f67.google.com with SMTP id v8so18288573lfa.12 for ; Thu, 24 Oct 2019 04:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y6qwseFf3sOEzysjfxOCeatUxazVlV6E5726z4gpfTk=; b=dN9+UiU2TiIaFv1ECG8dz2AKCpyynB8QkW7md/WXneHG+ISMq7AOoyaWnBLRx6PmAY wXWWnF3wjJYAdwfg3HzJfX9UwYP9NvatBJyQpbjP/e+Tuc7RJbuqP9ArqxbPjtwGNikj tFn26MVd/P/b7ieBc3YSzBJV8fdanYQ2Zv4qzqR8TctDjFINFboEs6WGkCJa4sS2H0Hq 02QOjA6Xds3Gcpjct994FJ8a2Nhqp8byEzloxr+5qdwusSGfrh3Daj52ZfgFAx9cUUBf AXtxTJn2f6upA6wyfmm32/YAowtwNgXf2IJgpqk4DysQdfOWhpHtPts87nW8wC3Rj1+W sMfw== 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=y6qwseFf3sOEzysjfxOCeatUxazVlV6E5726z4gpfTk=; b=pgZNpnYDfftCQpqI+T/MqBt/b0E8cogBm29CBk2mQKhm0kbK5QG29qD7QB3p56d1Tl 46lxnzQptemS8T5Hsmp9DDyLEnNYLbaxuVFgludqd7KHVhlQRAJSLsAHhZxsdfNpJAx2 GcZzkipSnDguqRujA5mufQnuxyRWLSy6hJCer/I1o6PpKPBVTh17/R9uWqvTb6Qx+TN5 RiaoNsxdrIYKl/PCzvjHUt6V6X3ont2Mc9/P/VRhFU+nR4qpEdk/nF69EwTFe3Py0ZC0 pivlRGNHbI0/mrmNR7EfN94WeqSMMAF0YB7Lho2P5QUvL3/Cm9yc/fhKwnN1w6HI8iiT rYrQ== X-Gm-Message-State: APjAAAUDaxZSRVPT8PhmQGq00VJ0FPNwUU00W/+FhEbOZQqY1zNnbC4c SoCL7G4uHa3i1qSbsqkbt2qXmg== X-Received: by 2002:a19:651b:: with SMTP id z27mr24607041lfb.117.1571917392144; Thu, 24 Oct 2019 04:43:12 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14sm4001846ljb.75.2019.10.24.04.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 04:43:11 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Cc: Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 2/3 v4] drm/panel: Add DT bindings for Sony ACX424AKP Date: Thu, 24 Oct 2019 13:43:04 +0200 Message-Id: <20191024114305.15581-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191024114305.15581-1-linus.walleij@linaro.org> References: <20191024114305.15581-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Sony ACX424AKP panel. Let's use YAML. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Adjust to adjusted DSI bindings. ChangeLog v2->v3: - Put the example inside a dsi-controller so we have a complete example that verifies to the DSI panel generic binding. ChangeLog v1->v2: - Suggest a stand-alone YAML bindings file for DSI panels in a separate patch, and use that to reference the boolean "enforce-video-mode" attribute for DSI panels --- .../display/panel/sony,acx424akp.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml -- 2.21.0 diff --git a/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml b/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml new file mode 100644 index 000000000000..a2f49b9a5958 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/sony,acx424akp.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/sony,acx424akp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sony ACX424AKP 4" 480x864 AMOLED panel + +maintainers: + - Linus Walleij + +allOf: + - $ref: panel-common.yaml# + - $ref: ../dsi-controller.yaml# + +properties: + compatible: + const: sony,acx424akp + reg: true + port: true + reset-gpios: true + vddi-supply: + description: regulator that supplies the vddi voltage + enforce-video-mode: true + +required: + - compatible + - reg + - port + - reset-gpios + - power-supply + +additionalProperties: false + +examples: + - | + dsi-controller@0 { + compatible = "foo"; + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "sony,acx424akp"; + reg = <0>; + vddi-supply = <&foo>; + reset-gpios = <&foo_gpio 0 GPIO_ACTIVE_LOW>; + }; + }; + +... \ No newline at end of file