[U-Boot] [PATCH 4/5] exynos5420: Add LCD and LED powerup settings for peach-pi

Ajay Kumar ajaykumar.rs at samsung.com
Fri Dec 5 15:13:43 CET 2014


Add code to support powerup sequence for peach-pi LCD.

Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>
---
 board/samsung/smdk5420/smdk5420.c |   32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c
index a691222..915125e 100644
--- a/board/samsung/smdk5420/smdk5420.c
+++ b/board/samsung/smdk5420/smdk5420.c
@@ -73,19 +73,24 @@ void exynos_lcd_power_on(void)
 
 	mdelay(5);
 
-	/* TODO(ajaykumar.rs at samsung.com): Use device tree */
-	gpio_request(EXYNOS5420_GPIO_X35, "edp_slp#");
-	gpio_direction_output(EXYNOS5420_GPIO_X35, 1);	/* EDP_SLP# */
-	mdelay(10);
-	gpio_request(EXYNOS5420_GPIO_Y77, "edp_rst#");
-	gpio_direction_output(EXYNOS5420_GPIO_Y77, 1);	/* EDP_RST# */
-	gpio_request(EXYNOS5420_GPIO_X26, "edp_hpd");
-	gpio_direction_input(EXYNOS5420_GPIO_X26);	/* EDP_HPD */
-	gpio_set_pull(EXYNOS5420_GPIO_X26, S5P_GPIO_PULL_NONE);
-
-	if (has_edp_bridge())
+	if (has_edp_bridge()) {
+		/* TODO(ajaykumar.rs at samsung.com): Use device tree */
+		gpio_request(EXYNOS5420_GPIO_X35, "edp_slp#");
+		gpio_direction_output(EXYNOS5420_GPIO_X35, 1);	/* EDP_SLP# */
+		mdelay(10);
+		gpio_request(EXYNOS5420_GPIO_Y77, "edp_rst#");
+		gpio_direction_output(EXYNOS5420_GPIO_Y77, 1);	/* EDP_RST# */
+		gpio_request(EXYNOS5420_GPIO_X26, "edp_hpd");
+		gpio_direction_input(EXYNOS5420_GPIO_X26);	/* EDP_HPD */
+		gpio_set_pull(EXYNOS5420_GPIO_X26, S5P_GPIO_PULL_NONE);
+
 		if (parade_init(gd->fdt_blob))
 			printf("%s: ps8625_init() failed\n", __func__);
+	} else {
+		gpio_request(EXYNOS5420_GPIO_X26, "edp_hpd");
+		gpio_direction_input(EXYNOS5420_GPIO_X26);	/* EDP_HPD */
+		gpio_set_pull(EXYNOS5420_GPIO_X26, S5P_GPIO_PULL_NONE);
+	}
 }
 
 void exynos_backlight_on(unsigned int onoff)
@@ -98,6 +103,11 @@ void exynos_backlight_on(unsigned int onoff)
 #ifdef CONFIG_POWER_TPS65090
 	tps65090_fet_enable(1);
 #endif
+
+	if (!has_edp_bridge()) {
+		gpio_request(EXYNOS5420_GPIO_X22, "bl_en");
+		gpio_direction_output(EXYNOS5420_GPIO_X22, 1);
+	}
 }
 #endif
 
-- 
1.7.9.5



More information about the U-Boot mailing list