Skip to contentSkip to conversation

mx53loco: Add support for SEIKO 4.3'' WVGA panel

PATCH Superseded Fabio Estevam 6 participants 8 messages Oct 18, 2012 – Nov 4, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

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.

---
 board/freescale/mx53loco/mx53loco.c |   26 +++++++++++++++++++++++++-
 include/configs/mx53loco.h          |    1 +
 2 files changed, 26 insertions(+), 1 deletion(-)
board/freescale/mx53loco/mx53loco.c +25 -1
index a11e883..5709c97 100644
@@ -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);
 }
include/configs/mx53loco.h +1 -0
index 0658dd3..e60b155 100644
@@ -222,5 +222,6 @@
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IPUV3_CLK	200000000
+#define CONFIG_CLAA_WVGA
 
 #endif				/* __CONFIG_H */
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Quoted 9 lines · 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.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#2 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

In reply to Fabio Estevam

Am 18/10/2012 20:49, schrieb Fabio Estevam:

Quoted 6 lines

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

Quoted 70 lines
---
 board/freescale/mx53loco/mx53loco.c |   26 +++++++++++++++++++++++++-
 include/configs/mx53loco.h          |    1 +
 2 files changed, 26 insertions(+), 1 deletion(-)
board/freescale/mx53loco/mx53loco.c +25 -1
index a11e883..5709c97 100644
@@ -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);
 }
include/configs/mx53loco.h +1 -0
index 0658dd3..e60b155 100644
@@ -222,5 +222,6 @@
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IPUV3_CLK	200000000
+#define CONFIG_CLAA_WVGA
 
 #endif				/* __CONFIG_H */
Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Hi Stefano,

Quoted 4 lines · Stefano Babic

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 ?

Sounds good. I tried this approach.

However, when I try to manipulate the env var I am not able to boot:

U-Boot 2012.10-09480-g6b08fc3-dirty (Oct 23 2012 - 15:24:03)

Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB

...

These are my simple changes (just to show the issue I am facing):

board/freescale/mx53loco/mx53loco.c +12 -0
@@ -471,6 +471,18 @@ void lcd_iomux(void)
 void lcd_enable(void)
 {
        int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
+       char *e;
+
+       e = getenv("panel");
+
+       if (e != NULL) {
+               if (strcmp(e, "claa") == 0)
+                       printf("Panel is claa\n");
+
+               if (strcmp(e, "seiko") == 0)
+                       printf("Panel is seiko\n");
+       }
+
        if (ret)
                printf("LCD cannot be configured: %d\n", ret);
 }

Any ideas?

Thanks,

Fabio Estevam

#4 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Am 23/10/2012 19:36, schrieb Fabio Estevam:

Quoted 45 lines

Hi Stefano,

Quoted 4 lines · Stefano Babic

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 ?

Sounds good. I tried this approach.

However, when I try to manipulate the env var I am not able to boot:

U-Boot 2012.10-09480-g6b08fc3-dirty (Oct 23 2012 - 15:24:03)

Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB

...

These are my simple changes (just to show the issue I am facing):

board/freescale/mx53loco/mx53loco.c +12 -0
@@ -471,6 +471,18 @@ void lcd_iomux(void)
 void lcd_enable(void)
 {
        int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
+       char *e;
+
+       e = getenv("panel");
+
+       if (e != NULL) {
+               if (strcmp(e, "claa") == 0)
+                       printf("Panel is claa\n");
+
+               if (strcmp(e, "seiko") == 0)
+                       printf("Panel is seiko\n");
+       }
+
        if (ret)
                printf("LCD cannot be configured: %d\n", ret);
 }
Quoted 1 line

Any ideas?

Yes, I thins is due to the fact that size for the framebuffer is allocated before relocation. This was also a reason for me to migrate to CONFIG_VIDEO instead of CONFIG_LCD.

#5 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Hi Stefano,

Quoted 3 lines · Stefano Babic

Yes, I thins is due to the fact that size for the framebuffer is allocated before relocation. This was also a reason for me to migrate to CONFIG_VIDEO instead of CONFIG_LCD.

mx53loco.h defines CONFIG_VIDEO, not CONFIG_LCD.

I am suspecting alignment/gcc issues: with a gcc4.4 I can boot into a prompt, but after typing any command and then "enter" the board crashes and reboot.

With gcc4.7, then board hangs after the total RAM is displayed.

Regards,

Fabio Estevam

#6 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Dear Fabio Estevam,

CCing Albert.

Quoted 13 lines

Hi Stefano,

Quoted 3 lines · Stefano Babic

Yes, I thins is due to the fact that size for the framebuffer is allocated before relocation. This was also a reason for me to migrate to CONFIG_VIDEO instead of CONFIG_LCD.

mx53loco.h defines CONFIG_VIDEO, not CONFIG_LCD.

I am suspecting alignment/gcc issues: with a gcc4.4 I can boot into a prompt, but after typing any command and then "enter" the board crashes and reboot.

Quoted 5 lines

With gcc4.7, then board hangs after the total RAM is displayed.

Regards,

Fabio Estevam

Best regards,
Marek Vasut

#7 lore raw

PATCH 1/1 mx53loco: Add support for SEIKO 4.3'' WVGA panel

Hi Marek,

Quoted 22 lines · Marek Vasut

Dear Fabio Estevam,

CCing Albert.

Quoted 18 lines

Hi Stefano,

Quoted 3 lines · Stefano Babic

Yes, I thins is due to the fact that size for the framebuffer is allocated before relocation. This was also a reason for me to migrate to CONFIG_VIDEO instead of CONFIG_LCD.

mx53loco.h defines CONFIG_VIDEO, not CONFIG_LCD.

I am suspecting alignment/gcc issues: with a gcc4.4 I can boot into a prompt, but after typing any command and then "enter" the board crashes and reboot.

With gcc4.7, then board hangs after the total RAM is displayed.

Regards,

Fabio Estevam

The board should normally not hang but throw a data abort. In any case, try to run the board under a HW debugger to find out which exception occurs.

Quoted 2 lines

Best regards,
Marek Vasut

Amicalement,

Signature · 1 line
Albert.