From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pawel Moll Subject: [RFC 06/10] video: ARM CLCD: Add DT & CDF support Date: Wed, 17 Apr 2013 16:17:18 +0100 Message-ID: <1366211842-21497-7-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 This patch adds basic DT bindings for the PL11x CLCD cells and make their fbdev driver use them, together with the Common Display Framework. The DT provides information about the hardware configuration and limitations (eg. the largest supported resolution) but the video modes come exclusively from the Common Display Framework drivers, referenced to by the standard CDF binding. Signed-off-by: Pawel Moll --- .../devicetree/bindings/video/arm,pl11x.txt | 35 +++ drivers/video/Kconfig | 1 + drivers/video/amba-clcd.c | 244 ++++++++++++++++= ++++ include/linux/amba/clcd.h | 2 + 4 files changed, 282 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/arm,pl11x.txt diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Docume= ntation/devicetree/bindings/video/arm,pl11x.txt new file mode 100644 index 0000000..ee9534a --- /dev/null +++ b/Documentation/devicetree/bindings/video/arm,pl11x.txt @@ -0,0 +1,35 @@ +* ARM PrimeCell Color LCD Controller (CLCD) PL110/PL111 + +Required properties: + +- compatible : must be one of: +=09=09=09"arm,pl110", "arm,primecell" +=09=09=09"arm,pl111", "arm,primecell" +- reg : base address and size of the control registers block +- interrupts : the combined interrupt +- clocks : phandles to the CLCD (pixel) clock and the APB clocks +- clock-names : "clcdclk", "apb_pclk" +- display : phandle to the display entity connected to the controller + +Optional properties: + +- label : string describing the controller location and/or usage +- video-ram : phandle to DT node of the specialized video RAM to be used +- max-hactive : maximum frame buffer width in pixels +- max-vactive : maximum frame buffer height in pixels +- max-bpp : maximum number of bits per pixel +- big-endian-pixels : defining this property makes the pixel bytes being +=09=09=09accessed in Big Endian organization + +Example: + +=09=09=09clcd@1f0000 { +=09=09=09=09compatible =3D "arm,pl111", "arm,primecell"; +=09=09=09=09reg =3D <0x1f0000 0x1000>; +=09=09=09=09interrupts =3D <14>; +=09=09=09=09clocks =3D <&v2m_oscclk1>, <&smbclk>; +=09=09=09=09clock-names =3D "clcdclk", "apb_pclk"; +=09=09=09=09label =3D "IOFPGA CLCD"; +=09=09=09=09video-ram =3D <&v2m_vram>; +=09=09=09=09display =3D <&v2m_muxfpga>; +=09=09=09}; diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 281e548..bad8166 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -340,6 +340,7 @@ config FB_ARMCLCD =09select FB_CFB_FILLRECT =09select FB_CFB_COPYAREA =09select FB_CFB_IMAGEBLIT +=09select FB_MODE_HELPERS if OF =09help =09 This framebuffer device driver is for the ARM PrimeCell PL110 =09 Colour LCD controller. ARM PrimeCells provide the building diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 0a2cce7..778dc03 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -25,6 +25,11 @@ #include #include #include +#include +#include +#include +#include