From patchwork Wed Jan 9 14:55:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 210718 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 D23FD2C0147 for ; Thu, 10 Jan 2013 01:55:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66DA94A12F; Wed, 9 Jan 2013 15:55:26 +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 qNC-qpu+4hEi; Wed, 9 Jan 2013 15:55:26 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 294F64A103; Wed, 9 Jan 2013 15:55:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 468D14A103 for ; Wed, 9 Jan 2013 15:55:24 +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 7Mn79erGvpD4 for ; Wed, 9 Jan 2013 15:55:22 +0100 (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 tx2outboundpool.messaging.microsoft.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by theia.denx.de (Postfix) with ESMTPS id 1878B4A101 for ; Wed, 9 Jan 2013 15:55:20 +0100 (CET) Received: from mail14-tx2-R.bigfish.com (10.9.14.241) by TX2EHSOBE003.bigfish.com (10.9.40.23) with Microsoft SMTP Server id 14.1.225.23; Wed, 9 Jan 2013 14:55:18 +0000 Received: from mail14-tx2 (localhost [127.0.0.1]) by mail14-tx2-R.bigfish.com (Postfix) with ESMTP id DAFA6160163; Wed, 9 Jan 2013 14:55:17 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail14-tx2 (localhost.localdomain [127.0.0.1]) by mail14-tx2 (MessageSwitch) id 1357743316109304_28143; Wed, 9 Jan 2013 14:55:16 +0000 (UTC) Received: from TX2EHSMHS043.bigfish.com (unknown [10.9.14.245]) by mail14-tx2.bigfish.com (Postfix) with ESMTP id 1552F180085; Wed, 9 Jan 2013 14:55:16 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS043.bigfish.com (10.9.99.143) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 9 Jan 2013 14:55:15 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.318.3; Wed, 9 Jan 2013 14:55:14 +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 r09EtCEO024645; Wed, 9 Jan 2013 07:55:13 -0700 From: Fabio Estevam To: Date: Wed, 9 Jan 2013 12:55:09 -0200 Message-ID: <1357743309-12339-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 v2] mx51evk: Add DVI output support 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 DVI output support and make it the default video output. Currently the CLAA WVGA panel is supported, but this panel has to be purchased separately, so using the DVI output as the default would allow more people to try the splash screen feature on a mx51evk. If someone still wants to use the CLAA WVGA, just set the panel variable as: set panel claa Signed-off-by: Fabio Estevam --- Changes since v1: - Remove 'Let' from the Subject board/freescale/mx51evk/mx51evk.c | 2 -- board/freescale/mx51evk/mx51evk_video.c | 39 ++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index d1ef431..54c16b1 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -489,8 +489,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; - lcd_enable(); - return 0; } diff --git a/board/freescale/mx51evk/mx51evk_video.c b/board/freescale/mx51evk/mx51evk_video.c index f036cf7..1583131 100644 --- a/board/freescale/mx51evk/mx51evk_video.c +++ b/board/freescale/mx51evk/mx51evk_video.c @@ -48,6 +48,22 @@ static struct fb_videomode const claa_wvga = { .vmode = FB_VMODE_NONINTERLACED }; +static struct fb_videomode const dvi = { + .name = "DVI panel", + .refresh = 60, + .xres = 1024, + .yres = 768, + .pixclock = 15385, + .left_margin = 220, + .right_margin = 40, + .upper_margin = 21, + .lower_margin = 7, + .hsync_len = 60, + .vsync_len = 10, + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED +}; + void setup_iomux_lcd(void) { /* DI2_PIN15 */ @@ -73,9 +89,26 @@ void setup_iomux_lcd(void) gpio_direction_output(MX51EVK_LCD_BACKLIGHT, 1); } -void lcd_enable(void) +int board_video_skip(void) { - int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565); + int ret; + char const *e = getenv("panel"); + + if (e) { + if (strcmp(e, "claa") == 0) { + ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565); + if (ret) + printf("claa cannot be configured: %d\n", ret); + return ret; + } + } + + /* + * 'panel' env variable not found or has different value than 'claa' + * Defaulting to dvi output. + */ + ret = ipuv3_fb_init(&dvi, 0, IPU_PIX_FMT_RGB24); if (ret) - printf("LCD cannot be configured: %d\n", ret); + printf("dvi cannot be configured: %d\n", ret); + return ret; }