From 3b0609ca267baaf6a78bebaccc6896e6508d1844 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 13 Mar 2017 22:09:03 +0800 Subject: MLK-14418-12 imx: mx7dsabresd: Update LCD splash screen codes Update LCD setup codes to use the parameters structure used for all i.mx platforms, discard to use videmode environment variable. Signed-off-by: Ye Li --- board/freescale/mx7dsabresd/mx7dsabresd.c | 37 ++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 0a5fb7e..f5cb58f 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -26,6 +26,7 @@ #include #include #endif +#include DECLARE_GLOBAL_DATA_PTR; @@ -185,27 +186,47 @@ static iomux_v3_cfg_t const pwm_pads[] = { MX7D_PAD_GPIO1_IO01__GPIO1_IO1 | MUX_PAD_CTRL(NO_PAD_CTRL), }; -static int setup_lcd(void) +void do_enable_parallel_lcd(struct display_info_t const *dev) { imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); imx_iomux_v3_setup_multiple_pads(pwm_pads, ARRAY_SIZE(pwm_pads)); - - gpio_request(IMX_GPIO_NR(3, 4), "lcd-reset"); /* Reset LCD */ + gpio_request(IMX_GPIO_NR(3, 4), "lcd reset"); gpio_direction_output(IMX_GPIO_NR(3, 4) , 0); udelay(500); gpio_direction_output(IMX_GPIO_NR(3, 4) , 1); - gpio_request(IMX_GPIO_NR(1, 1), "lcd-pwm"); /* Set Brightness to high */ + gpio_request(IMX_GPIO_NR(1, 1), "lcd backlight"); gpio_direction_output(IMX_GPIO_NR(1, 1) , 1); - - return 0; } + +struct display_info_t const displays[] = {{ + .bus = ELCDIF1_IPS_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 + static void setup_iomux_uart(void) { imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads)); @@ -551,10 +572,6 @@ int board_init(void) setup_gpmi_nand(); #endif -#ifdef CONFIG_VIDEO_MXS - setup_lcd(); -#endif - #ifdef CONFIG_FSL_QSPI board_qspi_init(); #endif -- cgit v1.1