| Submitter | Fabio Estevam |
|---|---|
| Date | Oct. 18, 2012, 6:49 p.m. |
| Message ID | <1350586195-21158-1-git-send-email-fabio.estevam@freescale.com> |
| Download | mbox | patch |
| Permalink | /patch/192415/ |
| State | Changes Requested |
| Delegated to: | Stefano Babic |
| Headers | show |
Comments
On Thu, Oct 18, 2012 at 3:49 PM, Fabio Estevam <fabio.estevam@freescale.com>wrote: > Add support for SEIKO 4.3'' WVGA panel on mx53loco. > > By default, the CLAA WVGA panel is selected. > > In order to support the SEIKO panel, undef CONFIG_CLAA_WVGA > and define CONFIG_SEIKO_WVGA in mx53loco.h. > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> > Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Am 18/10/2012 20:49, schrieb Fabio Estevam: > Add support for SEIKO 4.3'' WVGA panel on mx53loco. > > By default, the CLAA WVGA panel is selected. > > In order to support the SEIKO panel, undef CONFIG_CLAA_WVGA > and define CONFIG_SEIKO_WVGA in mx53loco.h. Hi Fabio, in this way you have two different U-Boot binaries only to manage the two displays, and automatically some "dead code" is added to U-Boot because CONFIG_SEIKO_WVGA is not defined. What about to use a u-boot environment to select the display ? Could be a better solution for you ? You can then have a single u-boot image managing both displays. I did in this way for the mt_ventoux board (board/mt_ventoux/mt_ventoux.c), maybe can this help ? Regards, Stefano > > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> > --- > board/freescale/mx53loco/mx53loco.c | 26 +++++++++++++++++++++++++- > include/configs/mx53loco.h | 1 + > 2 files changed, 26 insertions(+), 1 deletion(-) > > diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c > index a11e883..5709c97 100644 > --- a/board/freescale/mx53loco/mx53loco.c > +++ b/board/freescale/mx53loco/mx53loco.c > @@ -412,6 +412,7 @@ static void clock_1GHz(void) > printf("CPU: Switch DDR clock to 400MHz failed\n"); > } > > +#if defined(CONFIG_CLAA_WVGA) > static struct fb_videomode const claa_wvga = { > .name = "CLAA07LC0ACW", > .refresh = 57, > @@ -427,6 +428,24 @@ static struct fb_videomode const claa_wvga = { > .sync = 0, > .vmode = FB_VMODE_NONINTERLACED > }; > +#endif > + > +#if defined(CONFIG_SEIKO_WVGA) > +static struct fb_videomode const seiko43wvga = { > + .name = "Seiko-43WVF1G", > + .refresh = 60, > + .xres = 800, > + .yres = 480, > + .pixclock = 29851, /* picosecond (33.5 MHz) */ > + .left_margin = 89, > + .right_margin = 164, > + .upper_margin = 23, > + .lower_margin = 10, > + .hsync_len = 10, > + .vsync_len = 10, > + .sync = 0, > +}; > +#endif > > void lcd_iomux(void) > { > @@ -470,7 +489,12 @@ void lcd_iomux(void) > > void lcd_enable(void) > { > - int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); > + int ret; > +#if defined(CONFIG_CLAA_WVGA) > + ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); > +#elif defined(CONFIG_SEIKO_WVGA) > + ret = ipuv3_fb_init(&seiko43wvga, 0, IPU_PIX_FMT_RGB24); > +#endif > if (ret) > printf("LCD cannot be configured: %d\n", ret); > } > diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h > index 0658dd3..e60b155 100644 > --- a/include/configs/mx53loco.h > +++ b/include/configs/mx53loco.h > @@ -222,5 +222,6 @@ > #define CONFIG_BMP_16BPP > #define CONFIG_VIDEO_LOGO > #define CONFIG_IPUV3_CLK 200000000 > +#define CONFIG_CLAA_WVGA > > #endif /* __CONFIG_H */ >
Patch
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index a11e883..5709c97 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -412,6 +412,7 @@ static void clock_1GHz(void) printf("CPU: Switch DDR clock to 400MHz failed\n"); } +#if defined(CONFIG_CLAA_WVGA) static struct fb_videomode const claa_wvga = { .name = "CLAA07LC0ACW", .refresh = 57, @@ -427,6 +428,24 @@ static struct fb_videomode const claa_wvga = { .sync = 0, .vmode = FB_VMODE_NONINTERLACED }; +#endif + +#if defined(CONFIG_SEIKO_WVGA) +static struct fb_videomode const seiko43wvga = { + .name = "Seiko-43WVF1G", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 29851, /* picosecond (33.5 MHz) */ + .left_margin = 89, + .right_margin = 164, + .upper_margin = 23, + .lower_margin = 10, + .hsync_len = 10, + .vsync_len = 10, + .sync = 0, +}; +#endif void lcd_iomux(void) { @@ -470,7 +489,12 @@ void lcd_iomux(void) void lcd_enable(void) { - int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); + int ret; +#if defined(CONFIG_CLAA_WVGA) + ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565); +#elif defined(CONFIG_SEIKO_WVGA) + ret = ipuv3_fb_init(&seiko43wvga, 0, IPU_PIX_FMT_RGB24); +#endif if (ret) printf("LCD cannot be configured: %d\n", ret); } diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 0658dd3..e60b155 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -222,5 +222,6 @@ #define CONFIG_BMP_16BPP #define CONFIG_VIDEO_LOGO #define CONFIG_IPUV3_CLK 200000000 +#define CONFIG_CLAA_WVGA #endif /* __CONFIG_H */
Add support for SEIKO 4.3'' WVGA panel on mx53loco. By default, the CLAA WVGA panel is selected. In order to support the SEIKO panel, undef CONFIG_CLAA_WVGA and define CONFIG_SEIKO_WVGA in mx53loco.h. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- board/freescale/mx53loco/mx53loco.c | 26 +++++++++++++++++++++++++- include/configs/mx53loco.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-)