From patchwork Thu Apr 18 17:33:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 2465751 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 98E1FDF25A for ; Fri, 19 Apr 2013 15:56:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D834E6713 for ; Fri, 19 Apr 2013 08:56:23 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 94561 seconds by postgrey-1.32 at gabe; Thu, 18 Apr 2013 10:33:40 PDT Received: from service87.mimecast.com (service87.mimecast.com [91.220.42.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 11E3AE5CCB for ; Thu, 18 Apr 2013 10:33:39 -0700 (PDT) Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 18 Apr 2013 18:33: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); Thu, 18 Apr 2013 18:33:36 +0100 From: Pawel Moll To: Russell King - ARM Linux Subject: [RFC v2] video: ARM CLCD: Add DT & CDF support Date: Thu, 18 Apr 2013 18:33:21 +0100 Message-Id: <1366306402-21651-1-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20130418102444.GL14496@n2100.arm.linux.org.uk> References: <20130418102444.GL14496@n2100.arm.linux.org.uk> X-OriginalArrivalTime: 18 Apr 2013 17:33:37.0006 (UTC) FILETIME=[DBA4D8E0:01CE3C5A] X-MC-Unique: 113041818333801601 X-Mailman-Approved-At: Fri, 19 Apr 2013 08:53:28 -0700 Cc: linux-fbdev@vger.kernel.org, Pawel Moll , devicetree-discuss@lists.ozlabs.org, dri-devel@lists.freedesktop.org, Laurent Pinchart , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.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 | 247 ++++++++++++++++++++ include/linux/amba/clcd.h | 2 + 4 files changed, 285 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..853f74c 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -25,6 +25,11 @@ #include #include #include +#include +#include +#include +#include