From patchwork Fri Sep 14 08:28:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Ruppert X-Patchwork-Id: 183832 X-Patchwork-Delegate: trini@ti.com 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 050082C0084 for ; Fri, 14 Sep 2012 18:29:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E6FA281B7; Fri, 14 Sep 2012 10:29:07 +0200 (CEST) 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 6YyWIyHCPGwq; Fri, 14 Sep 2012 10:29:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 569DD281AD; Fri, 14 Sep 2012 10:29:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99FEF28197 for ; Fri, 14 Sep 2012 10:29:04 +0200 (CEST) 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 CGPCd491o1H5 for ; Fri, 14 Sep 2012 10:29:04 +0200 (CEST) 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 sew-notes-gt.sewerin.de (unknown [77.75.200.26]) by theia.denx.de (Postfix) with ESMTP id 27AEE28181 for ; Fri, 14 Sep 2012 10:29:03 +0200 (CEST) Received: from localhost.localdomain ([10.1.1.128]) by sew-notes-gt.sewerin.de (Lotus Domino Release 8.5.3) with ESMTP id 2012091410285791-3421 ; Fri, 14 Sep 2012 10:28:57 +0200 From: Bastian Ruppert To: u-boot@lists.denx.de Date: Fri, 14 Sep 2012 10:28:59 +0200 Message-Id: <1347611344-7483-1-git-send-email-Bastian.Ruppert@Sewerin.de> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <20120902005045.46f464fc@wker> References: <20120902005045.46f464fc@wker> X-MIMETrack: Itemize by SMTP Server on SEW-KOM-GT-01/SEWERIN/DE(Release 8.5.3|September 15, 2011) at 14.09.2012 10:28:57, Serialize by Router on SEW-KOM-GT-01/SEWERIN/DE(Release 8.5.3|September 15, 2011) at 14.09.2012 10:29:03, Serialize complete at 14.09.2012 10:29:03 Cc: Tom Rini , Bastian Ruppert Subject: [U-Boot] [PATCH v4 1/6] davinci: ea20: reorganisation LCD startup 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Bastian Ruppert CC: Tom Rini Acked-by: Stefano Babic --- board/davinci/ea20/ea20.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 7e00040..69307e4 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -176,6 +176,9 @@ int board_early_init_f(void) if (davinci_configure_pin_mux(gpio_pins, ARRAY_SIZE(gpio_pins)) != 0) return 1; + /* Set DISP_ON high to enable LCD output*/ + gpio_direction_output(97, 1); + /* Set the RESETOUTn low */ gpio_direction_output(111, 0); @@ -188,9 +191,6 @@ int board_early_init_f(void) /* Set LCD_B_PWR low to power down LCD Backlight*/ gpio_direction_output(102, 0); - /* Set DISP_ON low to disable LCD output*/ - gpio_direction_output(97, 0); - #ifndef CONFIG_USE_IRQ irq_init(); #endif @@ -250,11 +250,6 @@ int board_early_init_f(void) writel(readl(&davinci_syscfg_regs->mstpri[2]) & 0x0fffffff, &davinci_syscfg_regs->mstpri[2]); - /* Set LCD_B_PWR low to power up LCD Backlight*/ - gpio_set_value(102, 1); - - /* Set DISP_ON low to disable LCD output*/ - gpio_set_value(97, 1); return 0; } @@ -276,6 +271,9 @@ int board_init(void) int board_late_init(void) { + unsigned char buf[2]; + int ret; + /* PinMux for HALTEN */ if (davinci_configure_pin_mux(halten_pin, ARRAY_SIZE(halten_pin)) != 0) return 1; @@ -285,6 +283,15 @@ int board_late_init(void) setenv("stdout", "serial"); + /* Set fixed contrast settings for LCD via I2C potentiometer */ + buf[0] = 0x00; + buf[1] = 0xd7; + ret = i2c_write(0x2e, 6, 1, buf, 2); + if (ret) + puts("\nContrast Settings FAILED\n"); + + /* Set LCD_B_PWR high to power up LCD Backlight*/ + gpio_set_value(102, 1); return 0; } #endif /* CONFIG_BOARD_LATE_INIT */