summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-03-13 22:09:03 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 17:23:07 +0800
commit3b0609ca267baaf6a78bebaccc6896e6508d1844 (patch)
tree46866b5ad53ad783a6370527197ac4cef02e77c2 /board/freescale
parent8ee2d22131930065763c1288e6c1039ce8549c9b (diff)
downloadu-boot-imx-3b0609ca267baaf6a78bebaccc6896e6508d1844.zip
u-boot-imx-3b0609ca267baaf6a78bebaccc6896e6508d1844.tar.gz
u-boot-imx-3b0609ca267baaf6a78bebaccc6896e6508d1844.tar.bz2
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 <ye.li@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx7dsabresd/mx7dsabresd.c37
1 files 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 <lcd.h>
#include <mxc_epdc_fb.h>
#endif
+#include <asm/imx-common/video.h>
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