* [U-Boot] IMX51 EVK Splash Screen
@ 2011-01-20 2:06 Thomas Besemer
2011-01-20 8:07 ` Stefano Babic
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Besemer @ 2011-01-20 2:06 UTC (permalink / raw)
To: u-boot
Hi folks -
I had posted last week. I was able to get basic Splash Screen going on EVK,
through using patches I found from googling around. At the end of this email,
the patch set that shows the differences from the U-Boot I pulled on
12/24/2010. I am not sure I have the right patch set, but in this case,
what I have does seem to work; U-Boot does output to LCD display on the
second Display Interface.
Through some of the archives, this one specifically:
http://www.mail-archive.com/u-boot at lists.denx.de/msg41664.html
There seems to have been a discussion on lcd_setmem(). Has this been
resolved, and I missed it? You'll see from patch set that I just put a
very large buffer in place (hard coded hack). U-Boot hung on boot before
I put this in, and based on what I see on mailing list, this seems to be
an issue of not having the display information available early on in boot.
At any rate, I got it to boot, and see that the LCD shows display on
startup. Yet, I lose the console on this; the serial port is read, but
the output goes to LCD.
I have still not displayed a bit map image, but with IPU working, not
horribly concerned.
In an ideal world, what I would like is to not loose the console. I want
stdin/stdout to remain on serial port, while I toss a bit map out on LCD.
Any comments on how to do this? End game is that I toss a splash screen
up on LCD on EVK, while having U-Boot information still on the console.
So, a couple of things:
1. Do I have correct patch work for this version of U-Boot, or is there a
newer version of U-Boot to pull? I pulled both mainline and IMX tree
yesterday, don't see the MX51 EVK in them.
2. How to configure so that I get console while LCD is available for display.
3. What is current status on lcd_setmem() thing.
If this patch set that I have is workable, then I am going to move forward
to put in support for DVI interface on EVK, and figure out how to use
U-Boot Environment Variables to specify which DIU to use.
I might have missed a few things along the way folks; I am not the sharpest
tool in the shed. Please let me know if I missed patch sets on lcd_setmem(),
and help me understand how to make sure console works with Splash Screen.
Thanks,
tom
Index: include/configs/mx51evk.h
===================================================================
--- include/configs/mx51evk.h (revision 173)
+++ include/configs/mx51evk.h (working copy)
@@ -190,6 +190,15 @@
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
+/*
+ * Framebuffer and LCD
+ */
+#define CONFIG_LCD
+#define CONFIG_VIDEO_MX5
+#define LCD_BPP LCD_COLOR16
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+
/*-----------------------------------------------------------------------
* FLASH and environment organization
*/
Index: board/freescale/mx51evk/mx51evk.c
===================================================================
--- board/freescale/mx51evk/mx51evk.c (revision 170)
+++ board/freescale/mx51evk/mx51evk.c (working copy)
@@ -34,10 +34,38 @@
#include <fsl_pmic.h>
#include <mc13892.h>
+#ifdef CONFIG_LCD
+#include <linux/fb.h>
+#include <lcd.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
static u32 system_rev;
+extern int mx51_fb_init(struct fb_videomode *mode, u32 ipu_di, u32 pix_fmt);
+#ifdef CONFIG_LCD
+static struct fb_videomode claa_wvga = {
+ "CLAA07LC0ACW",
+ 57, /* Refresh */
+ 800, /* xres */
+ 480, /* yres */
+ 37037, /* pixclock = 27Mhz */
+ 40, /* left margin */
+ 60, /* right margin */
+ 10, /* upper margin */
+ 10, /* lower margin */
+ 20, /* hsync-len */
+ 10, /* vsync-len */
+ 0, /* sync */
+ FB_VMODE_NONINTERLACED, /* vmode */
+ 0, /* flag */
+};
+
+static int wvga_ipu_di = 1;
+static int wvga_bppix = 16;
+#endif
+
#ifdef CONFIG_FSL_ESDHC
struct fsl_esdhc_cfg esdhc_cfg[2] = {
{MMC_SDHC1_BASE_ADDR, 1},
@@ -148,6 +176,41 @@
mxc_iomux_set_pad(MX51_PIN_NANDF_D11, 0x2180);
}
+#ifdef CONFIG_LCD
+void setup_iomux_ipu(void)
+{
+ puts( "setup_iopmux_ipu(): invoked\n" );
+ /* DISP2_DAT [0:15] are configured by default */
+ mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4);
+ mxc_iomux_set_pad(MX51_PIN_DI1_D1_CS,
+ PAD_CTL_PKE_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST);
+ mxc_request_iomux(MUX_IN_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
+ INPUT_CTL_PATH1);
+
+ /* DISP2_DRDY pin */
+ mxc_request_iomux(MX51_PIN_DI_GP4, IOMUX_CONFIG_ALT4);
+ mxc_iomux_set_pad(MX51_PIN_DI_GP4, PAD_CTL_PKE_ENABLE |
+ PAD_CTL_PUE_KEEPER | PAD_CTL_DRV_LOW);
+
+ puts( "setup_iopmux_ipu(): done\n" );
+}
+
+#endif
+
+#ifdef CONFIG_LCD
+void lcd_enable(void)
+{
+ int ret;
+puts( "lcd_enable(): invoked\n" );
+
+ ret = mx51_fb_init(&claa_wvga, wvga_ipu_di, wvga_bppix);
+ if (ret) {
+ puts("LCD cannot be configured\n");
+ }
+
+}
+#endif
+
#ifdef CONFIG_MXC_SPI
static void setup_iomux_spi(void)
{
@@ -409,7 +472,9 @@
setup_iomux_uart();
setup_iomux_fec();
-
+#ifdef CONFIG_LCD
+ setup_iomux_ipu();
+#endif
return 0;
}
Index: common/lcd.c
===================================================================
--- common/lcd.c (revision 170)
+++ common/lcd.c (working copy)
@@ -438,16 +438,21 @@
ulong lcd_setmem (ulong addr)
{
ulong size;
+#ifdef ORIGINAL_PRE_TBESEMER
int line_length = (panel_info.vl_col * NBITS (panel_info.vl_bpix)) / 8;
debug ("LCD panel info: %d x %d, %d bit/pix\n",
panel_info.vl_col, panel_info.vl_row, NBITS (panel_info.vl_bpix) );
size = line_length * panel_info.vl_row;
+#else
+ size = 1024 * 1024 * 12;
/* Round up to nearest full page */
size = (size + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+#endif
+
/* Allocate pages for the frame buffer. */
addr -= size;
Index: drivers/video/mxc_ipuv3_fb.c
===================================================================
--- drivers/video/mxc_ipuv3_fb.c (revision 170)
+++ drivers/video/mxc_ipuv3_fb.c (working copy)
@@ -526,7 +526,7 @@
*
* @return Appropriate error code to the kernel common code
*/
-static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode *mode)
+static int mxcfb_probe(u32 interface_pix_fmt, struct fb_videomode
*mode, u32 ipu_di)
{
struct fb_info *fbi;
struct mxcfb_info *mxcfbi;
@@ -550,11 +550,14 @@
mxcfbi->blank = FB_BLANK_POWERDOWN;
}
- mxcfbi->ipu_di = 0;
+ mxcfbi->ipu_di = ipu_di;
ipu_disp_set_global_alpha(mxcfbi->ipu_ch, 1, 0x80);
ipu_disp_set_color_key(mxcfbi->ipu_ch, 0, 0);
- strcpy(fbi->fix.id, "DISP3 BG");
+ if (ipu_di == 0)
+ strcpy(fbi->fix.id, "DISP3 BG");
+ else if (ipu_di == 1)
+ strcpy(fbi->fix.id, "DISP3 BG - DI1");
g_dp_in_use = 1;
@@ -625,9 +628,10 @@
memset(lcdbase, 0, mem_len);
}
-int mx51_fb_init(struct fb_videomode *mode)
+int mx51_fb_init(struct fb_videomode *mode, u32 ipu_di, u32 bppix)
{
int ret;
+ uint32_t pixfmt = 0;
ret = ipu_probe();
if (ret)
@@ -635,8 +639,24 @@
lcd_base += 56;
+ switch (bppix) {
+ case 32:
+ pixfmt = IPU_PIX_FMT_BGR32;
+ break;
+ case 24:
+ pixfmt = IPU_PIX_FMT_BGR24;
+ break;
+ case 18:
+ pixfmt = IPU_PIX_FMT_RGB666;
+ break;
+ case 16:
+ pixfmt = IPU_PIX_FMT_RGB565;
+ break;
+ }
+
+
debug("Framebuffer at 0x%x\n", (unsigned int)lcd_base);
- ret = mxcfb_probe(IPU_PIX_FMT_RGB666, mode);
+ ret = mxcfb_probe(pixfmt, mode, ipu_di);
return ret;
}
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot] IMX51 EVK Splash Screen
2011-01-20 2:06 [U-Boot] IMX51 EVK Splash Screen Thomas Besemer
@ 2011-01-20 8:07 ` Stefano Babic
2011-02-26 18:32 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2011-01-20 8:07 UTC (permalink / raw)
To: u-boot
On 01/20/2011 03:06 AM, Thomas Besemer wrote:
> Hi folks -
>
> I had posted last week. I was able to get basic Splash Screen going on EVK,
> through using patches I found from googling around. At the end of this email,
> the patch set that shows the differences from the U-Boot I pulled on
> 12/24/2010. I am not sure I have the right patch set, but in this case,
> what I have does seem to work; U-Boot does output to LCD display on the
> second Display Interface.
There is no correct patchset. As I already stated, patches sent
sometimes ago to ML (and that you reuse) require some rework to be
merged into the mainline.
> There seems to have been a discussion on lcd_setmem(). Has this been
> resolved, and I missed it?
No, someone should fix it. The result of the discussion suggested by
Wolfgang is to use the same interface Linux uses, that is with a
video-mode=" variable with something such as 1024x768 at 60. U-Boot has
already a videomodes.c, but it uses an ancient syntax for videomode (see
the code). Feel free to fix it.
> You'll see from patch set that I just put a
> very large buffer in place (hard coded hack).
Of course it can work, but this cannot go to mainline...
> U-Boot hung on boot before
> I put this in, and based on what I see on mailing list, this seems to be
> an issue of not having the display information available early on in boot.
Right. This is an open issue.
> At any rate, I got it to boot, and see that the LCD shows display on
> startup. Yet, I lose the console on this; the serial port is read, but
> the output goes to LCD.
Fine.
> In an ideal world, what I would like is to not loose the console.
Console remains on UART if you do not change the behavior.
> I want
> stdin/stdout to remain on serial port, while I toss a bit map out on LCD.
> Any comments on how to do this? End game is that I toss a splash screen
> up on LCD on EVK, while having U-Boot information still on the console.
This is already foreseen. If you checked in IPU code, there is an
overwrite function set for this purpose. You must set
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE. Check the setup in the vision2 board.
>
> So, a couple of things:
>
> 1. Do I have correct patch work for this version of U-Boot, or is there a
> newer version of U-Boot to pull? I pulled both mainline and IMX tree
> yesterday, don't see the MX51 EVK in them.
As I stated previously, the patch adding splashscreen to the mx51evk
board need reworking.
> 2. How to configure so that I get console while LCD is available for display.
See my answer before
>
> 3. What is current status on lcd_setmem() thing.
Awaiting for patches. Do you think you can provide them ?
> I might have missed a few things along the way folks; I am not the sharpest
> tool in the shed. Please let me know if I missed patch sets on lcd_setmem(),
> and help me understand how to make sure console works with Splash Screen.
Regarding lcd_setmem() there is some clear statements. IMHO I like
Wolfgang's proposal, because we should not reinvent the wheel.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] IMX51 EVK Splash Screen
2011-01-20 8:07 ` Stefano Babic
@ 2011-02-26 18:32 ` Marek Vasut
2011-02-27 13:41 ` Stefano Babic
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2011-02-26 18:32 UTC (permalink / raw)
To: u-boot
On Thursday 20 January 2011 09:07:53 Stefano Babic wrote:
> On 01/20/2011 03:06 AM, Thomas Besemer wrote:
> > Hi folks -
> >
> > I had posted last week. I was able to get basic Splash Screen going on
> > EVK, through using patches I found from googling around. At the end of
> > this email, the patch set that shows the differences from the U-Boot I
> > pulled on 12/24/2010. I am not sure I have the right patch set, but in
> > this case, what I have does seem to work; U-Boot does output to LCD
> > display on the second Display Interface.
>
> There is no correct patchset. As I already stated, patches sent
> sometimes ago to ML (and that you reuse) require some rework to be
> merged into the mainline.
>
> > There seems to have been a discussion on lcd_setmem(). Has this been
> > resolved, and I missed it?
>
> No, someone should fix it. The result of the discussion suggested by
> Wolfgang is to use the same interface Linux uses, that is with a
> video-mode=" variable with something such as 1024x768 at 60. U-Boot has
> already a videomodes.c, but it uses an ancient syntax for videomode (see
> the code). Feel free to fix it.
>
> > You'll see from patch set that I just put a
> >
> > very large buffer in place (hard coded hack).
>
> Of course it can work, but this cannot go to mainline...
>
> > U-Boot hung on boot before
> >
> > I put this in, and based on what I see on mailing list, this seems to be
> > an issue of not having the display information available early on in
> > boot.
>
> Right. This is an open issue.
>
> > At any rate, I got it to boot, and see that the LCD shows display on
> > startup. Yet, I lose the console on this; the serial port is read, but
> > the output goes to LCD.
>
> Fine.
>
> > In an ideal world, what I would like is to not loose the console.
>
> Console remains on UART if you do not change the behavior.
>
> > I want
> >
> > stdin/stdout to remain on serial port, while I toss a bit map out on LCD.
> > Any comments on how to do this? End game is that I toss a splash screen
> > up on LCD on EVK, while having U-Boot information still on the console.
>
> This is already foreseen. If you checked in IPU code, there is an
> overwrite function set for this purpose. You must set
> CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE. Check the setup in the vision2 board.
>
> > So, a couple of things:
> >
> > 1. Do I have correct patch work for this version of U-Boot, or is there a
> > newer version of U-Boot to pull? I pulled both mainline and IMX tree
> > yesterday, don't see the MX51 EVK in them.
>
> As I stated previously, the patch adding splashscreen to the mx51evk
> board need reworking.
>
> > 2. How to configure so that I get console while LCD is available for
> > display.
>
> See my answer before
>
> > 3. What is current status on lcd_setmem() thing.
>
> Awaiting for patches. Do you think you can provide them ?
>
> > I might have missed a few things along the way folks; I am not the
> > sharpest tool in the shed. Please let me know if I missed patch sets on
> > lcd_setmem(), and help me understand how to make sure console works with
> > Splash Screen.
>
> Regarding lcd_setmem() there is some clear statements. IMHO I like
> Wolfgang's proposal, because we should not reinvent the wheel.
>
> Best regards,
> Stefano Babic
Hey guys, any update on this matter ? I'm quite interested :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] IMX51 EVK Splash Screen
2011-02-26 18:32 ` Marek Vasut
@ 2011-02-27 13:41 ` Stefano Babic
2011-02-28 21:42 ` Thomas Besemer
0 siblings, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2011-02-27 13:41 UTC (permalink / raw)
To: u-boot
On 02/26/2011 07:32 PM, Marek Vasut wrote:
> Hey guys, any update on this matter ? I'm quite interested :)
On my side I am not currently working on this issue...
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] IMX51 EVK Splash Screen
2011-02-27 13:41 ` Stefano Babic
@ 2011-02-28 21:42 ` Thomas Besemer
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Besemer @ 2011-02-28 21:42 UTC (permalink / raw)
To: u-boot
On Sun, Feb 27, 2011 at 5:41 AM, Stefano Babic <sbabic@denx.de> wrote:
>
> On 02/26/2011 07:32 PM, Marek Vasut wrote:
>
> > Hey guys, any update on this matter ? I'm quite interested :)
>
> On my side I am not currently working on this issue...
>
> Best regards,
> Stefano Babic
>
On my end, I had to go back to the FSL SDK version of U-Boot. Reason
is that they
have an extensive patch set that is not in mainstream U-Boot. I ran
into some issues
using current U-Boot, such as a slower boot time, but did not investigate.
If I get a chance in next month or so, I am going to migrate all FSL
SDK U-Boot patches
to the top of the U-Boot tree, and stabilize.
I have not back ported the Splash Screen stuff to the SDK version of U-Boot.
In an ideal world, FSL will start working with current U-Boot, and
post their patch sets back
to mailing list. Would make life easier for all of us.
tom
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <tencent_73827D857D5B2517721F2900@qq.com>]
* [U-Boot] IMX51 EVK Splash Screen
[not found] <tencent_73827D857D5B2517721F2900@qq.com>
@ 2011-06-22 2:29 ` Thomas Besemer
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Besemer @ 2011-06-22 2:29 UTC (permalink / raw)
To: u-boot
Please constrain your emails to the email list; I do not like direct comment
or direct email.
Stefano has fixed much of the IPU/Splash Screen stuff. A good deal of that
is in current U-Boot tree, last I saw. I am now back on OMAP, so really
don't have comment on this. Stefanfo might, but just pull the tree and
figure it out on your own; it is not that hard.
tom
2011/6/21 ?? <tongjiang.cloudsoft@gmail.com>
> Hi Thomas and all,
>
> I have a problem when i deal with the i.MX51 Babbage uboot
> splash.
>
> As I read the the code of uboot , it seems that I only need to
> add the macro "CONFIG_SPLASH_SCREEN" defined in the mx51_bbg_android.h to
> make the splash works, but the fact is not.And i have a doubt of this code
> ,#define CONFIG_FB_BASE (TEXT_BASE + 0x300000), why the base address of
> the fb is not "0x40000000",but instead of a TEXT_BASE baseed.
>
> Any problem still going?
>
> I get the uboot code as this
> git clone git://git.denx.de/u-boot.git uboot-imx
> and i patched freescale R10.2 patch from
>
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX51ANDROID&fpsp=1&tab=Design_Tools_Tab
>
> <http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX51ANDROID&fpsp=1&tab=Design_Tools_Tab>see
> the ipu files in the attach.
> Thanks.
>
> Vincent
>
> ****
> ****
> ****
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-22 2:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 2:06 [U-Boot] IMX51 EVK Splash Screen Thomas Besemer
2011-01-20 8:07 ` Stefano Babic
2011-02-26 18:32 ` Marek Vasut
2011-02-27 13:41 ` Stefano Babic
2011-02-28 21:42 ` Thomas Besemer
[not found] <tencent_73827D857D5B2517721F2900@qq.com>
2011-06-22 2:29 ` Thomas Besemer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox