2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2017-03-07 13:33:25 +00:00
|
|
|
/*
|
2018-04-17 15:29:31 +00:00
|
|
|
* Copyright (C) 2018 Armadeus Systems
|
2017-03-07 13:33:25 +00:00
|
|
|
*/
|
|
|
|
|
2019-11-14 19:57:46 +00:00
|
|
|
#include <common.h>
|
|
|
|
#include <init.h>
|
2017-03-07 13:33:25 +00:00
|
|
|
#include <asm/arch/sys_proto.h>
|
|
|
|
#include <asm/gpio.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_VIDEO_MXS
|
|
|
|
int setup_lcd(void)
|
|
|
|
{
|
|
|
|
struct gpio_desc backlight;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* Set Brightness to high */
|
|
|
|
ret = dm_gpio_lookup_name("GPIO4_10", &backlight);
|
|
|
|
if (ret) {
|
|
|
|
printf("Cannot get GPIO4_10\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = dm_gpio_request(&backlight, "backlight");
|
|
|
|
if (ret) {
|
|
|
|
printf("Cannot request GPIO4_10\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
dm_gpio_set_dir_flags(&backlight, GPIOD_IS_OUT);
|
|
|
|
dm_gpio_set_value(&backlight, 1);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int opos6ul_board_late_init(void)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_VIDEO_MXS
|
|
|
|
setup_lcd();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|