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

Ajay Kumar ajaykumar.rs at samsung.com
Tue Dec 11 12:01:23 CET 2012


This patch adds pinmux configuration for backlight, LCD reset
and HPD for DP panel on Exynos5 SMDK.

Signed-off-by: Ajay Kumar <ajaykumar.rs at 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()
+{
+	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,
-- 
1.7.1



More information about the U-Boot mailing list