Patchwork [U-Boot,2/5] EXYNOS5: Add pinmux for LCD

login
register
mail settings
Submitter Ajay Kumar
Date Dec. 11, 2012, 11:01 a.m.
Message ID <1355223686-13718-2-git-send-email-ajaykumar.rs@samsung.com>
Download mbox | patch
Permalink /patch/205178/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Ajay Kumar - Dec. 11, 2012, 11:01 a.m.
This patch adds pinmux configuration for backlight, LCD reset
and HPD for DP panel on Exynos5 SMDK.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
 arch/arm/cpu/armv7/exynos/pinmux.c        |   20 ++++++++++++++++++++
 arch/arm/include/asm/arch-exynos/periph.h |    1 +
 2 files changed, 21 insertions(+), 0 deletions(-)
Kyungmin Park - Dec. 12, 2012, 2:02 p.m.
Hi,

On Tue, Dec 11, 2012 at 8:01 PM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote:
> This patch adds pinmux configuration for backlight, LCD reset
> and HPD for DP panel on Exynos5 SMDK.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/pinmux.c        |   20 ++++++++++++++++++++
>  arch/arm/include/asm/arch-exynos/periph.h |    1 +
>  2 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
> index f02f441..84f52ea 100644
> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
> @@ -284,6 +284,23 @@ void exynos5_spi_config(int peripheral)
>         }
>  }
>
> +void exynos5_lcd_config()
missing void
> +{
> +       struct exynos5_gpio_part1 *gpio1 =
> +               (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
> +
> +       /* For Backlight */
> +       s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
> +       s5p_gpio_set_value(&gpio1->b2, 0, 1);
> +
> +       /* LCD power on */
> +       s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
> +       s5p_gpio_set_value(&gpio1->x1, 5, 1);
> +
> +       /* Set Hotplug detect for DP */
> +       s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
It should be SMDK5250 specific codes, it can't located at common file.

Thank you,
Kyungmin Park
> +}
> +
>  static int exynos5_pinmux_config(int peripheral, int flags)
>  {
>         switch (peripheral) {
> @@ -321,6 +338,9 @@ static int exynos5_pinmux_config(int peripheral, int flags)
>         case PERIPH_ID_SPI4:
>                 exynos5_spi_config(peripheral);
>                 break;
> +       case PERIPH_ID_LCD:
> +               exynos5_lcd_config();
> +               break;
>         default:
>                 debug("%s: invalid peripheral %d", __func__, peripheral);
>                 return -1;
> diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
> index 13abd2d..446f5c9 100644
> --- a/arch/arm/include/asm/arch-exynos/periph.h
> +++ b/arch/arm/include/asm/arch-exynos/periph.h
> @@ -54,6 +54,7 @@ enum periph_id {
>         PERIPH_ID_UART1,
>         PERIPH_ID_UART2,
>         PERIPH_ID_UART3,
> +       PERIPH_ID_LCD,
>
>         PERIPH_ID_COUNT,
>         PERIPH_ID_NONE = -1,
> --
> 1.7.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Minkyu Kang - Dec. 13, 2012, 2:21 a.m.
On 12/12/12 23:02, Kyungmin Park wrote:
> Hi,
> 
> On Tue, Dec 11, 2012 at 8:01 PM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote:
>> This patch adds pinmux configuration for backlight, LCD reset
>> and HPD for DP panel on Exynos5 SMDK.
>>
>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
>> ---
>>  arch/arm/cpu/armv7/exynos/pinmux.c        |   20 ++++++++++++++++++++
>>  arch/arm/include/asm/arch-exynos/periph.h |    1 +
>>  2 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
>> index f02f441..84f52ea 100644
>> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
>> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
>> @@ -284,6 +284,23 @@ void exynos5_spi_config(int peripheral)
>>         }
>>  }
>>
>> +void exynos5_lcd_config()
> missing void
>> +{
>> +       struct exynos5_gpio_part1 *gpio1 =
>> +               (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
>> +
>> +       /* For Backlight */
>> +       s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
>> +       s5p_gpio_set_value(&gpio1->b2, 0, 1);
>> +
>> +       /* LCD power on */
>> +       s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
>> +       s5p_gpio_set_value(&gpio1->x1, 5, 1);
>> +
>> +       /* Set Hotplug detect for DP */
>> +       s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
> It should be SMDK5250 specific codes, it can't located at common file.
> 

You can use the cfg_gpio function at your board file.

Thanks.
Minkyu Kang.

Patch

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index f02f441..84f52ea 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -284,6 +284,23 @@  void exynos5_spi_config(int peripheral)
 	}
 }
 
+void exynos5_lcd_config()
+{
+	struct exynos5_gpio_part1 *gpio1 =
+		(struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
+
+	/* For Backlight */
+	s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
+	s5p_gpio_set_value(&gpio1->b2, 0, 1);
+
+	/* LCD power on */
+	s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
+	s5p_gpio_set_value(&gpio1->x1, 5, 1);
+
+	/* Set Hotplug detect for DP */
+	s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
+}
+
 static int exynos5_pinmux_config(int peripheral, int flags)
 {
 	switch (peripheral) {
@@ -321,6 +338,9 @@  static int exynos5_pinmux_config(int peripheral, int flags)
 	case PERIPH_ID_SPI4:
 		exynos5_spi_config(peripheral);
 		break;
+	case PERIPH_ID_LCD:
+		exynos5_lcd_config();
+		break;
 	default:
 		debug("%s: invalid peripheral %d", __func__, peripheral);
 		return -1;
diff --git a/arch/arm/include/asm/arch-exynos/periph.h b/arch/arm/include/asm/arch-exynos/periph.h
index 13abd2d..446f5c9 100644
--- a/arch/arm/include/asm/arch-exynos/periph.h
+++ b/arch/arm/include/asm/arch-exynos/periph.h
@@ -54,6 +54,7 @@  enum periph_id {
 	PERIPH_ID_UART1,
 	PERIPH_ID_UART2,
 	PERIPH_ID_UART3,
+	PERIPH_ID_LCD,
 
 	PERIPH_ID_COUNT,
 	PERIPH_ID_NONE = -1,