public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] LCD on pxa255
@ 2004-06-13 21:58 himba
  2004-06-13 22:41 ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: himba @ 2004-06-13 21:58 UTC (permalink / raw)
  To: u-boot

Hi,

I'm trying to hook up passive LCD to pxa255, so I defined my LCD type 
and CONFIG_LCD in config and created vidinfo_t struct in 
cpu/pxa/pxafb.c. I compiled and burned it to flash. After reboot I get:
U-Boot 1.0.2 (Jun  8 2004 - 23:06:10)

U-Boot code: A3F00000 -> A3F18530  BSS: -> A3F1BFB4
RAM Configuration:
Bank #0: a0000000 64 MB
Bank #1: a4000000  0 kB
Bank #2: a8000000  0 kB
Bank #3: ac000000  0 kB
Flash: 32 MB
[LCD] Initializing LCD frambuffer at 00000000
palette_mem_size = 0x00000200
Configuring PXA LCD
vid: vl_col=320 hslen=3 lm=2 rm=3
vid: vl_row=240 vslen=1 um=0 bm=0
fbi->dmadesc_fblow = 0x149d0
fbi->dmadesc_fbhigh = 0x149e0
fbi->dmadesc_palette = 0x149f0
fbi->dmadesc_fblow->fdadr = 0x6d657263
fbi->dmadesc_fbhigh->fdadr = 0x6d6d
fbi->dmadesc_palette->fdadr = 0x64646120
fbi->dmadesc_fblow->fsadr = 0x69746e65
fbi->dmadesc_fbhigh->fsadr = 0x2c622e5b
fbi->dmadesc_palette->fsadr = 0x73736572
fbi->dmadesc_fblow->ldcmd = 0x0
fbi->dmadesc_fbhigh->ldcmd = 0x5d6c2e20
fbi->dmadesc_palette->ldcmd = 0x6d202d20
Setting GPIO for 8 bit data
Enabling LCD controller
FDADR0 = 0x64646120
FDADR1 = 0x000149d0
LCCR0 = 0x00301078
LCCR1 = 0x0102093f
LCCR2 = 0x000000ef
LCCR3 = 0x0340ff20
setcolreg: reg  0 @ 00014a00: R=00 G=00 B=00 => 6D65
setcolreg: reg  1 @ 00014a02: R=FF G=00 B=00 => 726F
setcolreg: reg  2 @ 00014a04: R=00 G=FF B=00 => 2079
setcolreg: reg  3 @ 00014a06: R=FF G=FF B=00 => 6F6D
setcolreg: reg  4 @ 00014a08: R=00 G=00 B=FF => 6964
setcolreg: reg  5 @ 00014a0a: R=FF G=00 B=FF => 7966
setcolreg: reg  6 @ 00014a0c: R=00 G=FF B=FF => 202C
setcolreg: reg 14 @ 00014a1c: R=AA G=AA B=AA => 6461
setcolreg: reg 15 @ 00014a1e: R=FF G=FF B=FF => 7264
[LCD] Test Pattern: 320 x 240 [107 x 120]
[LCD] Drawing the logo...

-- hang ?! --
No logo appears and no test pattern is visible (LCD is powered on and 
blanked/or with some horizontal lines drawn).

Has anybody successfuly connected passive LCD to  pxa ?

regards ,himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-13 21:58 himba
@ 2004-06-13 22:41 ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2004-06-13 22:41 UTC (permalink / raw)
  To: u-boot

In message <40CCCDF4.2090002@siol.net> you wrote:
> 
> I'm trying to hook up passive LCD to pxa255, so I defined my LCD type 
> and CONFIG_LCD in config and created vidinfo_t struct in 
> cpu/pxa/pxafb.c. I compiled and burned it to flash. After reboot I get:
...
> -- hang ?! --

Type (blind):

	setenv stdout serial
	setenv stdin serial

and see if you get the prompt back on the serial port.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
God is real, unless declared integer.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
       [not found] <20040613224152.F37E1C109F@atlas.denx.de>
@ 2004-06-14  8:31 ` himba
  2004-06-14 12:49   ` Matej Kupljen
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: himba @ 2004-06-14  8:31 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <40CCCDF4.2090002@siol.net> you wrote:
> 
>>I'm trying to hook up passive LCD to pxa255, so I defined my LCD type 
>>and CONFIG_LCD in config and created vidinfo_t struct in 
>>cpu/pxa/pxafb.c. I compiled and burned it to flash. After reboot I get:
> 
> ...
> 
>>-- hang ?! --
> 
> 
> Type (blind):
> 
> 	setenv stdout serial
> 	setenv stdin serial
> 
> and see if you get the prompt back on the serial port.
> 

Yes, the prompt appears, thank you.

Another thing I want to test is to display bmp image on LCD. According 
to instructions in dulg manual, #define CONFIG_SPLASH_SCREEN should 
enable splash support and bmp command for image manipulation, but it 
does not enable bmp command. I also tried with #define CONFIG_COMMANDS 
         (CONFIG_CMD_DFL | CMD_BMP), but with no success.

regards, himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14  8:31 ` himba
@ 2004-06-14 12:49   ` Matej Kupljen
  2004-06-14 15:37     ` himba
  2004-06-14 13:20   ` Wolfgang Denk
  2004-06-14 13:39   ` himba
  2 siblings, 1 reply; 14+ messages in thread
From: Matej Kupljen @ 2004-06-14 12:49 UTC (permalink / raw)
  To: u-boot

Hi

> Another thing I want to test is to display bmp image on LCD. According 
> to instructions in dulg manual, #define CONFIG_SPLASH_SCREEN should 
> enable splash support and bmp command for image manipulation, but it 
> does not enable bmp command. I also tried with #define CONFIG_COMMANDS 
>          (CONFIG_CMD_DFL | CMD_BMP), but with no success.

We use the LCD to show the splash screen when it boots.
I have splash image gziped and stored in flash and in our
board initialization routine I unzip the image directly
to frame buffer.
I also set the stdout and stderr environment variables
to serial.

Regards,
Matej

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14  8:31 ` himba
  2004-06-14 12:49   ` Matej Kupljen
@ 2004-06-14 13:20   ` Wolfgang Denk
  2004-06-14 13:39   ` himba
  2 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2004-06-14 13:20 UTC (permalink / raw)
  To: u-boot

In message <40CD6251.5040709@siol.net> you wrote:
>
> Another thing I want to test is to display bmp image on LCD. According 
> to instructions in dulg manual, #define CONFIG_SPLASH_SCREEN should 
> enable splash support and bmp command for image manipulation, but it 

No. Please read again:

    To enable splash screen support you have to add a "#define
    CONFIG_SPLASH_SCREEN" to your board configuration file. This
    will also implicitely enable U-Boot Bitmap Support.

It will enable U-Boot Bitmap _Support_ (i. e. the functions needed to
draw the spash screen), but this does NOT anable the BMP  _commands_.
See also:

    By adding the CFG_CMD_BMP option to your CONFIG_COMMANDS
    command selections you can enable support for bitmap images
    in U-Boot. This will add bmp to the list of commands in your
    configuration of U-Boot

> does not enable bmp command. I also tried with #define CONFIG_COMMANDS 
>          (CONFIG_CMD_DFL | CMD_BMP), but with no success.

Probably because it's CFG_CMD_BMP ?

Also be aware that so far only the MPC823 LCD driver ("cpu/mpc8xx/lcd.c")
and the SMI LynxE driver ("drivers/cfb_console.c") actually implement
bitmap support and the splash screen feature.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I think that all right-thinking people in this country are  sick  and
tired  of  being  told that ordinary decent people are fed up in this
country with being sick and tired. I'm certainly not.  But  I'm  sick
and tired of being told that I am.                     - Monty Python

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14  8:31 ` himba
  2004-06-14 12:49   ` Matej Kupljen
  2004-06-14 13:20   ` Wolfgang Denk
@ 2004-06-14 13:39   ` himba
  2004-06-14 14:48     ` Kyle Harris
  2004-06-14 20:17     ` Matej Kupljen
  2 siblings, 2 replies; 14+ messages in thread
From: himba @ 2004-06-14 13:39 UTC (permalink / raw)
  To: u-boot

himba wrote:
  #define CONFIG_COMMANDS
>         (CONFIG_CMD_DFL | CMD_BMP), but with no success.
> 

bmp command could be available if I used CONFIG_CMD_BMP instead of 
CMD_BMP - silly me!

But then I thought to myself - if test pattern nor logo are shown bmp 
image is not likely to be displayed either !

I will need to tweak LCCR settings a bit more, in a meanwhile could 
somebody, please, confirm that it got passive LCD working with pxa. thanx.


regards ,himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 13:39   ` himba
@ 2004-06-14 14:48     ` Kyle Harris
  2004-06-14 20:17     ` Matej Kupljen
  1 sibling, 0 replies; 14+ messages in thread
From: Kyle Harris @ 2004-06-14 14:48 UTC (permalink / raw)
  To: u-boot

On Monday 14 June 2004 09:39 am, himba wrote:
> himba wrote:
>   #define CONFIG_COMMANDS
>
> >         (CONFIG_CMD_DFL | CMD_BMP), but with no success.
>
> bmp command could be available if I used CONFIG_CMD_BMP instead of
> CMD_BMP - silly me!
>
> But then I thought to myself - if test pattern nor logo are shown bmp
> image is not likely to be displayed either !
>
> I will need to tweak LCCR settings a bit more, in a meanwhile could
> somebody, please, confirm that it got passive LCD working with pxa. thanx.

I have it working on custom PXA board. I have not sent Wolfgang patches in a 
while, but I would be happy to send you my latest based on 1.0.0.

Kyle.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
       [not found] <20040614132058.F3E44C109F@atlas.denx.de>
@ 2004-06-14 14:55 ` himba
  0 siblings, 0 replies; 14+ messages in thread
From: himba @ 2004-06-14 14:55 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

> It will enable U-Boot Bitmap _Support_ (i. e. the functions needed to
> draw the spash screen), but this does NOT anable the BMP  _commands_.

Thank you for clearing it out for me.

> See also:
> 
>     By adding the CFG_CMD_BMP option to your CONFIG_COMMANDS
>     command selections you can enable support for bitmap images
>     in U-Boot. This will add bmp to the list of commands in your
>     configuration of U-Boot
> 
> 
>>does not enable bmp command. I also tried with #define CONFIG_COMMANDS 
>>         (CONFIG_CMD_DFL | CMD_BMP), but with no success.
> 
> 
> Probably because it's CFG_CMD_BMP ?
> 
Yes, I noticed.

> Also be aware that so far only the MPC823 LCD driver ("cpu/mpc8xx/lcd.c")
> and the SMI LynxE driver ("drivers/cfb_console.c") actually implement
> bitmap support and the splash screen feature.
> 

Also noticed that it doesn't compile for pxa - le{16,32}_to_cpu 
functions are missing and lcd_display_bitmap() is not defined. I 
included linux/byteorder/little_endian.h in pxafb.c and copied 
lcd_display_bitmap() from cpu/mpc8xx/lcd.c (did some quick hacks to 
get it compile), but  with no luck.

I guess I should first try to get testpattern displayed using 
functions that are in pxafb.c already.

CONFIG_LCD_LOGO gets #undefined in pxafb.c by default, but I commented 
it out and am also including bmp_logo.h (instead of bmp_nexus.h). I'm 
suspecting that this gets u-boot corrupted since LCD is initialized at 
0x0,
  [LCD] Initializing LCD frambuffer at 00000000

and bitmap_plot() writes to lcd_base pointed to 00000000.

further...
I suspect there should be something similar done in lib_arm/board.c as 
in lib_ppc/board.c ?

...
#ifdef CONFIG_LCD
         /* reserve memory for LCD display (always full pages) */
         addr = lcd_setmem (addr);
         gd->fb_base = addr;
#endif /* CONFIG_LCD */
...

Function for reserving memory for fb - lcd_setmem() - already exist in 
pxafb.c but it doesn't seem to be used anywhere ?!

regards, himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 12:49   ` Matej Kupljen
@ 2004-06-14 15:37     ` himba
  2004-06-14 19:49       ` Wolfgang Denk
  0 siblings, 1 reply; 14+ messages in thread
From: himba @ 2004-06-14 15:37 UTC (permalink / raw)
  To: u-boot

Matej Kupljen wrote:
> 
> We use the LCD to show the splash screen when it boots.
> I have splash image gziped and stored in flash and in our
> board initialization routine I unzip the image directly
> to frame buffer.
> I also set the stdout and stderr environment variables
> to serial.
> 


Great - where can I set stdout and stdin to be automagically
set to serial ?

I'm also working on bootsplash being displayed while linux
boots.

In the meanwhile I managed to display test pattern and
I can see messages from uboot until kernel is started but logo is
in weird colors.

Could you post your patches to the list ?

Maybe it would be helpfull to others if we sent patches
to Wolfgang...

regards ,himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 15:37     ` himba
@ 2004-06-14 19:49       ` Wolfgang Denk
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2004-06-14 19:49 UTC (permalink / raw)
  To: u-boot

In message <40CDC64A.4010601@siol.net> you wrote:
>
> > We use the LCD to show the splash screen when it boots.
> > I have splash image gziped and stored in flash and in our
> > board initialization routine I unzip the image directly
> > to frame buffer.
> > I also set the stdout and stderr environment variables
> > to serial.
> 
> Great - where can I set stdout and stdin to be automagically
> set to serial ?

Put:

#define CONFIG_PREBOOT  "setenv stdout serial;setenv stdin serial"

in your board config file :-)

> I'm also working on bootsplash being displayed while linux
> boots.

Than have a look at our linux-2.4 kernel tree; it make sLinux use the
same memory for framebuffer as used by U-Boot,  so  you  can  have  a
steady  image  from a few milliseconds after power-on until the Linux
GUI takes over :-) [Of course  you  can  also  load  "boot  progress"
screels in U-Boot using the "bmp" command...

> Maybe it would be helpfull to others if we sent patches
> to Wolfgang...

Sure that would be helpful. I have only that many different boards in
our lab, and even stricter limits on available time :-(

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If you're not part of the solution, then you're part of the  precipi-
tate.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 13:39   ` himba
  2004-06-14 14:48     ` Kyle Harris
@ 2004-06-14 20:17     ` Matej Kupljen
  2004-06-14 21:40       ` himba
  1 sibling, 1 reply; 14+ messages in thread
From: Matej Kupljen @ 2004-06-14 20:17 UTC (permalink / raw)
  To: u-boot

Hi

> I will need to tweak LCCR settings a bit more, in a meanwhile could 
> somebody, please, confirm that it got passive LCD working with pxa. thanx.

This should be done by you :-)

Do you see anything on the LCD?

You didn't see anything on the console, because the stdout and stderr
were directed to the LCD. When you reset the board is aynthing printed
on the LCD? If there is, then your LCD is working.

Matej

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 20:17     ` Matej Kupljen
@ 2004-06-14 21:40       ` himba
  2004-06-15  6:01         ` Matej Kupljen
  0 siblings, 1 reply; 14+ messages in thread
From: himba @ 2004-06-14 21:40 UTC (permalink / raw)
  To: u-boot

Matej Kupljen wrote:

> 
> Do you see anything on the LCD?
> 
I was more concerned about the code in pxafb.c - if it is complete and 
working
(and it is not). After few tweaks I got denx logo and stdout on lcd, 
but in
somewhat blue-green variant :) .

> You didn't see anything on the console, because the stdout and stderr
> were directed to the LCD. When you reset the board is aynthing printed
> on the LCD? If there is, then your LCD is working.
> 

Yes, it seems to be working, and I also managed to redirect stdout and 
stderr to
serial in late_board_init().

There are also somekond of "waves" on the screen but I guess I will 
have to
adjust refresh rates a bit.


regards, himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
  2004-06-14 21:40       ` himba
@ 2004-06-15  6:01         ` Matej Kupljen
  0 siblings, 0 replies; 14+ messages in thread
From: Matej Kupljen @ 2004-06-15  6:01 UTC (permalink / raw)
  To: u-boot

Hi

> Yes, it seems to be working, and I also managed to redirect stdout and 
> stderr to
> serial in late_board_init().

I do that in late_board_init() also.

> There are also somekond of "waves" on the screen but I guess I will 
> have to
> adjust refresh rates a bit.

Probably.

If you want to display splash screen while linux boots, take a 
look here:
http://www.bootsplash.org/

We use it and it looks great.

As for the patch for our board. I have to do some code clenup and 
check the code against latest CVS version, then I'll send the path
to the Wolfgang (still some resume issues).

Regards,
Matej

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot-Users] LCD on pxa255
       [not found] <20040614194917.D90B4C13D3@atlas.denx.de>
@ 2004-06-15 19:35 ` himba
  0 siblings, 0 replies; 14+ messages in thread
From: himba @ 2004-06-15 19:35 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

> 
> Put:
> 
> #define CONFIG_PREBOOT  "setenv stdout serial;setenv stdin serial"
> 
> in your board config file :-)
> 

Hmm, It does not do what is expected. I could stick with 
late_board_init() but it leaves
In:	serial
out:	lcd
err:	lcd

printed over test pattern...

> 
> Than have a look at our linux-2.4 kernel tree; it make sLinux use the
> same memory for framebuffer as used by U-Boot,  so  you  can  have  a
> steady  image  from a few milliseconds after power-on until the Linux
> GUI takes over :-) [Of course  you  can  also  load  "boot  progress"
> screels in U-Boot using the "bmp" command...
> 

Great news! I've been poking through edlk3.0 kernel source and tried 
to diff it against vanilla 2.4.24, but I couldn't find/spot needed 
info about fb. It must be 'cause newbie (me) isn't really familiar 
with kernel... Could you point it out, please ? :)

> 
>>Maybe it would be helpfull to others if we sent patches
>>to Wolfgang...
> 
> 
> Sure that would be helpful. I have only that many different boards in
> our lab, and even stricter limits on available time :-(

Right, first I will try the display under linux more extensive - tune 
up some settings - then I will mail the patch for u-boot to this list!


regards, himba

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-06-15 19:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040614194917.D90B4C13D3@atlas.denx.de>
2004-06-15 19:35 ` [U-Boot-Users] LCD on pxa255 himba
     [not found] <20040614132058.F3E44C109F@atlas.denx.de>
2004-06-14 14:55 ` himba
     [not found] <20040613224152.F37E1C109F@atlas.denx.de>
2004-06-14  8:31 ` himba
2004-06-14 12:49   ` Matej Kupljen
2004-06-14 15:37     ` himba
2004-06-14 19:49       ` Wolfgang Denk
2004-06-14 13:20   ` Wolfgang Denk
2004-06-14 13:39   ` himba
2004-06-14 14:48     ` Kyle Harris
2004-06-14 20:17     ` Matej Kupljen
2004-06-14 21:40       ` himba
2004-06-15  6:01         ` Matej Kupljen
2004-06-13 21:58 himba
2004-06-13 22:41 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox