From patchwork Fri Nov 2 18:01:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 196708 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 514B12C007A for ; Sat, 3 Nov 2012 05:12:04 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TULgJ-00061Z-W2; Fri, 02 Nov 2012 18:09:24 +0000 Received: from kmf.trabucayre.com ([91.121.117.161] helo=mail) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TULgE-00060v-US for linux-arm-kernel@lists.infradead.org; Fri, 02 Nov 2012 18:09:20 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by mail (Postfix) with ESMTP id 0097539841; Fri, 2 Nov 2012 19:01:49 +0100 (CET) From: Gwenhael Goavec-Merou To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM: mxs: apf28dev: Add LCD and backlight support Date: Fri, 2 Nov 2012 19:01:48 +0100 Message-Id: <1351879308-72491-2-git-send-email-gwenhael.goavec-merou@armadeus.com> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1351879308-72491-1-git-send-email-gwenhael.goavec-merou@armadeus.com> References: <1351879308-72491-1-git-send-email-gwenhael.goavec-merou@armadeus.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121102_140919_744158_5DCEBB8B X-CRM114-Status: GOOD ( 12.18 ) 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.0 FSL_HELO_NON_FQDN_1 FSL_HELO_NON_FQDN_1 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: shawn.guo@linaro.org, Gwenhael Goavec-Merou , Julien Boibessot X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Signed-off-by: Gwenhael Goavec-Merou Signed-off-by: Julien Boibessot --- arch/arm/boot/dts/imx28-apf28dev.dts | 28 ++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 24 ++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts index 8e765ae..1643d25 100644 --- a/arch/arm/boot/dts/imx28-apf28dev.dts +++ b/arch/arm/boot/dts/imx28-apf28dev.dts @@ -46,6 +46,26 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + lcdif_pins_apf28dev: lcdif-apf28dev@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ + 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ + 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ + 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + + lcdif@80030000 { + pinctrl-names = "default"; + pinctrl-0 = <&lcdif_16bit_pins_a + &lcdif_pins_apf28dev>; + status = "okay"; }; }; @@ -110,4 +130,12 @@ linux,default-trigger = "heartbeat"; }; }; + + backlight { + compatible = "pwm-backlight"; + + pwms = <&pwm 3 191000>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + }; }; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 48c2eba..67ef355 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -100,6 +100,25 @@ static struct fb_videomode apx4devkit_video_modes[] = { }, }; +static struct fb_videomode apf28dev_video_modes[] = { + { + .name = "LW700", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 30303, /* picosecond */ + .left_margin = 96, + .right_margin = 96, /* at least 3 & 1 */ + .upper_margin = 0x14, + .lower_margin = 0x15, + .hsync_len = 64, + .vsync_len = 4, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT | + FB_SYNC_DATA_ENABLE_HIGH_ACT | + FB_SYNC_DOTCLK_FAILING_ACT, + }, +}; + static struct mxsfb_platform_data mxsfb_pdata __initdata; /* @@ -374,6 +393,11 @@ static void __init cfa10049_init(void) static void __init apf28_init(void) { enable_clk_enet_out(); + + mxsfb_pdata.mode_list = apf28dev_video_modes; + mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes); + mxsfb_pdata.default_bpp = 16; + mxsfb_pdata.ld_intf_width = STMLCDIF_16BIT; } static void __init mxs_machine_init(void)