All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] drivers/video/am335x-fb: Add possibility to wait for stable power/picture
@ 2015-02-03 12:19 Hannes Petermaier
  2015-02-03 12:19 ` [U-Boot] [PATCH v2] common/lcd: Add command for setting cursor within lcd-console Hannes Petermaier
                   ` (23 more replies)
  0 siblings, 24 replies; 52+ messages in thread
From: Hannes Petermaier @ 2015-02-03 12:19 UTC (permalink / raw)
  To: u-boot

Often on boards exists a circuit which switches power on/off to LCD display.
Due to the need of limiting the in-rush current the output voltage from this
circuit rises "slowly", so it is necessary to wait a bit (VCC ramp up time)
before starting output on LCD-pins.
This time is specified in <n> ms within the panel-settings, called "pup_delay"

Further some LCDs need a couple of frames to stabilize the image on it.
We have now the possibility to wait some time after starting output on LCD.
This time is also specified in <n> ms within panel-settings, called "pon_delay"

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>

---
Changes for V2: None
---
 drivers/video/am335x-fb.c |   13 ++++++++-----
 drivers/video/am335x-fb.h |    9 +++++++--
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index ab98941..6f95649 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -127,6 +127,12 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
 	memset((void *)gd->fb_base, 0, 0x20);
 	*(unsigned int *)gd->fb_base = 0x4000;
 
+	/* turn ON display through powercontrol function if accessible */
+	if (0 != panel->panel_power_ctrl)
+		panel->panel_power_ctrl(1);
+
+	debug("am335x-fb: wait for stable power ...\n");
+	mdelay(panel->pup_delay);
 	lcdhw->clkc_enable = LCD_CORECLKEN | LCD_LIDDCLKEN | LCD_DMACLKEN;
 	lcdhw->raster_ctrl = 0;
 	lcdhw->ctrl = LCD_CLK_DIVISOR(panel->pxl_clk_div) | LCD_RASTER_MODE;
@@ -159,11 +165,8 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
 
 	gd->fb_base += 0x20;	/* point fb behind palette */
 
-	/* turn ON display through powercontrol function if accessible */
-	if (0 != panel->panel_power_ctrl) {
-		mdelay(panel->pon_delay);
-		panel->panel_power_ctrl(1);
-	}
+	debug("am335x-fb: waiting picture to be stable.\n.");
+	mdelay(panel->pon_delay);
 
 	return 0;
 }
diff --git a/drivers/video/am335x-fb.h b/drivers/video/am335x-fb.h
index 8a0b131..7f799d1 100644
--- a/drivers/video/am335x-fb.h
+++ b/drivers/video/am335x-fb.h
@@ -55,9 +55,14 @@ struct am335x_lcdpanel {
 	unsigned int	vsw;		/* Vertical Sync Pulse Width */
 	unsigned int	pxl_clk_div;	/* Pixel clock divider*/
 	unsigned int	pol;		/* polarity of sync, clock signals */
+	unsigned int	pup_delay;	/*
+					 * time in ms after power on to
+					 * initialization of lcd-controller
+					 * (VCC ramp up time)
+					 */
 	unsigned int	pon_delay;	/*
-					 * time in ms for turning on lcd after
-					 * initializing lcd-controller
+					 * time in ms after initialization of
+					 * lcd-controller (pic stabilization)
 					 */
 	void (*panel_power_ctrl)(int);	/* fp for power on/off display */
 };
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2015-02-04  7:50 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 12:19 [U-Boot] [PATCH v2] drivers/video/am335x-fb: Add possibility to wait for stable power/picture Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] common/lcd: Add command for setting cursor within lcd-console Hannes Petermaier
2015-02-03 12:34   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] common/lcd: Add command for writing to lcd-display Hannes Petermaier
2015-02-03 12:34   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Take usage of am335x LCD-Display Hannes Petermaier
2015-02-03 12:34   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: try to setup cpsw mac-address from the devicetree Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable HW-Watchdog Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable U-Boot BOOTCOUNT feature Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Enable EXT4 support Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Chg Pinmux - enable UART1 pins Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Introduce Network Console and common environment for it Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Enable CONFIG_CMD_TIME Hannes Petermaier
2015-02-03 12:35   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/common: Add support for displaying BMP on LCD Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: Rework default-environment settings Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/tseries: cosmetic changes Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: switch to board HW-Rev3 Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Support booting Linux Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Redesign default-environment Hannes Petermaier
2015-02-03 12:36   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Form a bootline for vxWorks Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] board/BuR/kwb: Support modify bootcmd through reset-controller Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: disable lcd-stdout Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: Add specific offset do FAT-Filesystem Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:19 ` [U-Boot] [PATCH v2] intern: Add copy scripts and target specific helpers Hannes Petermaier
2015-02-03 12:37   ` Hannes Petermaier
2015-02-03 12:47     ` Heiko Schocher
2015-02-04  7:10       ` Hannes Petermaier
2015-02-04  7:33         ` Heiko Schocher
2015-02-04  7:50           ` Hannes Petermaier
2015-02-03 12:34 ` [U-Boot] [PATCH v2] drivers/video/am335x-fb: Add possibility to wait for stable power/picture Hannes Petermaier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.