1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright (C) 2018 Armadeus Systems 4 */ 5 6 #include <common.h> 7 #include <init.h> 8 #include <asm/arch/sys_proto.h> 9 #include <asm/gpio.h> 10 #include <asm/io.h> 11 12 #ifdef CONFIG_VIDEO_MXS setup_lcd(void)13int setup_lcd(void) 14 { 15 struct gpio_desc backlight; 16 int ret; 17 18 /* Set Brightness to high */ 19 ret = dm_gpio_lookup_name("GPIO4_10", &backlight); 20 if (ret) { 21 printf("Cannot get GPIO4_10\n"); 22 return ret; 23 } 24 25 ret = dm_gpio_request(&backlight, "backlight"); 26 if (ret) { 27 printf("Cannot request GPIO4_10\n"); 28 return ret; 29 } 30 31 dm_gpio_set_dir_flags(&backlight, GPIOD_IS_OUT); 32 dm_gpio_set_value(&backlight, 1); 33 34 return 0; 35 } 36 #endif 37 opos6ul_board_late_init(void)38int opos6ul_board_late_init(void) 39 { 40 #ifdef CONFIG_VIDEO_MXS 41 setup_lcd(); 42 #endif 43 44 return 0; 45 } 46