From patchwork Wed Jan 9 15:10:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 210730 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 403552C0131 for ; Thu, 10 Jan 2013 02:34:18 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDC7E4A0F6; Wed, 9 Jan 2013 16:34:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p7qGch2hyBwa; Wed, 9 Jan 2013 16:34:15 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A7F64A107; Wed, 9 Jan 2013 16:34:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A1BB04A107 for ; Wed, 9 Jan 2013 16:34:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sue+obymovQK for ; Wed, 9 Jan 2013 16:34:11 +0100 (CET) X-Greylist: delayed 906 seconds by postgrey-1.27 at theia; Wed, 09 Jan 2013 16:34:09 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from co9outboundpool.messaging.microsoft.com (co9ehsobe002.messaging.microsoft.com [207.46.163.25]) by theia.denx.de (Postfix) with ESMTPS id D726A4A0F6 for ; Wed, 9 Jan 2013 16:34:09 +0100 (CET) Received: from mail210-co9-R.bigfish.com (10.236.132.232) by CO9EHSOBE014.bigfish.com (10.236.130.77) with Microsoft SMTP Server id 14.1.225.23; Wed, 9 Jan 2013 15:19:01 +0000 Received: from mail210-co9 (localhost [127.0.0.1]) by mail210-co9-R.bigfish.com (Postfix) with ESMTP id 25325980470; Wed, 9 Jan 2013 15:12:25 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:error; EFVD:FOP X-SpamScore: 0 X-BigFish: VS0(zzzz1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail210-co9 (localhost.localdomain [127.0.0.1]) by mail210-co9 (MessageSwitch) id 1357744328884562_16684; Wed, 9 Jan 2013 15:12:08 +0000 (UTC) Received: from CO9EHSMHS012.bigfish.com (unknown [10.236.132.225]) by mail210-co9.bigfish.com (Postfix) with ESMTP id A99C9BC004B; Wed, 9 Jan 2013 15:12:08 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS012.bigfish.com (10.236.130.22) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 9 Jan 2013 15:10:27 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.318.3; Wed, 9 Jan 2013 15:10:19 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.82]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r09FAHnZ001589; Wed, 9 Jan 2013 08:10:18 -0700 From: Fabio Estevam To: Date: Wed, 9 Jan 2013 13:10:16 -0200 Message-ID: <1357744216-27068-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3] mx53loco: Add support for SEIKO 4.3'' WVGA panel X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add support for the Seiko 4.3'' WVGA panel on mx53loco. By default, the CLAA WVGA panel is selected. In order to support the Seiko panel, the enviroment variable 'panel' must be set to 'seiko'. Signed-off-by: Fabio Estevam --- Changes since v2: - Simplify lcd detection logic Changes since v1: - Allow a single binary to support both CLAA and Seiko panels board/freescale/mx53loco/mx53loco.c | 2 -- board/freescale/mx53loco/mx53loco_video.c | 38 ++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 60cd4f0..8f39c38 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -503,8 +503,6 @@ int board_init(void) mxc_set_sata_internal_clock(); setup_iomux_i2c(); - lcd_enable(); - return 0; } diff --git a/board/freescale/mx53loco/mx53loco_video.c b/board/freescale/mx53loco/mx53loco_video.c index 69991e8..a4d5a6a 100644 --- a/board/freescale/mx53loco/mx53loco_video.c +++ b/board/freescale/mx53loco/mx53loco_video.c @@ -46,6 +46,21 @@ static struct fb_videomode const claa_wvga = { .vmode = FB_VMODE_NONINTERLACED }; +static struct fb_videomode const seiko_wvga = { + .name = "Seiko-43WVF1G", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 29851, /* picosecond (33.5 MHz) */ + .left_margin = 89, + .right_margin = 164, + .upper_margin = 23, + .lower_margin = 10, + .hsync_len = 10, + .vsync_len = 10, + .sync = 0, +}; + void setup_iomux_lcd(void) { mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0); @@ -86,9 +101,26 @@ void setup_iomux_lcd(void) gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_GPIO_1), 1); } -void lcd_enable(void) +int board_video_skip(void) { - int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); + int ret; + char const *e = getenv("panel"); + + if (e) { + if (strcmp(e, "seiko") == 0) { + ret = ipuv3_fb_init(&seiko_wvga, 0, IPU_PIX_FMT_RGB24); + if (ret) + printf("Seiko cannot be configured: %d\n", ret); + return ret; + } + } + + /* + * 'panel' env variable not found or has different value than 'seiko' + * Defaulting to claa lcd. + */ + ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); if (ret) - printf("LCD cannot be configured: %d\n", ret); + printf("CLAA cannot be configured: %d\n", ret); + return ret; }