Commit 11d80af4876b609832856853b63d06a1011bccf1
Committed by
Stefano Babic
1 parent
acbb4457ab
Exists in
master
and in
54 other branches
mx51evk: Add DVI output support
Add DVI output support and make it the default video output. Currently the CLAA WVGA panel is supported, but this panel has to be purchased separately, so using the DVI output as the default would allow more people to try the splash screen feature on a mx51evk. If someone still wants to use the CLAA WVGA, just set the panel variable as: set panel claa Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Showing 2 changed files with 36 additions and 5 deletions Side-by-side Diff
board/freescale/mx51evk/mx51evk.c
board/freescale/mx51evk/mx51evk_video.c
... | ... | @@ -48,6 +48,22 @@ |
48 | 48 | .vmode = FB_VMODE_NONINTERLACED |
49 | 49 | }; |
50 | 50 | |
51 | +static struct fb_videomode const dvi = { | |
52 | + .name = "DVI panel", | |
53 | + .refresh = 60, | |
54 | + .xres = 1024, | |
55 | + .yres = 768, | |
56 | + .pixclock = 15385, | |
57 | + .left_margin = 220, | |
58 | + .right_margin = 40, | |
59 | + .upper_margin = 21, | |
60 | + .lower_margin = 7, | |
61 | + .hsync_len = 60, | |
62 | + .vsync_len = 10, | |
63 | + .sync = 0, | |
64 | + .vmode = FB_VMODE_NONINTERLACED | |
65 | +}; | |
66 | + | |
51 | 67 | void setup_iomux_lcd(void) |
52 | 68 | { |
53 | 69 | /* DI2_PIN15 */ |
54 | 70 | |
55 | 71 | |
... | ... | @@ -73,10 +89,27 @@ |
73 | 89 | gpio_direction_output(MX51EVK_LCD_BACKLIGHT, 1); |
74 | 90 | } |
75 | 91 | |
76 | -void lcd_enable(void) | |
92 | +int board_video_skip(void) | |
77 | 93 | { |
78 | - int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565); | |
94 | + int ret; | |
95 | + char const *e = getenv("panel"); | |
96 | + | |
97 | + if (e) { | |
98 | + if (strcmp(e, "claa") == 0) { | |
99 | + ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565); | |
100 | + if (ret) | |
101 | + printf("claa cannot be configured: %d\n", ret); | |
102 | + return ret; | |
103 | + } | |
104 | + } | |
105 | + | |
106 | + /* | |
107 | + * 'panel' env variable not found or has different value than 'claa' | |
108 | + * Defaulting to dvi output. | |
109 | + */ | |
110 | + ret = ipuv3_fb_init(&dvi, 0, IPU_PIX_FMT_RGB24); | |
79 | 111 | if (ret) |
80 | - printf("LCD cannot be configured: %d\n", ret); | |
112 | + printf("dvi cannot be configured: %d\n", ret); | |
113 | + return ret; | |
81 | 114 | } |