From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pawel Moll Date: Wed, 17 Apr 2013 15:17:15 +0000 Subject: [RFC 03/10] video: display: Add Device Tree bindings Message-Id: <1366211842-21497-4-git-send-email-pawel.moll@arm.com> List-Id: References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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