From patchwork Thu Oct 17 15:02:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Carikli X-Patchwork-Id: 3061471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB73EBF924 for ; Thu, 17 Oct 2013 15:06:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DA0B20383 for ; Thu, 17 Oct 2013 15:06:21 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D047720170 for ; Thu, 17 Oct 2013 15:06:19 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWp8S-0002ER-RR; Thu, 17 Oct 2013 15:05:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWp85-0008Dx-KN; Thu, 17 Oct 2013 15:04:49 +0000 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWp7R-00085W-CU for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2013 15:04:14 +0000 Received: from denis-N73SV.local.eukrea.com (unknown [88.170.243.169]) by smtp4-g21.free.fr (Postfix) with ESMTP id 1D89D4C81B3; Thu, 17 Oct 2013 17:03:25 +0200 (CEST) From: Denis Carikli To: Sascha Hauer Subject: [Patch v2][ 08/37] video: mx3fb: Add device tree suport. Date: Thu, 17 Oct 2013 17:02:06 +0200 Message-Id: <1382022155-21954-9-git-send-email-denis@eukrea.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382022155-21954-1-git-send-email-denis@eukrea.com> References: <1382022155-21954-1-git-send-email-denis@eukrea.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131017_110410_222734_17B66228 X-CRM114-Status: GOOD ( 21.32 ) X-Spam-Score: -0.2 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, Pawel Moll , Stephen Warren , Ian Campbell , Rob Herring , Denis Carikli , Tomi Valkeinen , =?UTF-8?q?Eric=20B=C3=A9nard?= , Jean-Christophe Plagniol-Villard , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Stephen Warren Cc: Ian Campbell Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Cc: Eric BĂ©nard Signed-off-by: Denis Carikli --- .../devicetree/bindings/video/fsl,mx3-fb.txt | 52 ++++++++ drivers/video/Kconfig | 2 + drivers/video/mx3fb.c | 133 +++++++++++++++++--- 3 files changed, 171 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/fsl,mx3-fb.txt diff --git a/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt b/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt new file mode 100644 index 0000000..ae0b343 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt @@ -0,0 +1,52 @@ +Freescale mx3 Framebuffer + +This framebuffer driver supports the imx31 and imx35 devices. + +Required properties: +- compatible : Must be "fsl,mx3-fb". +- reg : Should contain 1 register ranges(address and length). +- dmas : Phandle to the ipu dma node as described in + Documentation/devicetree/bindings/dma/dma.txt +- dma-names : Must be "tx". +- clocks : Phandle to the ipu source clock. +- display: Phandle to a display node as described in + Documentation/devicetree/bindings/video/display-timing.txt + Additional, the display node has to define properties: + - bits-per-pixel: lcd panel bit-depth. + +Optional properties: +- ipu-disp-format: could be "rgb666", "rgb565", or "rgb888". + If not specified defaults to "rgb666". + +Example: + + lcdc: mx3fb@53fc00b4 { + compatible = "fsl,mx3-fb"; + reg = <0x53fc00b4 0x0b>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdc_1>; + clocks = <&clks 55>; + dmas = <&ipu 14>; + dma-names = "tx"; + }; + + ... + + cmo_qvga: display { + model = "CMO-QVGA"; + bits-per-pixel = <16>; + native-mode = <&qvga_timings>; + display-timings { + qvga_timings: 320x240 { + clock-frequency = <6500000>; + hactive = <320>; + vactive = <240>; + hback-porch = <30>; + hfront-porch = <38>; + vback-porch = <20>; + vfront-porch = <3>; + hsync-len = <15>; + vsync-len = <4>; + }; + }; + }; diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 14317b7..2a638df 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2359,6 +2359,8 @@ config FB_MX3 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEOMODE_HELPERS + select FB_MODE_HELPERS default y help This is a framebuffer device for the i.MX31 LCD Controller. So diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index 37704da..8683dda 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -32,6 +32,8 @@ #include #include +#include