eukrea_cpuimx35: better usage of LCD enable pins
PATCH 1/1 eukrea_cpuimx35: better usage of LCD enable pins
Use the enable hook to driver the LCD's enable pin. Unfortunalty, because of the time the LCD takes to come out of reset, I have to use a GPIO in order to turn on/off the backlight instead of driving it from the enable function, else we get a flicker at power on.
Signed-off-by Eric Bénard <[email protected]>
--- board/eukrea_cpuimx35/env/bin/init | 2 ++ board/eukrea_cpuimx35/eukrea_cpuimx35.c | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-)
board/eukrea_cpuimx35/env/bin/init +2 -0
@@ -13,9 +13,11 @@ if [ -e /dev/nand0 ]; then fi if [ -f /env/logo.bmp ]; then + fb0.enable=1 bmp /env/logo.bmp elif [ -f /env/logo.bmp.lzo ]; then unlzo /env/logo.bmp.lzo /logo.bmp + fb0.enable=1 bmp /logo.bmp fi
board/eukrea_cpuimx35/eukrea_cpuimx35.c +13 -9
@@ -104,9 +104,15 @@ static struct fb_videomode imxfb_mode = { .flag = 0, }; +static void eukrea_cpuimx35_enable_display (int enable) +{ +gpio_direction_output (4 , enable); +} +static struct imx_ipu_fb_platform_data ipu_fb_data = { .mode = &imxfb_mode, .bpp =16 , + .enable = eukrea_cpuimx35_enable_display, };static struct device_d imxfb_dev = {
@@ -153,6 +159,7 @@ static int eukrea_cpuimx35_devices_init(void)register_device (&fec_dev);register_device (&sdram_dev); +register_device (&imxfb_dev);armlinux_add_dram (&sdram_dev);
@@ -164,15 +171,6 @@ static int eukrea_cpuimx35_devices_init(void)device_initcall (eukrea_cpuimx35_devices_init); -static int eukrea_cpuimx35_enable_display (void ) -{ -gpio_direction_output (1 ,1 ); -gpio_direction_output (0 ,0 ); -return 0 ; -} - -late_initcall (eukrea_cpuimx35_enable_display); -static struct device_d eukrea_cpuimx35_serial_device = { .name ="imx_serial" , .map_base =IMX_UART1_BASE ,
@@ -207,6 +205,8 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {MX35_PAD_CTS1__UART1_CTS ,MX35_PAD_LD23__GPIO3_29 , +MX35_PAD_CONTRAST__GPIO1_1 , + MX35_PAD_D3_CLS__GPIO1_4, };static int eukrea_cpuimx35_console_init (void )
@@ -214,6 +214,10 @@ static int eukrea_cpuimx35_console_init(void)mxc_iomux_v3_setup_multiple_pads (eukrea_cpuimx35_pads,ARRAY_SIZE (eukrea_cpuimx35_pads)); +/* screen default on to prevent flicker */ +gpio_direction_output (4 ,1 ); +/* backlight default off */ +gpio_direction_output (1 ,0 );/* led default off */ gpio_direction_output (32 *2 +29 ,1 );
Signature · 7 lines
1.6.3.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox