davinci: ea20: reorganisation LCD startup
Signed-off-by: Bastian Ruppert <Bastian.Ruppert@Sewerin.de> CC: Tom Rini <trini@ti.com> Acked-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
b72db2080b
commit
bdb04abe42
|
@ -176,6 +176,9 @@ int board_early_init_f(void)
|
||||||
if (davinci_configure_pin_mux(gpio_pins, ARRAY_SIZE(gpio_pins)) != 0)
|
if (davinci_configure_pin_mux(gpio_pins, ARRAY_SIZE(gpio_pins)) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
/* Set DISP_ON high to enable LCD output*/
|
||||||
|
gpio_direction_output(97, 1);
|
||||||
|
|
||||||
/* Set the RESETOUTn low */
|
/* Set the RESETOUTn low */
|
||||||
gpio_direction_output(111, 0);
|
gpio_direction_output(111, 0);
|
||||||
|
|
||||||
|
@ -188,9 +191,6 @@ int board_early_init_f(void)
|
||||||
/* Set LCD_B_PWR low to power down LCD Backlight*/
|
/* Set LCD_B_PWR low to power down LCD Backlight*/
|
||||||
gpio_direction_output(102, 0);
|
gpio_direction_output(102, 0);
|
||||||
|
|
||||||
/* Set DISP_ON low to disable LCD output*/
|
|
||||||
gpio_direction_output(97, 0);
|
|
||||||
|
|
||||||
#ifndef CONFIG_USE_IRQ
|
#ifndef CONFIG_USE_IRQ
|
||||||
irq_init();
|
irq_init();
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,11 +250,6 @@ int board_early_init_f(void)
|
||||||
writel(readl(&davinci_syscfg_regs->mstpri[2]) & 0x0fffffff,
|
writel(readl(&davinci_syscfg_regs->mstpri[2]) & 0x0fffffff,
|
||||||
&davinci_syscfg_regs->mstpri[2]);
|
&davinci_syscfg_regs->mstpri[2]);
|
||||||
|
|
||||||
/* Set LCD_B_PWR low to power up LCD Backlight*/
|
|
||||||
gpio_set_value(102, 1);
|
|
||||||
|
|
||||||
/* Set DISP_ON low to disable LCD output*/
|
|
||||||
gpio_set_value(97, 1);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -276,6 +271,9 @@ int board_init(void)
|
||||||
|
|
||||||
int board_late_init(void)
|
int board_late_init(void)
|
||||||
{
|
{
|
||||||
|
unsigned char buf[2];
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* PinMux for HALTEN */
|
/* PinMux for HALTEN */
|
||||||
if (davinci_configure_pin_mux(halten_pin, ARRAY_SIZE(halten_pin)) != 0)
|
if (davinci_configure_pin_mux(halten_pin, ARRAY_SIZE(halten_pin)) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -285,6 +283,15 @@ int board_late_init(void)
|
||||||
|
|
||||||
setenv("stdout", "serial");
|
setenv("stdout", "serial");
|
||||||
|
|
||||||
|
/* Set fixed contrast settings for LCD via I2C potentiometer */
|
||||||
|
buf[0] = 0x00;
|
||||||
|
buf[1] = 0xd7;
|
||||||
|
ret = i2c_write(0x2e, 6, 1, buf, 2);
|
||||||
|
if (ret)
|
||||||
|
puts("\nContrast Settings FAILED\n");
|
||||||
|
|
||||||
|
/* Set LCD_B_PWR high to power up LCD Backlight*/
|
||||||
|
gpio_set_value(102, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BOARD_LATE_INIT */
|
#endif /* CONFIG_BOARD_LATE_INIT */
|
||||||
|
|
Loading…
Reference in New Issue