From patchwork Wed Oct 23 12:43:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Carikli X-Patchwork-Id: 285664 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 934E82C00A4 for ; Wed, 23 Oct 2013 23:46:10 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYxoE-0005IL-3d; Wed, 23 Oct 2013 12:45:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYxo0-0005Jl-9S; Wed, 23 Oct 2013 12:44:56 +0000 Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VYxnj-0005GI-Dy for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2013 12:44:42 +0000 Received: from denis-N73SV.local.eukrea.com (unknown [88.170.243.169]) by smtp5-g21.free.fr (Postfix) with ESMTP id B8A22D4821C; Wed, 23 Oct 2013 14:44:12 +0200 (CEST) From: Denis Carikli To: Sascha Hauer Subject: [PATCHv3][ 3/5] video: mx3fb: Add device tree suport. Date: Wed, 23 Oct 2013 14:43:47 +0200 Message-Id: <1382532229-32755-3-git-send-email-denis@eukrea.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382532229-32755-1-git-send-email-denis@eukrea.com> References: <1382532229-32755-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-20131023_084440_246659_8D2FB1F5 X-CRM114-Status: GOOD ( 21.91 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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?= , Shawn Guo , 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org 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: Eric BĂ©nard Signed-off-by: Denis Carikli --- ChangeLog v2->v3: - The device tree bindings were reworked in order to make it look more like the IPUv3 bindings. - The interface_pix_fmt property now looks like the IPUv3 one. --- .../devicetree/bindings/video/fsl,mx3-fb.txt | 35 ++++++ drivers/video/Kconfig | 2 + drivers/video/mx3fb.c | 125 +++++++++++++++++--- 3 files changed, 147 insertions(+), 15 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..0b31374 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,mx3-fb.txt @@ -0,0 +1,35 @@ +Freescale MX3 fb +================ + +Required properties: +- compatible: Should be "fsl,mx3fb". compatible chips include the imx31 and the + imx35. +- reg: should be register base and length as documented in the datasheet. +- clocks: Handle to the ipu_gate clock. + +Example: + +lcdc: mx3fb@53fc00b4 { + compatible = "fsl,mx3-fb"; + reg = <0x53fc00b4 0x0b>; + clocks = <&clks 55>; +}; + +Display support +=============== +Required properties: +- model : The user-visible name of the display. + +Optional properties: +- interface_pix_fmt: How this display is connected to the + crtc. Currently supported types: "rgb24", "rgb565", "rgb666" + +It can also have an optional timing subnode as described in + Documentation/devicetree/bindings/video/display-timing.txt. + +Example: + +display@di0 { + interface-pix-fmt = "rgb666"; + model = "CMO-QVGA"; +}; 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 804f874..de5a6c8 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c @@ -31,6 +31,8 @@ #include #include +#include