From patchwork Tue Jul 10 07:08:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lauri Hintsala X-Patchwork-Id: 1176201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 5942940B37 for ; Tue, 10 Jul 2012 07:15:16 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SoUZ6-0007jo-3a; Tue, 10 Jul 2012 07:08:56 +0000 Received: from bluegiga.fi ([194.100.31.45] helo=blue-gw.bluegiga.fi) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SoUYr-0007gJ-PG for linux-arm-kernel@lists.infradead.org; Tue, 10 Jul 2012 07:08:46 +0000 Received: from bgtlh.bgt.local (unknown [10.1.1.28]) by blue-gw.bluegiga.fi (Postfix) with ESMTP id B5BFA7BE2DF; Tue, 10 Jul 2012 10:08:34 +0300 (EEST) From: Lauri Hintsala To: shawn.guo@linaro.org Subject: [PATCH 2/6] ARM: apx4devkit: add display support Date: Tue, 10 Jul 2012 10:08:08 +0300 Message-Id: <1341904092-13777-3-git-send-email-lauri.hintsala@bluegiga.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341904092-13777-1-git-send-email-lauri.hintsala@bluegiga.com> References: <1341904092-13777-1-git-send-email-lauri.hintsala@bluegiga.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org, Lauri Hintsala X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add HannStar display and device tree configuration. Signed-off-by: Lauri Hintsala --- arch/arm/boot/dts/apx4devkit.dts | 21 +++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 24 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/apx4devkit.dts b/arch/arm/boot/dts/apx4devkit.dts index ecad288..6217297 100644 --- a/arch/arm/boot/dts/apx4devkit.dts +++ b/arch/arm/boot/dts/apx4devkit.dts @@ -35,11 +35,32 @@ reg = <0>; fsl,pinmux-ids = < 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ + 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */ >; fsl,drive-strength = <0>; fsl,voltage = <1>; fsl,pull-up = <0>; }; + + lcdif_pins_apx4: lcdif-apx4@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_24bit_pins_a + &lcdif_pins_apx4>; + status = "okay"; }; }; diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index b3239e2..4ea78e6 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -80,6 +80,25 @@ static struct fb_videomode m28evk_video_modes[] = { }, }; +static struct fb_videomode apx4devkit_video_modes[] = { + { + .name = "HannStar PJ70112A", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 33333, /* picosecond (30.00 MHz) */ + .left_margin = 88, + .right_margin = 40, + .upper_margin = 32, + .lower_margin = 13, + .hsync_len = 48, + .vsync_len = 3, + .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; static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = { @@ -250,6 +269,11 @@ static void __init apx4devkit_init(void) if (IS_BUILTIN(CONFIG_PHYLIB)) phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, apx4devkit_phy_fixup); + + mxsfb_pdata.mode_list = apx4devkit_video_modes; + mxsfb_pdata.mode_count = ARRAY_SIZE(apx4devkit_video_modes); + mxsfb_pdata.default_bpp = 32; + mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT; } static void __init mxs_machine_init(void)