From 37f58a1bcefe48261a736df0211f007835074db7 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 23 Feb 2016 15:29:29 +0800 Subject: MLK-12437-5 mx6ulevk: Update display to support panel selection Change to panel environment for display at default. Align this feature to v2015.04 uboot. Signed-off-by: Ye Li (cherry picked from commit ea93a34a3348f80462ea5b61a4ca2e9a1d267f4c) --- board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 34 +++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'board/freescale/mx6ul_14x14_evk') diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 14e4430..4233025 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -22,12 +22,14 @@ #include #include #include +#include #include #include #include #include "../common/pfuze.h" #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -598,9 +600,9 @@ static iomux_v3_cfg_t const lcd_pads[] = { MX6_PAD_GPIO1_IO08__GPIO1_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL), }; -static int setup_lcd(void) +void do_enable_parallel_lcd(struct display_info_t const *dev) { - enable_lcdif_clock(LCDIF1_BASE_ADDR, 1); + enable_lcdif_clock(dev->bus, 1); imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); @@ -611,9 +613,29 @@ static int setup_lcd(void) /* Set Brightness to high */ gpio_direction_output(IMX_GPIO_NR(1, 8) , 1); - - return 0; } + +struct display_info_t const displays[] = {{ + .bus = MX6UL_LCDIF1_BASE_ADDR, + .addr = 0, + .pixfmt = 24, + .detect = NULL, + .enable = do_enable_parallel_lcd, + .mode = { + .name = "TFT43AB", + .xres = 480, + .yres = 272, + .pixclock = 108695, + .left_margin = 8, + .right_margin = 4, + .upper_margin = 2, + .lower_margin = 4, + .hsync_len = 41, + .vsync_len = 10, + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED +} } }; +size_t display_count = ARRAY_SIZE(displays); #endif int board_early_init_f(void) @@ -648,10 +670,6 @@ int board_init(void) board_qspi_init(); #endif -#ifdef CONFIG_VIDEO_MXS - setup_lcd(); -#endif - return 0; } -- cgit v1.1