notro / rpi-firmware

Deprecated: Raspberry Pi kernel and firmware with support for FBTFT
Other
94 stars 32 forks source link

Waveshare 3.2inch rpi lcd for the Raspberry #6

Open videobuff opened 10 years ago

videobuff commented 10 years ago

Is there any support for this display coming up ? http://www.wvshare.com/product/3.2inch-RPi-LCD-B.htm I have btw the previous version (without the B). Erik

notro commented 10 years ago

It doesn't say which LCD controller the display uses on that page.

I see the display comes with an image. Isn't that good enough? If they use FBTFT on that image, see if you find a module starting with _fb_ in /sys/module_

LCD shields for the Pi is popping up all over the place now. Seven months ago it was only a handful: https://github.com/notro/fbtft/wiki/Raspberry-Pi-Display-shield-comparison

ghost commented 10 years ago

I have also the old one, but wasnt succesfull getting it to work - to be honest, havnt spent a lot of time. Is it a ssd1289, at least the driver is named that way, probably I have used wrong kernel parameters for the module.

BTW, this is what the manufacturer supplied:

PIN NO. SYMBOL DESCRIPTION 1, 17 3.3V Power positive (3.3V power input) 2, 4 5V Power positive (5V power input) 11 TP_IRQ Touch screen interrupt, low level while the touch screen detects touching 12 KEY1 Key 13 KEY2 Key 15 KEY3 Key 19 LCD_SI/TP_SI SPI data input of LCD/touch screen 21 LCD_SO/TP_SO SPI data output of LCD/touch screen 23 LCD_SCK/TP_SCK SPI clock of LCD/touch screen 24 LCD_CS LCD chip selection, low active 26 TP_CS Touch screen chip selection, low active

Any help whould be appreciated. Thx, Florian

notro commented 10 years ago

Since there is no DC/RS pin I assume it's using the 3-wire SPI mode, which on this controller means 9-bit SPI. From the top of my head:

sudo modprobe fbtft_device custom name=fb_ssd1289 speed=8000000 buswidth=9 width=XX height=XX

If the width/height of your display differs from 240x320, you have to provide your own init= sequence. The default one assumes this. Panels differ, so you might have to provide one anyway.

https://github.com/notro/fbtft/wiki/fbtft_device

ghost commented 10 years ago

Didnt work, but I have done a little more research on these piece of hardware. It is an exact copy of valdodov's circuit and was delivered with the precompiled kernel/modules/configs from his web site.

There was already a ticket in Mai #115 on that matter, is there any chance to get it working ?

Thx, Florian

balkian commented 10 years ago

I can't get it to work either. Unfortunately, my display didn't come with an image.

Cheers.

notro commented 10 years ago

It is an exact copy of valdodov's circuit ... is there any chance to get it working ?

No plans to support that circuit.

that-scientist commented 9 years ago

I found a custom raspberrian image for this display on a dutch website here: http://eckstein-shop.de/Plug-and-Play-32-inch-Touch-Screen-TFT-LCD-for-Raspberry-Pi-A-/-B-/-B-_1 NOTE: the archive is password protected (dick move). I've posted on their site to ask for the password. UPDATE: password for archive is "eckstein", will now see if this is the image we seek.

I also emailed the manufacturer, will post again if either of these leads work.

that-scientist commented 9 years ago

Manufacturer refuses to offer any help:

"It seems like the picture is ours.........

If the reseller bought the LCD from us then resell to you, then they must have the CD, as we have CD for each of this LCD screen. We don't have links for download, all the contents for the LCD are contained in the CD, it should be the resellers problems who did not send the user guide CD to the package.

You can image that if all of the reseller, to whom we have already provided the CD for the products, then they don't send it to customers, then how can we provide the direct services to customers?

Thank you for your understand. Johanna Liang ~O(∩_∩)O~
Waveshare International Limited Rm 813, Dynamic World Building, Zhenhua Rd, Futian District, Shenzhen, China Tel:86-755-83040832 FAX:86-755-83042572 QQ: 2355861372 skype: wvshare E-mail: sales@wvshare.com Paypal Account: paypal@wvshare.com Web:www.wvshare.com"

ant42 commented 9 years ago

Any news on this topic? I am currently also using one of those displays with the image supplied by eckstein. Although this seems to work fine so far, I would prefer to switch to a more open solution (for more recent kernels, etc).

balkian commented 9 years ago

I copied configuration of the module from that image. It should work but I haven't had the time to try it yet:

https://gist.github.com/balkian/33835d7be3075c023aad

imaginal commented 9 years ago

I also have Waveshare 3.2inch RPi LCD (B) V3 connected to Raspberry Pi Model B+ http://www.wvshare.com/product/3.2inch-RPi-LCD-B.htm http://www.amazon.com/Waveshare-Raspberry-Resistive-Interface-Rapsberry-pi/dp/B00N0SNVQE

I have found that the initialization string is very close to fb_ili9340 driver, so after few days of testing I found this configuration is pretty stable

1) Use FBTFT drivers built into the kernel

sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update
sudo reboot

2) After rebooting, check that SPI was created

# dmesg | grep spi
 Linux version 3.12.25+ (pi@raspi2) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #1 PREEMPT Sat Aug 2 19:08:33 CEST 2014
 bcm2708_spi bcm2708_spi.0: DMA channel 2 at address 0xf2007200 with irq 77
 bcm2708_spi bcm2708_spi.0: DMA channel 4 at address 0xf2007400 with irq 20
 bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
 bcm2708_spi bcm2708_spi.0: SPI Controller running in dma mode

3) Add to /boot/cmdline.txt (in one line)

fbtft_device.custom
fbtft_device.name=fb_ili9340
fbtft_device.gpios=dc:22,reset:27
fbtft_device.bgr=1
fbtft_device.speed=48000000

4) To enable console on boot add to /boot/cmdline.txt

fbcon=map:10
fbcon=font:ProFont6x11
logo.nologo

5) Also may be useful to add

dma.dmachans=0x7f35
console=tty1
consoleblank=0
fbtft_device.fps=50
fbtft_device.rotate=270
Talabo commented 9 years ago

I've managed to make this work. But has anyone figured out how to make Waveshare 3.2inch RPi LCD work in GUI (startx)? As long as I have a HDMI connected I can see the GUI from an extra screen.

imaginal commented 9 years ago

you want to use them separately or simultaneously? maybe fbcp will help https://github.com/notro/fbtft-spindle/wiki/FBTFT-image#fbcp---framebuffer-copy

Talabo commented 9 years ago

I treid fbcp. It copies the big screen (connected through HDMI) which is hanging, into the Waveshare 3.2inch RPi LCD (B) V3. So both screens seems like they hang.

But this is how it's to me.

Normally after making the Waveshare 3.2inch RPi LCD (B) V3-screen work, raspbian runs fine with the little screen. As I only boot into console/terminal. But if I'm going to GUI (startx) the tiny screen hangs.

While booting with an extra screen connected on the HDMI-plug. The extra screen hangs, and the tiny one works fine and mentioned.

When I do the "startx"-command, the HDMI-plugged screen is the one working good in GUI. While the tiny screen hangs.

I wanted to make it so that the tiny screen is standalone and possible to run into GUI (startx). I see the use of fbcp, but it's not for my use.

What I want to do, is to make the tiny screen run fine in GUI (startx). And I'm wondering if you have managed to do that :)

Than you for your time :)

Kingurus commented 9 years ago

I have a 3.2inch RPi LCD (B) V3 from waveshare. It came with their DVK512 which includes a CD with an SD image that makes X work on the LCD. Image is Linux raspberrypi 3.12.25+ with (I guess) their custom command: LCD32-SYS-SHOW-V3 which reboots with x on LCD.

Talabo commented 9 years ago

You say the Image is Linux raspberrypi 3.12.25+, so not raspbian customized?

Hmm, do you by any chance have the possibility to upload this anywhere?

Kingurus commented 9 years ago

It is too big to upload... It must be available somewhere already. Check this out : http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=89127

Talabo commented 9 years ago

Thank you! Found this link which have .pdf and the software. So no need for downloading a whole new image into the rasp. pi. Will try this when I have time.

The link: https://docviewer.yandex.com/?url=ya-disk-public%3A%2F%2F3pNBiwUGtdm6B7DR35RIh3ekGYjNeISzNKSlmqcvGds%3D&name=DVD_DVK512_CN_EN_Without_Image.rar&c=547779a0f2ac

faithoflifedev commented 9 years ago

I got my Waveshare 3.2inch LCD working great using the instructions above provided by "imaginal". I now want to be able to turn off the backlight. Has anyone been able to do this? Is the functionality supported?

andrealvarez commented 9 years ago

Does anyone know how can i turn off the backlight? for the Waveshare 3.2inch LCD

I have been googling everywhere and i cant seem to find it...

andrealvarez commented 9 years ago

Notro nevermind im going to buy adafruits one and return this chinese one... Thanks :)

lunarcms commented 9 years ago

Hiya all.

I have a WaveShare SpotPear V4 LCD with a Raspbian image (unfortunately with loads of excess baggage included, the image is just over 4GB).

I should be able to get it onto the web shortly (give me a few days), I also plan on stripping it back to a very minimal Raspbian with OpenBox and a few utils such as SSH if anybody is interested?

Jim

ayasystems commented 9 years ago

Touch working fine (/etc/modules)

snd-bcm2835 i2c-bcm2708
i2c-dev ads7846_device cs=1 speed=1000000 model=7846 x_min=200 x_max=3840 y_min=200 y_max=3760 x_plate_ohms=60 pressure_max=255 gpio_pendown=17 keep_vref_on=1 swap_xy=0

PathicEnyrgis commented 9 years ago

@lunarcms I am very interested, I received my waveshare today and need to use it for first test of my pi b+, I do not have an hdmi monitor.

3.5in rpi LCD (A). Current name of image on the disk: LCD35-14120 So from the instructions on the disc. I believe it is rasbian with display drivers. Now how bad is the bloatware?

I need to format the sd-noob card ( only 4gig card I have) Is it worth losing the noob software and images?

alpha-ninja commented 9 years ago

Could someone look into why drivers built into the kernel is the only way that seems to work?

gadget9503 commented 9 years ago

would love to make Kodi 14.1 work with this display have tried different configs but all give me some kind of error ie-can't find file, can't find dir, debends on xbmc-deb, no make etc, any help would be great.

Mike

alpha-ninja commented 9 years ago

Okay, I've fiddled around with this stuff. In /etc/modules I have: fbtft_device custom name=fb_ili9340 speed=48000000 gpios=dc:22,reset:27 bgr=1 rotate=270

I added to /boot/cmdline.txt: fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

The console on startup works just fine, but for some reason, I can't find out how to launch framebuffer applications on the tft display.

I tried su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx &", but that resulted in the tft display being cleared and X starting on the HDMI display.

Any ideas?

edit: ls /dev/ returns:

autofs           input         mem                 ram11   raw        tty12  tty25  tty38  tty50  tty63      vcs3
block            kmsg          mmcblk0             ram12   root       tty13  tty26  tty39  tty51  tty7       vcs4
btrfs-control    log           mmcblk0p1           ram13   shm        tty14  tty27  tty4   tty52  tty8       vcs5
bus              loop0         mmcblk0p2           ram14   snd        tty15  tty28  tty40  tty53  tty9       vcs6
cachefiles       loop1         net                 ram15   sndstat    tty16  tty29  tty41  tty54  ttyAMA0    vcsa
char             loop2         network_latency     ram2    spidev0.1  tty17  tty3   tty42  tty55  ttyprintk  vcsa1
console          loop3         network_throughput  ram3    stderr     tty18  tty30  tty43  tty56  uinput     vcsa2
cpu_dma_latency  loop4         null                ram4    stdin      tty19  tty31  tty44  tty57  urandom    vcsa3
disk             loop5         ppp                 ram5    stdout     tty2   tty32  tty45  tty58  vc-cma     vcsa4
*fb0*              loop6         ptmx                ram6    tty        tty20  tty33  tty46  tty59  vchiq      vcsa5
*fb1*              loop7         pts                 ram7    tty0       tty21  tty34  tty47  tty6   vc-mem     vcsa6
fd               loop-control  ram0                ram8    tty1       tty22  tty35  tty48  tty60  vcs        vcsm
full             MAKEDEV       ram1                ram9    tty10      tty23  tty36  tty49  tty61  vcs1       xconsole
fuse             mapper        ram10               random  tty11      tty24  tty37  tty5   tty62  vcs2       zero

edit: dmesg | grep -i fb returns:

[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0x10 bcm2708.serial=0x4be84e02 smsc95xx.macaddr=B8:27:EB:E8:4E:02 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
[    1.055686] bcm2708_gpio: bcm2708_gpio_probe c0633fb0
[    1.315312] BCM2708FB: allocated DMA memory 5bc00000
[    1.320487] BCM2708FB: allocated DMA channel 0 @ f2007000
[   12.586432] fbtft_device:  SPI devices registered:
[   12.606322] fbtft_device:      spidev spi0.0 500kHz 8 bits mode=0x00
[   12.621263] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[   12.640740] fbtft_device:  'fb' Platform devices registered:
[   12.658823] fbtft_device:      bcm2708_fb id=-1 pdata? no
[   12.671956] fbtft_device: Deleting spi0.0
[   12.686753] fbtft_device:  GPIOS used by 'fb_ili9340':
[   12.717899] fbtft_device:    'dc' = GPIO22
[   12.732129] fbtft_device:    'reset' = GPIO27
[   12.747740] fbtft_device:  SPI devices registered:
[   12.777630] fbtft_device:      spidev spi0.1 500kHz 8 bits mode=0x00
[   12.807621] fbtft_device:      fb_ili9340 spi0.0 48000kHz 8 bits mode=0x00
[   13.444948] graphics fb1: fb_ili9340 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 48 MHz
notro commented 9 years ago

If Raspian, you need to change fbdev option in /usr/share/X11/xorg.conf.d/99-fbturbo.conf

alpha-ninja commented 9 years ago

thanks @notro :)

bernardlv commented 9 years ago

"I should be able to get it onto the web shortly (give me a few days), I also plan on stripping it back to a very minimal Raspbian with OpenBox and a few utils such as SSH if anybody is interested?"

@lunarcms, that would be wonderful. I had a pretty rough time with setting up a 4" Waveshare display because I only had a 4 GB Micro SD and the manufacturer probably had expended all the available space. Have you set something like that up? I couldn't find drivers or a kernel to make the screen work. Doesn't feel right to have an outdated Raspbian (well, the GUI) with a load of junk installed.

EDIT: Wait, by "V4" did you mean 4 inch or is that unrelated, haha?

that-scientist commented 9 years ago

That would be super. I would like to use this for a touch screen tool, so a simple distro would help!

N

Sent from my iPhone

On Jan 15, 2015, at 9:02 AM, bernardlv notifications@github.com wrote:

"I should be able to get it onto the web shortly (give me a few days), I also plan on stripping it back to a very minimal Raspbian with OpenBox and a few utils such as SSH if anybody is interested?"

lunarcms, that would be wonderful. I had a pretty rough time with setting up a 4" Waveshare display because I only had a 4 GB Micro SD and the manufacturer probably had expended all the available space. Have you set something like that up? I couldn't find drivers or a kernel to make the screen work.

— Reply to this email directly or view it on GitHub.

lmgobaira commented 9 years ago

ordered this: got the waveshare 3.2 inch http://www.amazon.com/gp/product/B00LGOS00G/ref=oh_aui_detailpage_o06_s01?ie=UTF8&psc=1 amazon hosts image here https://s3.amazonaws.com/lcd32/LCD32-CN.rar

PLUR

gmnandhu commented 9 years ago

I recently bought the lcd from this site "https://www.crazypi.com/raspberry-pi-products/Raspberry-Pi-Accessories/32-TOUCH-DISPLAY-RASPBERRY-PI".I got a DVD which contain the image file.I am using a B+ board.I burned the image to sd card.But when i power on the board by plugging the display,LCD is completly blank,no backlight ?Please help.I connected a keyboard with raspberry pi through USB port.When i pressed caps lock in keyboard the caps lock light glowed in keyboard.So i think Pi is booting correctly.But LCD is blank.How to check wheather the problem is with SD card,Pi or LCD ?????

notro commented 9 years ago

Please contact the seller. They know their display and image.

CasperHedegaard commented 9 years ago

Maybe the images for the Odroid which supports the LCD can help?

http://www.hardkernel.com/main/products/prdt_info.php?g_code=G142060963922

Vineetsai commented 9 years ago

Any one has success with Waveshare 3.2inch V4 on Raspberry Pi 2 Model B? I tried with image on CD came with it, but no success. It just show Multi Colored Big Block on the screen that cover 90% of screen. And there no response from raspi at all.

Also Tried with Fresh new image of Raspbian 2015-2-16 and running: sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update sudo reboot

Get exact same Multi Colored block on initial screen, same as I get with Image from CD.

Any help?

gadget9503 commented 9 years ago

sounds like it is booting in hdmi mode.  try pluging a monitor in the hdmi port and rebooting.

 On Tuesday, March 3, 2015 12:59 PM, Vineet <notifications@github.com> wrote:

Any one has success with Waveshare 3.2inch V4 on Raspberry Pi 2 Model B? I tried with image on CD came with it, but no success. It just show Multi Colored Big Block on the screen that cover 90% of screen. And there no response from raspi at all.Also Tried with Fresh new image of Raspbian 2015-2-16 and running: sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update sudo rebootGet exact same Multi Colored block on initial screen, same as I get with Image from CD.Any help?— Reply to this email directly or view it on GitHub.

Vineetsai commented 9 years ago

Yes, I did that. It was connected with Hdmi, as it was showing that on monitor. Noticed this is the very first thing usually show on monitor for few second befit continue with boot. But not it look like stuck on intial screen and won't continue.

On Tuesday, March 3, 2015, gadget9503 notifications@github.com wrote:

sounds like it is booting in hdmi mode. try pluging a monitor in the hdmi port and rebooting.

On Tuesday, March 3, 2015 12:59 PM, Vineet <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Any one has success with Waveshare 3.2inch V4 on Raspberry Pi 2 Model B? I tried with image on CD came with it, but no success. It just show Multi Colored Big Block on the screen that cover 90% of screen. And there no response from raspi at all.Also Tried with Fresh new image of Raspbian 2015-2-16 and running: sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update sudo rebootGet exact same Multi Colored block on initial screen, same as I get with Image from CD.Any help?— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/notro/rpi-firmware/issues/6#issuecomment-77087014.

GeertVanMoer commented 9 years ago

Same problem here , tried several displays and images. after reboot the rasp freezes multicolor on main hdmi output white screen on the tft...

anyone ?

setup: Raspberry pi 2 - Shareware 3,2inch RPI LCD V4

Vineetsai commented 9 years ago

Highly appreciate if possible to have script or something to setup on my own Linux image rather than using image come with LCD.

On Wednesday, March 11, 2015, GeertVanMoer notifications@github.com wrote:

Same problem here , tried several displays and images. after reboot the rasp freezes multicolor on main hdmi output white screen on the tft...

anyone ?

setup: Raspberry pi 2 - Shareware 3,2inch RPI LCD V4

— Reply to this email directly or view it on GitHub https://github.com/notro/rpi-firmware/issues/6#issuecomment-78307190.

GeertVanMoer commented 9 years ago

Have found another TT i'm now setting up...

http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/

----- this works rasp working with touch

gmnandhu commented 9 years ago

Just check the cable on the back side of LCD display....My display wasn't working....After i correctly plugged in the ribbon cable to the board it worked fine....Hope this will help...

Vineetsai commented 9 years ago

Anyone got it working with splash screen on boot? I tried to follow instruction from https://github.com/notro/fbtft/wiki/Bootsplash

But seems something missing as it does not work for me. Any help?

notro commented 9 years ago

initramfs is done differently with the current Device Tree kernels. I haven't had time to look into it. There's something in this thread: http://www.raspberrypi.org/forums/viewtopic.php?p=685709&sid=61c7334eb300ad23c03fb28f94e37d7c#p685709 If you make it work and have the time, please update the fbtft bootsplash wiki page.

Vineetsai commented 9 years ago

Notro, I'm not very much experience with RPi, new learner here. If you can point me to some source I can definitely try. Above link has some info but not able to make out much sense out of it as I'm not even sure what initramfs does and why it used other than is loaded initially during boot sequence.

Any pointer would be helpful for me to look for solution.

On Side note: I tried to do BRANH=builtin rpi-update expecting with get kernel with built into it and that might help, but that also got my LCD screen to go back to white blank and when check on hdmi output it stuck with initial Rainbow screen and no progress with boot.

notro commented 9 years ago

BRANCH=builtin is deprecated. I haven't got time to make it anymore. As soon as we get a SPI DMA driver in the official kernel release, I will stop releasing the BRANCH=master kernel also.

initramfs is loaded very early in the boot process, and at that point you can load the fbtft drivers and plymouth will also start if enabled.

Divide your work into steps, first find out how to make and load an initramfs, then when it works, start filling it. I use google when I don't know how to do something. Usually I get multiple takes an the problem.

Sandbird commented 9 years ago

I bought the v4 version (http://www.aliexpress.com/item/3-2-LCD-Touch-Screen-Display-Monitor-Case-Heatsinks-for-Raspberry-Pi-B/32235705777.html) and managed to get it working on a pi1 model B with raspbian installed. Does anyone have a GPIO script to control the buttons ? Basically i want to turn the display on/off by pressing a button. I found this: http://www.circuitbasics.com/raspberry-pi-touchscreen-calibration-screen-rotation/#comment-145 but i cant find any command to turn the screen on/off to use it.

maty87 commented 9 years ago

Hi when doin the 1st step Touchscreen Setup and Configuration

  1. First we need to configure the fbturbo video driver to output the display of the Raspberry Pi to the SPI bus instead of the HDMI bus. At the command prompt, enter: sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

I get it come up but its empty nothing in it atall

maty87 commented 9 years ago

I followed these steps but on reboot it just hung on the following screen

20150502_194755

rebuilding rasbian now all I know about my screen is as it says on back 4INCH RPI LCD(A) WAVESHARE SPOTPARE

maty87 commented 9 years ago

I kbow the screen works with the supplied image but don't wanna use theres cus i wanna use mine so i can chose to boot rasp or openelec