From patchwork Wed Apr 17 15:17:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 18039 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1USU8E-0007RD-Ri; Wed, 17 Apr 2013 17:18:46 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp id 1USU8D-0001yH-EW; Wed, 17 Apr 2013 17:18:46 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756281Ab3DQPS1 (ORCPT + 1 other); Wed, 17 Apr 2013 11:18:27 -0400 Received: from service87.mimecast.com ([91.220.42.44]:38927 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160Ab3DQPSU (ORCPT ); Wed, 17 Apr 2013 11:18:20 -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:42 +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:38 +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 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> 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:38.0295 (UTC) FILETIME=[B2429870:01CE3B7E] X-MC-Unique: 113041716174203701 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.4.17.151220 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_10000_PLUS 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOAT 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __MULTIPLE_RCPTS_TO_X5 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS ' 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/Documentation/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: + "arm,pl110", "arm,primecell" + "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 + accessed in Big Endian organization + +Example: + + clcd@1f0000 { + compatible = "arm,pl111", "arm,primecell"; + reg = <0x1f0000 0x1000>; + interrupts = <14>; + clocks = <&v2m_oscclk1>, <&smbclk>; + clock-names = "clcdclk", "apb_pclk"; + label = "IOFPGA CLCD"; + video-ram = <&v2m_vram>; + display = <&v2m_muxfpga>; + }; 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 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_MODE_HELPERS if OF help This framebuffer device driver is for the ARM PrimeCell PL110 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