summaryrefslogtreecommitdiff
path: root/board/freescale/mx7dsabresd/mx7dsabresd.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/mx7dsabresd/mx7dsabresd.c')
-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