MLK-12437-5 mx6ulevk: Update display to support panel selection
authorYe Li <ye.li@nxp.com>
Tue, 23 Feb 2016 07:29:29 +0000 (15:29 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 06:04:30 +0000 (14:04 +0800)
Change to panel environment for display at default. Align this feature to
v2015.04 uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ea93a34a3348f80462ea5b61a4ca2e9a1d267f4c)

board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
include/configs/mx6ul_14x14_evk.h

index 14e4430..4233025 100644 (file)
 #include <miiphy.h>
 #include <linux/sizes.h>
 #include <mmc.h>
+#include <mxsfb.h>
 #include <netdev.h>
 #include <power/pmic.h>
 #include <power/pfuze3000_pmic.h>
 #include "../common/pfuze.h"
 #include <usb.h>
 #include <usb/ehci-ci.h>
+#include <asm/imx-common/video.h>
 
 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;
 }
 
index 128181d..c9f11ae 100644 (file)
@@ -69,7 +69,7 @@
        "fdt_addr=0x83000000\0" \
        "boot_fdt=try\0" \
        "ip_dyn=yes\0" \
-       "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
+       "panel=TFT43AB\0" \
        "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
        "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
        "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
-#define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
+#define CONFIG_IMX_VIDEO_SKIP
 #endif
 #endif