From patchwork Sun Apr 7 16:41:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Dunn X-Patchwork-Id: 234521 X-Patchwork-Delegate: albert.aribaud@free.fr 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 BCCD02C009E for ; Mon, 8 Apr 2013 05:06:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B47F44A22C; Sun, 7 Apr 2013 21:06:21 +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 K9GfW2MhaKgI; Sun, 7 Apr 2013 21:06:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDB1E4A23F; Sun, 7 Apr 2013 21:05:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 366744A246 for ; Sun, 7 Apr 2013 18:54:22 +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 xv22Gm3MJtkX for ; Sun, 7 Apr 2013 18:54:21 +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 smtp.newsguy.com (smtp.newsguy.com [74.209.136.69]) by theia.denx.de (Postfix) with ESMTPS id 6553F4A22F for ; Sun, 7 Apr 2013 18:54:21 +0200 (CEST) Received: from localhost.localdomain (87.sub-70-199-131.myvzw.com [70.199.131.87]) by smtp.newsguy.com (8.14.3/8.14.3) with ESMTP id r37GewUg070841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Apr 2013 09:41:45 -0700 (PDT) (envelope-from mikedunn@newsguy.com) From: Mike Dunn To: u-boot@lists.denx.de Date: Sun, 7 Apr 2013 09:41:00 -0700 Message-Id: <1365352865-2137-4-git-send-email-mikedunn@newsguy.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1365352865-2137-1-git-send-email-mikedunn@newsguy.com> References: <1365352865-2137-1-git-send-email-mikedunn@newsguy.com> X-Mailman-Approved-At: Sun, 07 Apr 2013 21:05:49 +0200 Cc: Marek Vasut , Tomas Cech , Haojian Zhuang Subject: [U-Boot] [PATCH 3/8] pxa_lcd: allow L_BIAS line to be unused 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 This patch adds a config option CONFIG_SYS_LCD_PXA_NO_L_BIAS, which causes the lcd controller initialization code to leave as an ordinary gpio the line that is typically configured as the lcd L_BIAS alternate function (this is the gpio 77 line). For some reason (I don't have a datasheet), the lcd device on the palmtreo680 board does not use the L_BIAS line. PalmOS does not configure the gpio 77 line for the L_BIAS alternate function, and if it is configured as such, the lcd does not work. Signed-off-by: Mike Dunn --- This is a little ugly, I know, but I didn't want to try and get too fancy. drivers/video/pxa_lcd.c | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c index fd848ef..29f62e9 100644 --- a/drivers/video/pxa_lcd.c +++ b/drivers/video/pxa_lcd.c @@ -478,8 +478,13 @@ static void pxafb_setup_gpio (vidinfo_t *vid) /* bits 74-77 */ writel(readl(GPDR2) | (0xf << 10), GPDR2); +#ifdef CONFIG_SYS_LCD_PXA_NO_L_BIAS + writel((readl(GAFR2_L) & ~(0xff << 20)) | (0x2a << 20), + GAFR2_L); +#else writel((readl(GAFR2_L) & ~(0xff << 20)) | (0xaa << 20), - GAFR2_L); + GAFR2_L); +#endif } /* 8 bit interface */ @@ -497,8 +502,13 @@ static void pxafb_setup_gpio (vidinfo_t *vid) /* bits 74-77 */ writel(readl(GPDR2) | (0xf << 10), GPDR2); +#ifdef CONFIG_SYS_LCD_PXA_NO_L_BIAS + writel((readl(GAFR2_L) & ~(0xff << 20)) | (0x2a << 20), + GAFR2_L); +#else writel((readl(GAFR2_L) & ~(0xff << 20)) | (0xaa << 20), - GAFR2_L); + GAFR2_L); +#endif } /* 16 bit interface */ @@ -511,7 +521,11 @@ static void pxafb_setup_gpio (vidinfo_t *vid) writel((readl(GAFR1_U) & ~(0xfff << 20)) | (0xaaa << 20), GAFR1_U); +#ifdef CONFIG_SYS_LCD_PXA_NO_L_BIAS + writel((readl(GAFR2_L) & 0xf0000000) | 0x02aaaaaa, GAFR2_L); +#else writel((readl(GAFR2_L) & 0xf0000000) | 0x0aaaaaaa, GAFR2_L); +#endif } else {