From patchwork Fri Oct 18 18:24:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11199383 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 580EE14ED for ; Fri, 18 Oct 2019 18:25:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AA2420820 for ; Fri, 18 Oct 2019 18:25:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AA2420820 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E15FA6EB83; Fri, 18 Oct 2019 18:24:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19B356EB83 for ; Fri, 18 Oct 2019 18:24:57 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id d1so7126238ljl.13 for ; Fri, 18 Oct 2019 11:24:56 -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=IYHZuLGg+JGJBwHO1m+JSuqR2RXOf2t8ywlY3WZdrN0=; b=eKfqTPuiQ8GfgFPBUsWQGSBTIdzGkao1kSz3g0Y2EsxyOt8A2OWYjnbbKNGeU22wYp 5axJcbKIlw7tSEjMVoqBt4Vk8DpsQEWOfwBP4Mg9Ox2L8NboZCsLYWr4RfwI06RWm3IP lFQn8ZMWfgknQrTlyOj90GwGpl1xxrwF9sKIKInQwho7PLY3LbBRG7EyZDz9i3MqZcWs ZuLB6Yu5NfGxO/O0eH3rhjFKlaxAynA8upkLs2bs8Ik9J6n3s+ut19ZHcTsNp8utFug9 5+risR4NblL3pKmvS5u36VW5ZtYvSzGwX9GsVkO5gHi6wW7WoVIWSMG+S9kVaYGEmk0V Q+Fw== X-Gm-Message-State: APjAAAXGtotLtQ1BWIBkqx3GVWYrxLxhYjJ0rXPErAZqCqRFuGMEe+IE 54Z36E7TvpDHabFIS9NfTiuoKA== X-Google-Smtp-Source: APXvYqzBKy427jd3dlIZ/D555Svg4NIKOAkSrJwvldFXaPFjPxfgRskBmEv1lPaMhwTVADRpb5luKQ== X-Received: by 2002:a2e:8684:: with SMTP id l4mr7425517lji.87.1571423095129; Fri, 18 Oct 2019 11:24:55 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id g26sm3020617lje.80.2019.10.18.11.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 11:24:51 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org, Andrzej Hajda Subject: [PATCH 1/3 v3] drm/panel: Add generic DSI panel YAML bindings Date: Fri, 18 Oct 2019 20:24:44 +0200 Message-Id: <20191018182446.26131-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-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=IYHZuLGg+JGJBwHO1m+JSuqR2RXOf2t8ywlY3WZdrN0=; b=auHZttj89zTTWX6QMDr8blBfC+K/EgSELf0teDHp1pkUjxV63etpiqa9A4Qd08STM7 IMiiWsXaiMaKzdHmXylAP/bj3ts9LRBL5qbSIkL5L6XuGEQTaU7icGOQxSQRzVj1vDur Aikyb2mwMmucPPWhTjD58iPhEhZ/lXlMHmosULz+j1kpV7F5ApvX9Wx5jYn90HQLANJ/ bnABKygJfUUocd53BiIh/CGwCslYNIaQFMGBQgzl9eUt0bTDZnKgEZofPPgyRB/0pg+V E/HYvP8i/wFhI1bTBvgv9nObxFtsvTVGdHo0XI6+ZT7CJBL2LAsgViiImxxu8NUsMlA3 3LxQ== 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: devicetree@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 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. --- .../display/panel/panel-dsi-common.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dsi-common.yaml diff --git a/Documentation/devicetree/bindings/display/panel/panel-dsi-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-dsi-common.yaml new file mode 100644 index 000000000000..d63f597eff9c --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/panel-dsi-common.yaml @@ -0,0 +1,58 @@ +# 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(@[0-9a-f]+)?$" + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^panel$": + type: object + + properties: + reg: + const: 0 + description: + Only one panel can be connected to each DSI controller, but for + historical reasons, the reg property must be specified, as the + DSI controller can contain other child nodes, and operating + systems will identify which child node is the panel by looking + for the reg property. It should however always be set to 0. + + 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.