From patchwork Wed Apr 17 15:17:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 2459651 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id E10663FCA5 for ; Thu, 18 Apr 2013 11:11:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5031E6372 for ; Thu, 18 Apr 2013 04:11:55 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from service88.mimecast.com (service88.mimecast.com [195.130.217.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DF58E6709 for ; Wed, 17 Apr 2013 08:24:38 -0700 (PDT) Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 17 Apr 2013 16:17:38 +0100 Received: from hornet.Cambridge.Arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Apr 2013 16:17:36 +0100 From: Pawel Moll To: linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [RFC 03/10] video: display: Add Device Tree bindings Date: Wed, 17 Apr 2013 16:17:15 +0100 Message-Id: <1366211842-21497-4-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> X-OriginalArrivalTime: 17 Apr 2013 15:17:36.0764 (UTC) FILETIME=[B158FBC0:01CE3B7E] X-MC-Unique: 113041716173804701 X-Mailman-Approved-At: Thu, 18 Apr 2013 04:09:27 -0700 Cc: Russell King - ARM Linux , Laurent Pinchart , Pawel Moll X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Modelled after the common clock solution, the bindings are based on the idea of display entity "providers" and "consumers". Signed-off-by: Pawel Moll --- .../devicetree/bindings/video/display-bindings.txt | 75 +++++++++++++++++ drivers/video/display/display-core.c | 84 ++++++++++++++++++++ include/video/display.h | 11 +++ 3 files changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/display-bindings.txt diff --git a/Documentation/devicetree/bindings/video/display-bindings.txt b/Documentation/devicetree/bindings/video/display-bindings.txt new file mode 100644 index 0000000..6d8b888 --- /dev/null +++ b/Documentation/devicetree/bindings/video/display-bindings.txt @@ -0,0 +1,75 @@ +[this is an RFC] + +Common Display Framework define a display entity (eg. LCD panel), +being a sink for video data generated by a video signal generator +(eg. LCD controller/driver). + +This set of bindings allow to represent connections between them +in the Device Tree. + +Devices nodes representing display sinks are called "display +providers" and nodes representing display sources are called +"display consumers". + +Notice that in both cases a device represented by a node can +provide or consume more than one display entity. For example +a LCD controller can be able to driver more than one LCD +panel at the same time, while a panel (or a special signal +multiplexer) may have more than one input (sink) and switch +between them. + +== Display provider == + +Required properties: + +* #clock-cells: Number of cells in the display specifier. Typically + 0 for nodes providing single display entity and 1 + for nodes providing multiple displays. + +Example: + dvi-output: dvi-output@0 { + #display-cells = <0>; + }; + +== Display consumer == + +Required properties: + +* display: List of phandle and clock specifier pairs, one pair + for each display (sink). Note: if the display provider + specifies '0' for #display-cells, then only the phandle + portion of the pair will appear. + +Example: + + display-driver { + display = <&dvi-output>; + }; + +== Larger example == + + clcd@10020000 { + compatible = "arm,pl111", "arm,primecell"; + reg = <0x10020000 0x1000>; + interrupts = <0 44 4>; + clocks = <&oscclk1>, <&oscclk2>; + clock-names = "clcdclk", "apb_pclk"; + label = "V2P-CA9 CLCD"; + display = <&v2m_muxfpga 0xf>; + max-hactive = <1024>; + max-vactive = <768>; + max-bpp = <16>; + }; + + v2m_muxfpga: muxfpga@0 { + compatible = "arm,vexpress-muxfpga"; + arm,vexpress-sysreg,func = <7 0>; + #display-cells = <1>; + display = <&v2m_dvimode>; + }; + + v2m_dvimode: dvimode@0 { + compatible = "arm,vexpress-dvimode"; + arm,vexpress-sysreg,func = <11 0>; + #display-cells = <0>; + }; diff --git a/drivers/video/display/display-core.c b/drivers/video/display/display-core.c index 4b8e45a..9827a5d 100644 --- a/drivers/video/display/display-core.c +++ b/drivers/video/display/display-core.c @@ -15,6 +15,7 @@ #include #include #include +#include #include