Mini2440v2 development board 3.5" lcd problem

mocugo
Hi,
I recently bought mini2440v2(hiteg) development board with 3.5" lcd. Board
came with wince6.0 installed and it's working properly. I installed linux
kernel image to the board. When I boot it, console is okey on the
hyperterminal but image on lcd is not stable (oscillating, flickering). I
tried different kernel images (zImage_N35, zImage_T35, zImage_X35) but
results are same.

Information at the back of lcd is:
LY-TFT-35-S001
LY-TFT3.5-001
101025 SKR
TKRBLW-283B-101026

I installed zImage_N43 (for 4.3" lcd) kernel from www.friendlyarm.net then
boot it. This time, lcd is stable but defined lcd dimensions is not
compatible. Qtopia is not fit in lcd correctly. I have to use one of the
images: zImage_N35, zImage_T35, zImage_X35 according to dvd (came with
board) and friendlyarm.net
I think, 3.5" lcd on my board is a new type and it's not compatible with
kernel images mentioned above.

Does anybody know how can I fix this problem?

open-nandra
Use mainline linux with patches here
(http://friendlyarm.net/forum/topic/2575) and it will work fine.

marek

mocugo
I downloaded 2.6.38.2 kernel and sent patches in it succesfully. Now, I
have to configure .config file with "make menuconfig" but how can I set all
the parameters before compile? Is there any ready mini2440 file for
compiling configuration? I tried a lot of things which you and other guys
wrote (like mini2440_defconfig)

I'm new at embedded linux and I download 2.6.32.2 from friendlyarm.net and
compile it succesfully. Of course there is config files in it and I used
one of them in "make menuconfig" and save it as ".config" then compile it.
It's working on board, linux terminal is ok on hyperterminal but lcd isn't
working correctly (as I wrote before)

davef
make ARCH=arm menuconfig

<Load as an alternative file> mini2440_defconfig
make any changes
<Save as an alternative file> my-config
<Save as an alternative file> .config
Exit

And tell me how long the backlight keeps going!

mocugo
Dave, I made these steps:

First, I  copied "mini2440_defconfig" from
~/mini2440/linux-2.6.38.2/arch/arm/configs to ~/mini2440/linux-2.6.38.2
then made your comment. Because config editor couldn't find the file
"mini2440_defconfig".

I didn't changed anything and saved as ".config" and exit.

then I wrote "make zImage" for compiling but it didn't work. (A lot of
questions came to console)

If I make it, I'll tell you about backlight :)

TheRegnirps
The LCD from Hiteg is not supported in the FriendlyARM images or sources
you got from this site. For one, it is naturally "landscape" and its timing
is different. You should be able to find the LCD config information in the
source code that came on the Hiteg DVD. The Mini2440V2 will work with any
of the LCDs you mentioned, but if you have the MegaLCD 3.5 from Hiteg, you
need to use the correct timing parameters and frame buffer definition. They
are on the DVD in the Linux sources.

And why would you try the kernel for the 4.3" LCD (480x272) when you have a
3.5 (240x320)?

davef
mocugo,

Yes, depending on where mini2440_defconfig is in the file system you might
have to something like:
../mini2440_defconfig

You need to use ARCH=arm everytime you issue a make XYZ

A zImage is made by default, so all you should have to do is:

make ARM=arm 

Have a look at the Linux tutorial on the Wiki for pointers.

Your zImage will be found at /arch/arm/boot unless you are putting all the
output in a directory like <kernel-bin>

mocugo
I solved the problem. I changed "mach-mini2440.c" and select N35 type while
I'm compiling the kernel. I made these changes:

#define LCD_WIDTH 320
#define LCD_HEIGHT 240
#define LCD_PIXCLOCK 100000

#define LCD_RIGHT_MARGIN 62
#define LCD_LEFT_MARGIN 19
#define LCD_HSYNC_LEN 5

#define LCD_UPPER_MARGIN 14
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1

Dave, backlight always on, it doesn't turn off.

davef
mocugo,

Good work!  Thanks for the backlight comment.  Looks like I may have
something wrong when I configured the kernel.

Dave

Krish
#if defined(CONFIG_FB_S3C2410_N240320)

#define LCD_WIDTH 240
#define LCD_HEIGHT 320
#define LCD_PIXCLOCK 100000

#define LCD_RIGHT_MARGIN 36
#define LCD_LEFT_MARGIN 19
#define LCD_HSYNC_LEN 5

#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1

#elif defined(CONFIG_FB_S3C2410_T240320)
#define LCD_WIDTH 240
#define LCD_HEIGHT 320
#define LCD_PIXCLOCK 170000

#define LCD_RIGHT_MARGIN 29
#define LCD_LEFT_MARGIN 10
#define LCD_HSYNC_LEN 5

#define LCD_UPPER_MARGIN 3
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1

#elif defined(CONFIG_FB_S3C2410_TFT800480)
#define LCD_WIDTH 800
#define LCD_HEIGHT 480
#define LCD_PIXCLOCK 40000

#define LCD_RIGHT_MARGIN 67
#define LCD_LEFT_MARGIN 40
#define LCD_HSYNC_LEN 31

#define LCD_UPPER_MARGIN 25
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1

#elif defined(CONFIG_FB_S3C2410_VGA1024768)
#define LCD_WIDTH 1024
#define LCD_HEIGHT 768
#define LCD_PIXCLOCK 80000

#define LCD_RIGHT_MARGIN 15
#define LCD_LEFT_MARGIN 199
#define LCD_HSYNC_LEN 15

#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 1
#define LCD_VSYNC_LEN 1
#define LCD_CON5 (S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_HWSWP)

#elif defined(CONFIG_FB_S3C2410_T320240)
#define LCD_WIDTH 320
#define LCD_HEIGHT 240
#define LCD_PIXCLOCK 80000

#define LCD_RIGHT_MARGIN 24
#define LCD_LEFT_MARGIN 28
#define LCD_HSYNC_LEN 42

#define LCD_UPPER_MARGIN 6
#define LCD_LOWER_MARGIN 2
#define LCD_VSYNC_LEN 12

#endif




hi mocugo,
which line from above did you edit?? please reply.. :)

mocugo
Hi Krish,

#if defined(CONFIG_FB_S3C2410_N240320)

#define LCD_WIDTH 240
#define LCD_HEIGHT 320
#define LCD_PIXCLOCK 100000

#define LCD_RIGHT_MARGIN 36
#define LCD_LEFT_MARGIN 19
#define LCD_HSYNC_LEN 5

#define LCD_UPPER_MARGIN 1
#define LCD_LOWER_MARGIN 5
#define LCD_VSYNC_LEN 1

I changed that grup and select N35 type at configuration before compiling.
So, it isn't suitable for N35 anymore but compatible with Hiteg 3.5" :) I
found the margin values experimentally.