From patchwork Tue Mar 5 17:30:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 2220511 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3FC4A40077 for ; Tue, 5 Mar 2013 17:31:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757442Ab3CERa6 (ORCPT ); Tue, 5 Mar 2013 12:30:58 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:53125 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755758Ab3CERa4 (ORCPT ); Tue, 5 Mar 2013 12:30:56 -0500 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UCvhL-00022P-Qz; Tue, 05 Mar 2013 18:30:43 +0100 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1UCvhL-0004JG-Gx; Tue, 05 Mar 2013 18:30:43 +0100 From: Markus Pargmann To: Sascha Hauer Cc: Florian Tobias Schandinat , Grant Likely , Rob Herring , linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Pargmann , Fabio Estevam Subject: [PATCH v2 2/2] video: imxfb: Add DT support Date: Tue, 5 Mar 2013 18:30:08 +0100 Message-Id: <1362504608-15839-3-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1362504608-15839-1-git-send-email-mpa@pengutronix.de> References: <1362504608-15839-1-git-send-email-mpa@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-fbdev@vger.kernel.org Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Add devicetree support for imx framebuffer driver. It uses the generic display bindings and helper functions. Signed-off-by: Markus Pargmann Cc: Fabio Estevam --- Notes: Changes in v2: - Removed pwmr register property - Cleanup of devicetree binding documentation - Use default values for pwmr and lscr1 .../devicetree/bindings/video/fsl,imx-fb.txt | 49 ++++++ drivers/video/imxfb.c | 182 +++++++++++++++++---- 2 files changed, 197 insertions(+), 34 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/fsl,imx-fb.txt diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt new file mode 100644 index 0000000..e1a53a3 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt @@ -0,0 +1,49 @@ +Freescale imx21 Framebuffer + +This framebuffer driver supports devices imx1, imx21, imx25, and imx27. + +Required properties: +- compatible : "fsl,-fb", chip should be imx1 or imx21 +- reg : Should contain 1 register ranges(address and length) +- interrupts : One interrupt of the fb dev + +Required nodes: +- display: Phandle to a display node as described in + Documentation/devicetree/bindings/video/display-timing.txt + Additional, the display node has to define properties: + - bpp: Bits per pixel + - pcr: LCDC PCR value + +Optional properties: +- dmacr-eukrea: Should be set for eukrea boards. + +Example: + + imxfb: fb@10021000 { + compatible = "fsl,imx27-fb", "fsl,imx21-fb"; + interrupts = <61>; + reg = <0x10021000 0x1000>; + display = <&display0>; + }; + + ... + + display0: display0 { + model = "Primeview-PD050VL1"; + native-mode = <&timing_disp0>; + bpp = <16>; /* non-standard but required */ + pcr = <0xf0c88080>; /* non-standard but required */ + display-timings { + timing_disp0: 640x480 { + hactive = <640>; + vactive = <480>; + hback-porch = <112>; + hfront-porch = <36>; + hsync-len = <32>; + vback-porch = <33>; + vfront-porch = <33>; + vsync-len = <2>; + clock-frequency = <25000000>; + }; + }; + }; diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index ef2b587..be784ed 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c @@ -32,6 +32,12 @@ #include #include #include +#include +#include + +#include