Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD1963 problem #138

Closed
notro opened this issue Jul 30, 2014 · 27 comments
Closed

SSD1963 problem #138

notro opened this issue Jul 30, 2014 · 27 comments

Comments

@notro
Copy link
Owner

notro commented Jul 30, 2014

Hi notro,

I connected PRI with display( http://www.ebay.com/itm/4-3-TFT-LCD-Module-Display-Touch-Panel-Screen-PCB-Adapter-Build-in-SSD1963-/400556699371?pt=LH_DefaultDomain_0&hash=item5d430a2eeb ) and have problem.
If you have a time help me please.

connected as
LCD -> RaspberryPI

RST -> GPIO29
RS/DC -> GPIO2
WR -> GPIO31
RD -> 3.3V
LED_A -> 3.3V
CS -> GND
db00 -> GPIO11
db01 -> GPIO9
db02 -> GPIO10
db03 -> GPIO22
db04 -> GPIO27
db05 -> GPIO17
db06 -> GPIO4
db07 -> GPIO3
db08 -> GPIO7
db09 -> GPIO8
db10 -> GPIO25
db11 -> GPIO24
db12 -> GPIO23
db13 -> GPIO18
db14 -> GPIO14
db15 -> GPIO15

When I loaded:
sudo modprobe --first-time fbtft_device name=flexpfb debug=3 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15 rotate=0
tft display lights for one second then goes blank

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx
xauth: timeout in locking authority file /home/pi/.Xauthority

X.Org X Server 1.12.4
Release Date: 2012-08-27
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.2.0-2-mx5 armv7l Debian
Current Operating System: Linux raspberrypi 3.12.21+ #1 PREEMPT Sat Jun 14 12:01:42 CEST 2014 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1776 bcm2708_fb.fbheight=952 bcm2708.boardrev=0xe bcm2708.serial=0xf38d989e smsc95xx.macaddr=B8:27:EB:8D:98:9E sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait
Build Date: 18 December 2013 05:20:52PM
xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau jcristau@debian.org)
Current version of pixman: 0.29.3
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Wed Jul 30 14:04:03 2014
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
FATAL: Module g2d_23 not found.
No protocol specified

Solution:
Disable option in /usr/share/X11/xorg.conf.d/99-fbturbo.conf
"#"Option "fbdev" "/dev/fb0"
Did not help

@notro
Copy link
Owner Author

notro commented Jul 30, 2014

You are missing the init sequence. See #58 for examples

@Stml89
Copy link

Stml89 commented Jul 30, 2014

And when I use RPi console:
pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 startx
My display ( benq which connected with RPi via hdmi ), goes blank with white "-" in left-top corner

@Stml89
Copy link

Stml89 commented Jul 30, 2014

Ok, step by step:

  1. I connected RPi with display (see in first message)
  2. wiki -> install
  3. set up like in issues/58 for 4.3 display
    sudo modprobe --first-time flexfb width=480 height=272 buswidth=16 init=-1,0xE2,0x2d,0x02,0x04,-1,0xE0,0x01,-2,1,-1,0xE0,0x03,-2,5,-1,0x01,-2,5,-1,0xE6,0x00,0xff,0xbe,-1,0xB0,0x20,0x00,0x01,0xDF,0x01,0x0F,0x00,-2,5,-1,0xB4,0x02,0x13,0x00,0x2B,0x0A,0x00,0x08,0x00,-1,0xB6,0x01,0x20,0x00,0x0C,0x0A,0x00,0x04,-1,0x36,0x00,-1,0xF0,0x03,-2,5,-1,0x29,-1,0xBE,0x06,0xf0,0x01,0xf0,0x00,0x00,-1,0xd0,0x0d,-1,0xB8,0x00,0x01,-1,0xBA,0x00,-3
    sudo modprobe --first-time fbtft_device name=flexpfb debug=3 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15 rotate=0
  4. wiki -> test

@notro
Copy link
Owner Author

notro commented Jul 30, 2014

Most displays are white when not initialized and turn black when the driver is loaded.
The easiest way to test the display is to move the console: con2fbmap 1 1
When I had problems with a 16-bit databus display, I made a python script that helped me hunt down two swapped databus lines: https://github.com/notro/fbtft/wiki/Troubleshooting#wiring

@jamesdownsbell
Copy link

Hi stml89,
I'm running the same screen on my pi, have you tried set the screen as a boot console ??
That way you can check the screen is working without using start x.
Also what image are you using as your os ? I recommend you use notro's master image as long as you don't have a pi B+, because there is an issue with wget and certificates at the moment.

@Stml89
Copy link

Stml89 commented Jul 31, 2014

Hi notro and jamesdownsbell,
When I input "con2fbmap 1 1" -- nothing heppend
your script writing: all signals -1

https://www.dropbox.com/s/fo1428em5pq0exx/VIDEO0004.mp4
it's happening when I input: sudo modprobe --first-time fbtft_device name=flexpfb debug=3 gpios=reset:29,dc:2,wr:31...................

startx have you tried set the screen as a boot console
No, I don't know how do it

Also what image are you using as your os?
I did only rpi-update
I using:
pi@raspberrypi ~ $ cat /etc/debian_version
7.6
pi@raspberrypi ~ $ cat /etc/issue.net
Raspbian GNU/Linux 7
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.12.21+ #1 PREEMPT Sat Jun 14 12:01:42 CEST 2014 armv6l GNU/Linux

let me know if you want know more.
Many Thanks

@jamesdownsbell
Copy link

Hey stml89,
I would add the screen to your modules typing :
Sudo nano /etc/modules , and then add
flexfb width=480 height=272 buswidth=16 init=-1,0xE2,0x2d,0x02,0x04,-1,0xE0,0x01,-2,1,-1,0xE0,0x03,-2,5,-1,0x01,-2,5,-1,0xE6,0x00,0xff,0xbe,-1,0xB0,0x20,0x00,0x01,0xDF,0x01,0x0F,0x00,-2,5,-1,0xB4,0x02,0x13,0x00,0x2B,0x0A,0x00,0x08,0x00,-1,0xB6,0x01,0x20,0x00,0x0C,0x0A,0x00,0x04,-1,0x36,0x00,-1,0xF0,0x03,-2,5,-1,0x29,-1,0xBE,0x06,0xf0,0x01,0xf0,0x00,0x00,-1,0xd0,0x0d,-1,0xB8,0x00,0x01,-1,0xBA,0x00,-3
fbtft_device name=flexpfb debug=3 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15 rotate=0
Then you will need to edit your boot/cmdline.txt by typing :
Sudo nano /boot/cmdline.txt ,
then scroll to the very end of the line of text and add :
fbcon=map:10 fbcon= font:VGA8x8
Ctrl x to save it then : sudo reboot

Edit : I just watched the video ,it does look like the screen is starting, what is dmesg putting out ?

@Stml89
Copy link

Stml89 commented Jul 31, 2014

Hi jamesdownsbell,
Thanks for the quick reply.

Now when I starting Notro's script:
pi@raspberrypi ~ $ python display.py
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
pass
Move probe to reset:
Traceback (most recent call last):
File "display.py", line 121, in
main(sys.argv[1:])
File "display.py", line 18, in main
writef("/sys/class/gpio/export", "%s" % PROBE_GPIO)
File "display.py", line 63, in writef
with open(file, 'w') as f: f.write(val)
IOError: [Errno 16] Device or resource busy

@jamesdownsbell
Copy link

Hi stml89,
I'm happy to help, but I will warn you I consider myself a noob 👍
I'm not sure about the script you are running ? But I'm sure someone with more knowledge than me will be along shortly to enlighten both of us lol.
It seems as though it's trying to load a driver that is already loaded ? Are you getting anything on the screen ?
If you have another sd this image notro made has everything pre configured just enter the commands above and you should be ok.
http://tronnes.org/downloads/2014-06-20-wheezy-raspbian-2014-07-25-fbtft-master-firmware.zip

@Stml89
Copy link

Stml89 commented Aug 1, 2014

Hi,

what is dmesg putting out ?
.....................
[ 13.687819] fbtft_device: SPI devices registered:
[ 13.698145] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00
[ 13.709695] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00
[ 13.726028] fbtft_device: 'fb' Platform devices registered:
[ 13.750332] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 13.766548] flexfb flexpfb.0: fbtft_request_gpios: 'reset' = GPIO29
[ 13.790027] flexfb flexpfb.0: fbtft_request_gpios: 'dc' = GPIO2
[ 13.802624] flexfb flexpfb.0: fbtft_request_gpios: 'wr' = GPIO31
[ 13.813808] flexfb flexpfb.0: fbtft_request_gpios: 'db00' = GPIO11
[ 13.824941] flexfb flexpfb.0: fbtft_request_gpios: 'db01' = GPIO9
[ 13.835949] flexfb flexpfb.0: fbtft_request_gpios: 'db02' = GPIO10
[ 13.847027] flexfb flexpfb.0: fbtft_request_gpios: 'db03' = GPIO22
[ 13.857900] flexfb flexpfb.0: fbtft_request_gpios: 'db04' = GPIO27
[ 13.868713] flexfb flexpfb.0: fbtft_request_gpios: 'db05' = GPIO17
[ 13.879381] flexfb flexpfb.0: fbtft_request_gpios: 'db06' = GPIO4
[ 13.889677] flexfb flexpfb.0: fbtft_request_gpios: 'db07' = GPIO3
[ 13.900042] flexfb flexpfb.0: fbtft_request_gpios: 'db08' = GPIO7
[ 13.910310] flexfb flexpfb.0: fbtft_request_gpios: 'db09' = GPIO8
[ 13.920438] flexfb flexpfb.0: fbtft_request_gpios: 'db10' = GPIO25
[ 13.940298] flexfb flexpfb.0: fbtft_request_gpios: 'db11' = GPIO24
[ 13.956040] flexfb flexpfb.0: fbtft_request_gpios: 'db12' = GPIO23
[ 13.969895] flexfb flexpfb.0: fbtft_request_gpios: 'db13' = GPIO18
[ 13.980216] flexfb flexpfb.0: fbtft_request_gpios: 'db14' = GPIO14
[ 13.990163] flexfb flexpfb.0: fbtft_request_gpios: 'db15' = GPIO15
[ 14.000033] flexfb flexpfb.0: flexfb_verify_gpios_db()
[ 14.008726] flexfb flexpfb.0: fbtft_init_display()
[ 14.017012] flexfb flexpfb.0: fbtft_reset()
[ 14.144488] flexfb flexpfb.0: init: write(0xE2) 0x2D 0x02 0x04
[ 14.153786] flexfb flexpfb.0: init: write(0xE0) 0x01
[ 14.162164] flexfb flexpfb.0: init: mdelay(1)
[ 14.170671] flexfb flexpfb.0: init: write(0xE0) 0x03
[ 14.179011] flexfb flexpfb.0: init: mdelay(5)
[ 14.191504] flexfb flexpfb.0: init: write(0x01)
[ 14.199334] flexfb flexpfb.0: init: mdelay(5)
[ 14.211838] flexfb flexpfb.0: init: write(0xE6) 0x00 0xFF 0xBE
[ 14.220904] flexfb flexpfb.0: init: write(0xB0) 0x20 0x00 0x01 0xDF 0x01 0x0F 0x00
[ 14.231785] flexfb flexpfb.0: init: mdelay(5)
[ 14.244197] flexfb flexpfb.0: init: write(0xB4) 0x02 0x13 0x00 0x2B 0x0A 0x00 0x08 0x00
[ 14.255435] flexfb flexpfb.0: init: write(0xB6) 0x01 0x20 0x00 0x0C 0x0A 0x00 0x04
[ 14.275602] flexfb flexpfb.0: init: write(0x36) 0x00
[ 14.292937] flexfb flexpfb.0: init: write(0xF0) 0x03
[ 14.301326] flexfb flexpfb.0: init: mdelay(5)
[ 14.313931] flexfb flexpfb.0: init: write(0x29)
[ 14.321555] flexfb flexpfb.0: init: write(0xBE) 0x06 0xF0 0x01 0xF0 0x00 0x00
[ 14.331923] flexfb flexpfb.0: init: write(0xD0) 0x0D
[ 14.339926] flexfb flexpfb.0: init: write(0xB8) 0x00 0x01
[ 14.348355] flexfb flexpfb.0: init: write(0xBA) 0x00
[ 14.432085] flexfb flexpfb.0: Display update: 3363 kB/s (75.810 ms), fps=0 (0.000 ms)
[ 14.443107] flexfb flexpfb.0: fbtft_register_backlight()
[ 14.451423] flexfb flexpfb.0: fbtft_register_backlight(): led pin not set, exiting.
[ 14.466120] graphics fb1: flexfb frame buffer, 480x272, 255 KiB video memory, 4 KiB DMA buffer memory, fps=20
[ 14.480332] fbtft_device: GPIOS used by 'flexpfb':
[ 14.488460] fbtft_device: 'reset' = GPIO29
[ 14.498417] fbtft_device: 'dc' = GPIO2
[ 14.505398] fbtft_device: 'wr' = GPIO31
[ 14.512476] fbtft_device: 'db00' = GPIO11
[ 14.519622] fbtft_device: 'db01' = GPIO9
[ 14.526814] fbtft_device: 'db02' = GPIO10
[ 14.533935] fbtft_device: 'db03' = GPIO22
[ 14.541036] fbtft_device: 'db04' = GPIO27
[ 14.548155] fbtft_device: 'db05' = GPIO17
[ 14.555157] fbtft_device: 'db06' = GPIO4
[ 14.562164] fbtft_device: 'db07' = GPIO3
[ 14.569082] fbtft_device: 'db08' = GPIO7
[ 14.576103] fbtft_device: 'db09' = GPIO8
[ 14.583055] fbtft_device: 'db10' = GPIO25
[ 14.590123] fbtft_device: 'db11' = GPIO24
[ 14.597199] fbtft_device: 'db12' = GPIO23
[ 14.604124] fbtft_device: 'db13' = GPIO18
[ 14.611230] fbtft_device: 'db14' = GPIO14
[ 14.618281] fbtft_device: 'db15' = GPIO15
[ 14.625320] fbtft_device: 'fb' Platform devices registered:
[ 14.633841] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 14.642185] fbtft_device: flexpfb id=0 pdata? yes
[ 19.964165] FAT-fs (mmcblk0p5): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 23.123747] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 24.775456] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 26.268924] bcm2835-cpufreq: switching to governor ondemand
[ 26.268957] bcm2835-cpufreq: switching to governor ondemand

Are you getting anything on the screen?
No, only flashing (once) screen.
Unfortunately I have only one cd card..
Do you think I could reinstall the OS ( from your link )?

@jamesdownsbell
Copy link

Hi smtl89,
It looks like everything is ok as far as the driver loading. I'm not sure what the issue is with your screen 👎 lol
Do you think I could reinstall the OS ( from your link )?

Yes to be honest that's what I would do. Just flash the sd with the image in the link I posted, and enter the commands in the post above

Edit :
Out of curiosity is the screen still staying black ? And are you using fbcp ?

@Stml89
Copy link

Stml89 commented Aug 1, 2014

Out of curiosity is the screen still staying black ?
Yes
And are you using fbcp?
I'm not sure..
I am New to Linux.. :)

@Stml89
Copy link

Stml89 commented Aug 1, 2014

Hi jamesdownsbell
I installed notro's build.
when I input: FRAMEBUFFER=/dev/fb1 startx, on my main display i see blank screen with an underscore in the top left corner.

Edit: display 4.3" lights gray color or it's background color, display flashes about every 2 min.
imag0745

@mwilliams03
Copy link

Another quick way to test is to use fbi image viewer.
Install;
sudo apt-get install fbi

download an image;
wget http://ozzmaker.com/Raspi_Logo.png

display to /dev/fb1;
sudo fbi -noverbose -T 1 -a -d /dev/fb1 Raspi_Logo.png

@jamesdownsbell
Copy link

Hi stml89,
Looks like your nearly there 👍
I had an issue that was almost identical to yours ,It turned out to be a poorly fitting DuPont cable.
Have you added it to your modules ? And edited the boot/cmdline.txt ?
Also mwilliams has made a good point you could try fbi to see if the image gets through to the screen .
Data is definitely getting to the screen thats why you are seeing the underscore.

@Stml89
Copy link

Stml89 commented Aug 4, 2014

Hi jamesdownsbell,
Have you added it to your modules ? And edited the boot/cmdline.txt?
yes
I changed buswidth to regwidth( how you write ), I now have a black screen with a white screen.
dmesg shows this:
graphics fb1: flexfb frame buffer, 480x272, 255 KiB video memory, 4 KiB DMA buffer memory, fps=33
when I input: FRAMEBUFFER=/dev/fb1 startx:
I see white flashing screen

Hi mwilliams03,
I see white flashing( once ) screen

i'm really upset..
thanks for your help!

@jamesdownsbell
Copy link

Hi stml89,
I think you need to change regwidth back to buswidth.
Regwidth is for spi and buswidth is for parallel connection.
What are you using to power you pi ?.
Have you tried another cable or power source ?.
I only ask because I had to change the cable I was using. When I was booting the pi would lock up.
And dmesg looks as it should the driver is loading 👍
We will get there in the end ;)

@notro
Copy link
Owner Author

notro commented Aug 4, 2014

regwidth is the bit width of the register. For SSD1963 this is 16.
buswidth is the bit width of the databus. For SPI this is 8. For parallel it is 8 or 16.

@jamesdownsbell
Copy link

There you go lol :)
I knew it was something like that 👍

@Stml89
Copy link

Stml89 commented Aug 4, 2014

when I changed regwidth to buswidth, display flashes once, at RPi initialization
What are you using to power you pi?.
2A
Have you tried another cable or power source?
yes, I have. I'll try to change it. I 'll write to you.

Сontents of my files, could you please check it?

  1. /etc/modules
    flexfb width=480 height=72 buswidth=16 init=-1,0xE2,0x2d,0x02,0x04,-1,0xE0,0x01,-2,1,-1,0xE0,0x03,-2,5,-1,0x01,-2,5,-1,0xE6,0x00,0xff,0xbe,-1,0xB0,0x20,0x00,0x01,0xDF,0x01,0x0F,0x00,-2,5,-1,0xB4,0x02,0x13,0x00,0x2B,0x0A,0x00,0x08,0x00,-1,0xB6,0x01,0x20,0x00,0x0C,0x0A,0x00,0x04,-1,0x36,0x00,-1,0xF0,0x03,-2,5,-1,0x29,-1,0xBE,0x06,0xf0,0x01,0xf0,0x00,0x00,-1,0xd0,0x0d,-1,0xB8,0x00,0x01,-1,0xBA,0x00,-3
    fbtft_device name=flexpfb debug=3 gpios=reset:29,dc:2,wr:31,db00:11,db01:9,db02:10,db03:22,db04:27,db05:17,db06:4,db07:3,db08:7,db09:8,db10:25,db11:24,db12:23,db13:18,db14:14,db15:15 rotate=0 verbose=0 speed=32000000 fps=30 txbuflen=0
  2. /usr/share/X11/xorg.conf.d/99-fbturbo.conf
    Section "Device"
    Identifier "Allwinner A10/A13 FBDEV"
    Driver "fbturbo"

    Option "fbdev" "/dev/fb1"

    Option "SwapbuffersWait" "true"
  3. /boot/cmdline.txt
    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
    fbcon=map:10 fbcon= font:VGA8x8
  4. Connected like I wrote.
  5. con2fbmap 1 1 - nothing happens

Very sorry for my stupid and noob questions...
Many thanks!!

@jamesdownsbell
Copy link

Hi stml89,
When I changed regwidth to buswidth, display flashes once, at RPi initialization.
Does the screen stay dark after it flashes ?
flexfb width=480 height=72 buswidth=16 is a typo that should be flexfb width=480 height=272 buswidth=16 :)
But the rest of your code looks ok.

@Stml89
Copy link

Stml89 commented Aug 6, 2014

Hi jamesdownsbell,
Does the screen stay dark after it flashes?
yes.
I tried to use another cable or power source: doesn't help.
When I try FRAMEBUFFER=/dev/fb1 startx:
https://www.dropbox.com/s/53k4sx2r94muxru/VIDEO0008.mp4
p.s. Display is the last weak point...

@jamesdownsbell
Copy link

Hi stml89,
You should have to start x on the screen if it is set as boot console.
See here https://m.youtube.com/watch?v=a0vJ_G5dXSU
That's my 4.3" running notro's raspbian image from the link I gave you .
When running notro's image hdmi output stops once the module is loaded, unless you use fbcp to copy what's on the hdmi .

@Stml89
Copy link

Stml89 commented Aug 6, 2014

Thanks for the quick reply.
At the moment when your display starts, my display light flashes once.
Could you please write, what did you do after installation notro's build?

@jamesdownsbell
Copy link

Hi stml89,
I must have missed this. Did you get it going in the end ?

@Stml89
Copy link

Stml89 commented Aug 20, 2014

Hi jamesdownsbell,
Unfortunately no.. =(
I don't know what is usefull to know to troubleshoot my problem.
Perhabs, my raspberry screen is broken.
I don't know, but I cant to start Notro's script to check either miswired or bad connections.
Many Thanks!

@notro
Copy link
Owner Author

notro commented Nov 24, 2014

Closing issue since there has been no activity for more than 2 months. Reopen if needed.

@notro notro closed this as completed Nov 24, 2014
@notro notro mentioned this issue Oct 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants