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: 2454121 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 35B263FC64 for ; Wed, 17 Apr 2013 15:17:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909Ab3DQPRs (ORCPT ); Wed, 17 Apr 2013 11:17:48 -0400 Received: from service87.mimecast.com ([91.220.42.44]:33960 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966626Ab3DQPRj (ORCPT ); Wed, 17 Apr 2013 11:17:39 -0400 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 Cc: Laurent Pinchart , Linus Walleij , Russell King - ARM Linux , Pawel Moll 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 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.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