diff mbox

[v3] davinci: Correct the GPIO number for LCD panel power

Message ID 1253042676-16605-1-git-send-email-sudhakar.raj@ti.com (mailing list archive)
State Superseded
Headers show

Commit Message

Rajashekhara, Sudhakar Sept. 15, 2009, 7:24 p.m. UTC
On the latest DA850/OMAP-L138 EVM (Beta) the GPIO pin
number of LCD panel power has changed. This patch takes
care of this change. Software will support only Beta
versions of DA850/OMAP-L138 EVM.

In the process, add the missing entry for data pin 0
in da850_lcdcntl_pins structure.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
---
 arch/arm/mach-davinci/board-da850-evm.c  |    7 ++++++-
 arch/arm/mach-davinci/da850.c            |   13 ++++++-------
 arch/arm/mach-davinci/include/mach/mux.h |    2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

Comments

Sergei Shtylyov Sept. 15, 2009, 10:58 a.m. UTC | #1
Hello.

Sudhakar Rajashekhara wrote:

> On the latest DA850/OMAP-L138 EVM (Beta) the GPIO pin
> number of LCD panel power has changed. This patch takes
> care of this change. Software will support only Beta
> versions of DA850/OMAP-L138 EVM.
>
> In the process, add the missing entry for data pin 0
> in da850_lcdcntl_pins structure.
>   

   You haven't mentioned the removal of the GPIO pins from the pin list...

> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> ---
>  arch/arm/mach-davinci/board-da850-evm.c  |    7 ++++++-
>  arch/arm/mach-davinci/da850.c            |   13 ++++++-------
>  arch/arm/mach-davinci/include/mach/mux.h |    2 +-
>  3 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index fbc7aae..a36dea3 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -32,12 +32,13 @@
>  #include <mach/cp_intc.h>
>  #include <mach/da8xx.h>
>  #include <mach/nand.h>
> +#include <mach/mux.h>
>  
>  #define DA850_EVM_PHY_MASK		0x1
>  #define DA850_EVM_MDIO_FREQUENCY	2200000 /* PHY bus frequency */
>  
> +#define DA850_LCD_PWR_PIN		GPIO_TO_PIN(2, 8)
>  #define DA850_LCD_BL_PIN		GPIO_TO_PIN(2, 15)
> -#define DA850_LCD_PWR_PIN		GPIO_TO_PIN(8, 10)
>  
>  #define DA850_MMCSD_CD_PIN		GPIO_TO_PIN(4, 0)
>  #define DA850_MMCSD_WP_PIN		GPIO_TO_PIN(4, 1)
> @@ -372,6 +373,10 @@ static __init void da850_evm_init(void)
>  		pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
>  				ret);
>  
> +	/* Handle board specific muxing for LCD here */
> +	davinci_cfg_reg(DA850_GPIO2_8);
> +	davinci_cfg_reg(DA850_GPIO2_15);
> +
>   

   Note that these functions do return the result (and can fail).

WBR, Sergei
Rajashekhara, Sudhakar Sept. 15, 2009, 12:23 p.m. UTC | #2
On Tue, Sep 15, 2009 at 16:28:26, Sergei Shtylyov wrote:
> Hello.
> 
> Sudhakar Rajashekhara wrote:
> 
> > On the latest DA850/OMAP-L138 EVM (Beta) the GPIO pin
> > number of LCD panel power has changed. This patch takes
> > care of this change. Software will support only Beta
> > versions of DA850/OMAP-L138 EVM.
> >
> > In the process, add the missing entry for data pin 0
> > in da850_lcdcntl_pins structure.
> >   
> 
>    You haven't mentioned the removal of the GPIO pins from the pin list...
> 
> > Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> > ---
> 
>    Note that these functions do return the result (and can fail).
> 

Will update the patch to check for the error and re-submit this patch.

Regards, Sudhakar
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index fbc7aae..a36dea3 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -32,12 +32,13 @@ 
 #include <mach/cp_intc.h>
 #include <mach/da8xx.h>
 #include <mach/nand.h>
+#include <mach/mux.h>
 
 #define DA850_EVM_PHY_MASK		0x1
 #define DA850_EVM_MDIO_FREQUENCY	2200000 /* PHY bus frequency */
 
+#define DA850_LCD_PWR_PIN		GPIO_TO_PIN(2, 8)
 #define DA850_LCD_BL_PIN		GPIO_TO_PIN(2, 15)
-#define DA850_LCD_PWR_PIN		GPIO_TO_PIN(8, 10)
 
 #define DA850_MMCSD_CD_PIN		GPIO_TO_PIN(4, 0)
 #define DA850_MMCSD_WP_PIN		GPIO_TO_PIN(4, 1)
@@ -372,6 +373,10 @@  static __init void da850_evm_init(void)
 		pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
 				ret);
 
+	/* Handle board specific muxing for LCD here */
+	davinci_cfg_reg(DA850_GPIO2_8);
+	davinci_cfg_reg(DA850_GPIO2_15);
+
 	ret = da850_lcd_hw_init();
 	if (ret)
 		pr_warning("da850_evm_init: lcd initialization failed: %d\n",
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 575e9cc..a62863c 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -513,8 +513,8 @@  static const struct mux_config da850_pins[] = {
 	MUX_CFG(DA850, EMA_WAIT_1,	6,	24,	15,	1,	false)
 	MUX_CFG(DA850, NEMA_CS_2,	7,	0,	15,	1,	false)
 	/* GPIO function */
+	MUX_CFG(DA850, GPIO2_8,		5,	28,	15,	8,	false)
 	MUX_CFG(DA850, GPIO2_15,	5,	0,	15,	8,	false)
-	MUX_CFG(DA850, GPIO8_10,	18,	28,	15,	8,	false)
 	MUX_CFG(DA850, GPIO4_0,		10,	28,	15,	8,	false)
 	MUX_CFG(DA850, GPIO4_1,		10,	24,	15,	8,	false)
 #endif
@@ -562,12 +562,11 @@  const short da850_mcasp_pins[] __initdata = {
 };
 
 const short da850_lcdcntl_pins[] __initdata = {
-	DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3, DA850_LCD_D_4,
-	DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7, DA850_LCD_D_8,
-	DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11, DA850_LCD_D_12,
-	DA850_LCD_D_13, DA850_LCD_D_14, DA850_LCD_D_15, DA850_LCD_PCLK,
-	DA850_LCD_HSYNC, DA850_LCD_VSYNC, DA850_NLCD_AC_ENB_CS, DA850_GPIO2_15,
-	DA850_GPIO8_10,
+	DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
+	DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
+	DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
+	DA850_LCD_D_12, DA850_LCD_D_13, DA850_LCD_D_14, DA850_LCD_D_15,
+	DA850_LCD_PCLK, DA850_LCD_HSYNC, DA850_LCD_VSYNC, DA850_NLCD_AC_ENB_CS,
 	-1
 };
 
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
index 7732832..fc8eb16 100644
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -872,8 +872,8 @@  enum davinci_da850_index {
 	DA850_NEMA_CS_2,
 
 	/* GPIO function */
+	DA850_GPIO2_8,
 	DA850_GPIO2_15,
-	DA850_GPIO8_10,
 	DA850_GPIO4_0,
 	DA850_GPIO4_1,
 };