Commit a74fe119 authored by Sven Neumann's avatar Sven Neumann Committed by Eric Miao

ARM: pxa/raumfeld: display initialisation fixes

The display requires some milliseconds between GPIO_TFT_VA_EN
and GPIO_DISPLAY_ENABLE. Reorder initialisation to comply with
the display spec.

Also tune timings for better compliance with the spec.
Signed-off-by: default avatarSven Neumann <s.neumann@raumfeld.com>
Acked-by: default avatarDaniel Mack <zonque@gmail.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 8c568df9
...@@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = { ...@@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = {
.xres = 480, .xres = 480,
.yres = 272, .yres = 272,
.bpp = 16, .bpp = 16,
.hsync_len = 4, .hsync_len = 41,
.left_margin = 2, .left_margin = 2,
.right_margin = 1, .right_margin = 1,
.vsync_len = 1, .vsync_len = 10,
.upper_margin = 3, .upper_margin = 3,
.lower_margin = 1, .lower_margin = 1,
.sync = 0, .sync = 0,
...@@ -596,30 +596,31 @@ static void __init raumfeld_lcd_init(void) ...@@ -596,30 +596,31 @@ static void __init raumfeld_lcd_init(void)
{ {
int ret; int ret;
pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);
/* Hardware revision 2 has the backlight regulator controlled
* by an LT3593, earlier and later devices use PWM for that. */
if ((system_rev & 0xff) == 2) {
platform_device_register(&raumfeld_lt3593_device);
} else {
mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
platform_device_register(&raumfeld_pwm_backlight_device);
}
ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable");
if (ret < 0) if (ret < 0)
pr_warning("Unable to request GPIO_TFT_VA_EN\n"); pr_warning("Unable to request GPIO_TFT_VA_EN\n");
else else
gpio_direction_output(GPIO_TFT_VA_EN, 1); gpio_direction_output(GPIO_TFT_VA_EN, 1);
msleep(100);
ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable");
if (ret < 0) if (ret < 0)
pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n"); pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n");
else else
gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); gpio_direction_output(GPIO_DISPLAY_ENABLE, 1);
/* Hardware revision 2 has the backlight regulator controlled
* by an LT3593, earlier and later devices use PWM for that. */
if ((system_rev & 0xff) == 2) {
platform_device_register(&raumfeld_lt3593_device);
} else {
mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
platform_device_register(&raumfeld_pwm_backlight_device);
}
pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);
platform_device_register(&pxa3xx_device_gcu); platform_device_register(&pxa3xx_device_gcu);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment