Need help to drive an lcd RGB 24 bits screen

Started by pawnies20, April 12, 2015, 11:37:10 PM

Previous topic - Next topic

pawnies20

#15
Thank you Dave.
dEFAUT MOSE IS HSYNC+VSYNC+DE Mode (default)

I'm usind debian and custom it with kernel options.

When you say you buil a custom that run any display, what did you do exept for the fex?

yes i will debug boot with UART CABLE ant tell you result.
i m already  using fex personnal parameters that are read on boot.

After fex changes when i reboot board, connected with vnc, resolution is change: x= 320 and y= 240

Many thanx dave

pawnies20

This is the result
I don't know if script.bin aparemeters are really read.




reading script.bin
[info] Loading kernel module lcd.
Starting X display manager: slim.
[....] /etc/environment has been deprecated for locale information; use /etc/def[warnlocale for LC_ALL="en_US.utf8" instead ... (warning).
[....] Starting periodic command scheduler: cron<4>Warning: this sunxi disp driver will see significant redesign.
[   15.731588] Warning: this sunxi disp driver will see significant redesign.
<4>Applications using /dev/disp directly will break.
[   15.757734] Applications using /dev/disp directly will break.
[ ok <4>For more information visit: http://linux-sunxi.org/Sunxi_disp_driver
[   15.782350] For more information visit: http://linux-sunxi.org/Sunxi_disp_driver
<4>[DISP] layer allocated: 0,101
[   15.805377] [DISP] layer allocated: 0,101
.
Mali: [   15.907759] Mali: permit MALI_IOC_MEM_MAP_EXT ioctl for framebuffer (paddr=0x49000000, size=16777216)
permit MALI_IOC_MEM_MAP_EXT ioctl for framebuffer (paddr=0x49000000, size=16777216)
[....] Starting system message bus: dbus<6>mali: use config clk_div 4
[   15.950858] mali: use config clk_div 4
<6>mali: clk_div 4
[   15.957387] mali: clk_div 4
Mali: [   15.961287] Mali: mali clock set completed, clock is  240000000 Hz
mali clock set completed, clock is  240000000 Hz
<6>mali: use config clk_div 4
[   15.975909] mali: use config clk_div 4
<6>mali: clk_div 4
[   15.981927] mali: clk_div 4
Mali: [   15.985356] Mali: mali clock set completed, clock is  240000000 Hz
mali clock set completed, clock is  240000000 Hz
Mali: [   16.004380] Mali: Mali device driver loaded
Mali device driver loaded
<6>[drm] Initialized drm 1.1.0 20060810
[   16.283689] [drm] Initialized drm 1.1.0 20060810
<6>Mali DRM initialize, driver name: mali_drm, version 2.1
[   16.308597] Mali DRM initialize, driver name: mali_drm, version 2.1
<6>[drm] Initialized mali_drm 2.1.1 20101111 on minor 0
[   16.356082] [drm] Initialized mali_drm 2.1.1 20101111 on minor 0
<6>Mali DRM initialize, driver name: mali_drm, version 2.1
[   16.378939] Mali DRM initialize, driver name: mali_drm, version 2.1
[ ok <6>[drm] Initialized mali_drm 2.1.1 20101111 on minor 1
[   16.400352] [drm] Initialized mali_drm 2.1.1 20101111 on minor 1
UMP<2>: [   16.423018] UMP<2>: New session opened
New session opened

dave-at-axon

What about the initial uboot messages? What do they show?

It should configure the LCD and show a boot image of some sort. It does on the Android build.

Are you compiling the FEX file into BIN?

pawnies20

This is the message under:
script.bin is read.
Yes , sure, i'm compiling fex to bin

Dave, do you use:lcd0_panel_cfg.c when compiling your kernel


U-Boot 2014.04-10675-g44b53fd (May 23 2014 - 13:02:55) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Board: A10-OLinuXino-Lime
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   emac
Hit any key to stop autoboot:  0
reading uEnv.txt
104 bytes read in 17 ms (5.9 KiB/s)
Loaded environment from uEnv.txt
reading boot.scr
337 bytes read in 16 ms (20.5 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading script.bin
52840 bytes read in 28 ms (1.8 MiB/s)
reading uImage

pawnies20

Page 58 in doc behind we can see a boot sequence.

http://www.texim-europe.com/promotion/402/ili9322%20driver%20datasheet_te.pdf

This can be the problem.

Dave can you explain me how you make your lcd's work?

Thank you

dave-at-axon

I build Android so different to how Linux runs the script as far as I can tell. The FEX file takes care of configuring the LCD display.

My LCD is straight RGB and DE and no SPI so I don't have anything to worry about in configuration etc. It just works.

Do you have a high bandwidth scope available to check the DCLK output to see if this is running at your 6MHZ you set in the script?

pawnies20

Ok you configure only fex and go, it works.
Why do you said you make a special android configuration that work with all lcd?

dave-at-axon

It can work with any LCD up to the limits of the video driver.

What I mean is that by custom building the OS I can configure it to drive anything by changing the FEX and the in some cases, underlying Android OS.

Is there a reason you need to use the 320x240 display? Can you use something with higher resolution such as a 4.3 with 800x480 and pure RGB interface? Or how about a 5". I know for certain that the Newhaven 5" works with the A20 and so does the touch for it. It uses an FT5x driver for touch and there is a Linux and Android for this. I have it working with my Android build. If you need the 7" version it is a drop in for the 5" settings.

pawnies20

#23
OK
I can see olimex's lcd use only de and clk to drive their screen from their boards
Do you cable hsync and vsync to or hour newhaven works without hsync and vsync?
a nother question: can you give me newhaven model you use and hat worked fine?

Thank you

https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-4.3TS/resources/LCD-OLINUXINO-4.3TS_sch.pdf
https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-7/resources/LCD-OLINUXINO-7TS_sch.pdf
https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-10/resources/LCD-OLINUXINO-10TS_sch.pdf

dave-at-axon

7" LCD is this one:

NHD-7.0-800480EF-ATXV#-CTP

5" is this one:

NHD-5.0-800480TF-ATXL#-CTP

I also use the 5" one with a GHI Electronics G120 and G400 based boards running .NET Microframework. Awesome development system and support but Windows hosted only for the time being.

dave-at-axon

You must have had to make a custom board to interface to your LCD.

Can you post a PDF of the schematic for me? If you don't want to post publicly, PM me and I will send you my email address.

I'd like to see how you have it connected. It should just work.

pawnies20

Thank you.

reset->1 (3.3V)
data 0-23->LCD_D0-LCD_D23 (i'have respecting order PD0-PD23)
hsync->LCD_Hsync (PD26)
vsync->LCD_Vsync PD27
dotclk->LCD_CLK PD24
vdd->3.3V
den->LCD_DE PD25
gnd->GND

On olimex's lcd schemas, i can see they have connected Vsync and Hsync to 1 level voltage ....
-What do you think of that?
https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-4.3TS/resources/LCD-OLINUXINO-4.3TS_sch.pdf
https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-7/resources/LCD-OLINUXINO-7TS_sch.pdf
https://www.olimex.com/Products/OLinuXino/LCD/LCD-OLinuXino-10/resources/LCD-OLINUXINO-10TS_sch.pdf

-Second strange thing:
In datasheet of my lcd timing are stange:
http://www.rct.ru/pdf/lcd/SAT040HS54DHY0-A0_20140506.pdf
vertical period = horizontal diplay + back porch + front porch + pulse width = 240+18+4+1=263.
in document vertical period is 262 ????


Thank you

dave-at-axon

Can you show me a picture of your interface and how you connected it to the A20? Because of the timing any prototyping which does not consider proper ground around the DOTCLK will suffer from issues.

Do you see anything on the LCD at all? Like an all white display or coloured lines etc.

How are you driving the LED backlight? What circuit are you using for this?

Better if I can see some images of your setup.

On the Olimex schematics the resistors are marked as NA which means they are not fitted. They are there to support pullup but not actually used in the final build.

On your vertical timing, most registers are the value -1 so 262 would be the value to go in the register.

pawnies20

hI.
Not simple.
I ve just understood that i mist connect spi to parameter register.
Imust too respect boot sequence...

I don't know if i can do that

dave-at-axon

Better you find an RGB interface LCD instead and save all your trouble.

Sometimes trying to do things the cheap way is not worth the hassles it often causes.