From mboxrd@z Thu Jan 1 00:00:00 1970 From: 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> References: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1366211842-21497-1-git-send-email-pawel.moll@arm.com> Sender: linux-media-owner@vger.kernel.org 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 List-Id: devicetree@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-binding= s.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. + +=3D=3D Display provider =3D=3D + +Required properties: + +* #clock-cells:=09Number of cells in the display specifier. Typically +=09=090 for nodes providing single display entity and 1 +=09=09for nodes providing multiple displays. + +Example: +=09=09=09dvi-output: dvi-output@0 { +=09=09=09=09#display-cells =3D <0>; +=09=09=09}; + +=3D=3D Display consumer =3D=3D + +Required properties: + +* display:=09List of phandle and clock specifier pairs, one pair +=09=09for each display (sink). Note: if the display provider +=09=09specifies '0' for #display-cells, then only the phandle +=09=09portion of the pair will appear. + +Example: + +=09=09=09display-driver { +=09=09=09=09display =3D <&dvi-output>; +=09=09=09}; + +=3D=3D Larger example =3D=3D + +=09=09=09clcd@10020000 { +=09=09=09=09compatible =3D "arm,pl111", "arm,primecell"; +=09=09=09=09reg =3D <0x10020000 0x1000>; +=09=09=09=09interrupts =3D <0 44 4>; +=09=09=09=09clocks =3D <&oscclk1>, <&oscclk2>; +=09=09=09=09clock-names =3D "clcdclk", "apb_pclk"; +=09=09=09=09label =3D "V2P-CA9 CLCD"; +=09=09=09=09display =3D <&v2m_muxfpga 0xf>; +=09=09=09=09max-hactive =3D <1024>; +=09=09=09=09max-vactive =3D <768>; +=09=09=09=09max-bpp =3D <16>; +=09=09=09}; + +=09=09=09v2m_muxfpga: muxfpga@0 { +=09=09=09=09compatible =3D "arm,vexpress-muxfpga"; +=09=09=09=09arm,vexpress-sysreg,func =3D <7 0>; +=09=09=09=09#display-cells =3D <1>; +=09=09=09=09display =3D <&v2m_dvimode>; +=09=09=09}; + +=09=09=09v2m_dvimode: dvimode@0 { +=09=09=09=09compatible =3D "arm,vexpress-dvimode"; +=09=09=09=09arm,vexpress-sysreg,func =3D <11 0>; +=09=09=09=09#display-cells =3D <0>; +=09=09=09}; diff --git a/drivers/video/display/display-core.c b/drivers/video/display/d= isplay-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 =20 #include