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

maty87 commented 9 years ago

heres a script of the info I see from the given image from following the guide steps could it be possible to just copy these into the original official rasb image

step1 file is empty

step 2 GNU nano 2.2.6 File: /etc/modprobe.d/raspi-blacklist.conf

blacklist spi and i2c by default (many users don't need them)

blacklist spi-bcm2708

blacklist i2c-bcm2708

blacklist snd-soc-pcm512x blacklist snd-soc-wm8804

step 3 not done as screen working

ste 4 file is empty

step 5 GNU nano 2.2.6 File: /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 ro$ $0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont$ $roFont6x11 logo.nologo

step 6 GNU nano 2.2.6 File: /etc/rc.local

!/bin/sh -e

#

rc.local

#

This script is executed at the end of each multiuser runlevel.

Make sure that the script will "exit 0" on success or any other

value on error.

#

In order to enable or disable this script just change the execution

bits.

#

By default this script does nothing.

Print the IP address

_IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 &" [ Read 20 lines ] GNU nano 2.2.6 File: /etc/rc.local Modified

fi su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 &" exit 0

                           [ Read 20 lines ]
Big111156 commented 9 years ago

Hi Guys, I'm hanging to get my LCD Waveshare Spotpear V4 get working with my Raspberry B (not+ not 2) Trying anythin i would found on the net.. The best solution i think were from here.. As i could se Drivers will load correctly at Startup until on Point:

[Quote] [ 14.312643] fbtft: module is from the staging directory, the quality is unknown, you have been warned. [ 14.358515] flexfb: module is from the staging directory, the quality is unknown, you have been warned. [ 14.517474] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned. [ 14.541098] fbtft_device: SPI devices registered: [ 14.554769] fbtft_device: ads7846 spi0.1 2000kHz 8 bits mode=0x00 [ 14.570001] fbtft_device: 'fb' Platform devices registered: [ 14.584371] fbtft_device: bcm2708_fb id=-1 pdata? no [ 14.606112] flexfb spi0.0: fbtft_request_gpios: 'reset' = GPIO25 [ 14.634933] flexfb spi0.0: fbtft_request_gpios: 'dc' = GPIO24 [ 14.651362] flexfb spi0.0: flexfb_verify_gpios_dc() [ 14.665004] flexfb spi0.0: fbtft_init_display() [ 14.678304] flexfb spi0.0: fbtft_reset() [ 14.810723] flexfb spi0.0: init: write(0xB0) 0x00 [ 14.824177] flexfb spi0.0: init: write(0x11) [ 14.837071] flexfb spi0.0: init: mdelay(250) [ 15.101778] flexfb spi0.0: init: write(0x3A) 0x55 [ 15.115170] flexfb spi0.0: init: write(0xC2) 0x44 [ 15.128523] flexfb spi0.0: init: write(0xC5) 0x00 0x00 0x00 0x00 [ 15.143091] flexfb spi0.0: init: write(0xE0) 0x0F 0x1F 0x1C 0x0C 0x0F 0x08 0x48 0x98 0x37 0x0A 0x13 0x04 0x11 0x0D 0x00 [ 15.162596] flexfb spi0.0: init: write(0xE1) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 [ 15.182092] flexfb spi0.0: init: write(0xE2) 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 [ 15.205671] flexfb spi0.0: init: write(0x36) 0x28 [ 15.235770] flexfb spi0.0: init: write(0x11) [ 15.250259] flexfb spi0.0: init: write(0x29) [ 15.436973] flexfb spi0.0: Display update: 1726 kB/s (173.685 ms), fps=0 (0.000 ms) [ 15.459561] flexfb spi0.0: fbtft_register_backlight() [ 15.473057] flexfb spi0.0: fbtft_register_backlight(): led pin not set, exiting. [/Quote] then this Screen doesn't work anymore with "dmesg" on the second Screen it Shows adittional:

[Quote] [ 15.568076] graphics fb1: flexfb frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 16 MHz [ 15.583015] fbtft_device: GPIOS used by 'flexfb': [ 15.589465] fbtft_device: 'reset' = GPIO25 [ 15.595371] fbtft_device: 'dc' = GPIO24 [ 15.600897] fbtft_device: SPI devices registered: [ 15.607320] fbtft_device: ads7846 spi0.1 2000kHz 8 bits mode=0x00 [ 15.616539] fbtft_device: flexfb spi0.0 16000kHz 8 bits mode=0x00 [ 25.792471] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [ 27.348930] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1 [/Quote]

and no Output to the Display..

sorry for my english...

Any ideas ?

starwolf73 commented 9 years ago

Hi, I also have the same issues but just found out the drivers and manual on the Wiki http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B)

At work, so I will try to test it on the week-end.

Big111156 commented 9 years ago

This is was i found too... but no luck... the same as described... hanging at booting at:

[ 15.769071] fbtft_device: SPI devices registered: [ 15.784742] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00 [ 15.801762] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00 [ 15.818659] fbtft_device: 'fb' Platform devices registered: [ 15.834897] fbtft_device: bcm2708_fb id=-1 pdata? no [ 15.850743] fbtft_device: Deleting spi0.0 [ 15.869037] fbtft_device: GPIOS used by 'flexfb': [ 15.906714] fbtft_device: 'dc' = GPIO22 [ 15.936008] fbtft_device: 'reset' = GPIO27 [ 15.961411] fbtft_device: SPI devices registered: [ 15.976767] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00 [ 15.993732] fbtft_device: flexfb spi0.0 48000kHz 8 bits mode=0x00 [ 16.442000] graphics fb1: flexfb frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 48 MHz

using Raspian Image from 05.05.2015..

starwolf73 commented 9 years ago

I little workout around but it WORK fine on Pi 1 & Pi2!

Since I had a few extra MicroSD card, I install a fresh Raspbian from Feb (3.18.5-v7+ ) on one and install the drivers has suggest in http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B). It WORK! Speed is great and touch work very good without any calibration. I will have more time to play with it on Sunday and see if we do a upgrade it break the drivers.

Vineetsai commented 9 years ago

Does new rasbian release in May include fbtft with kernel? Or it still need to build module and include with kernel manually?

On Friday, May 29, 2015, starwolf73 notifications@github.com wrote:

I little workout around but it WORK fine on Pi 1 & Pi2!

Since I had a few extra MicroSD card, I install a fresh Raspbian from Feb (3.18.5-v7+ ) on one and install the drivers has suggest in http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B). It WORK! Speed is great and touch work very good without any calibration. I will have more time to play with it on Sunday and see if we do a upgrade it break the drivers.

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

starwolf73 commented 9 years ago

I was able to run also the latest Raspbian image (May) and it work well. Just make sure to block the bootloader update before any apt-get upgrade. See the Wiki for more info since I'm away from home for now.

Vineetsai commented 9 years ago

So new release still need to follow all steps from wiki including installing driver? As I thought drive is included with kernel and will be part of kernel modules, is that not correct?

On Sat, May 30, 2015 at 9:34 PM, starwolf73 notifications@github.com wrote:

I was able to run also the latest Raspbian image (May) and it work well. Just make sure to block the bootloader update before any apt-get upgrade. See the Wiki for more info since I'm away from home for now.

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

starwolf73 commented 9 years ago

Well, I'm still new to raspi. I do know that my LCD work fine for now with a fresh image and drivers installation. If I have the time this week, I'll try to go a little deeper and understand what the script is doing and post my research.

Big111156 commented 9 years ago

not one of described Solutions worked for me.... so i think either this Display is defective or not compatible with my Raspberry Pi B (no + or 2)

:-(

starwolf73 commented 9 years ago

@Big111156 Did you try with a fresh Raspbian image (3.18)? And did you install the driver with the command LCD32-show? Also you may want to check to turn on DEVICE-TREE and SPI option in RASPI-CONFIG?

Big111156 commented 9 years ago

as my Image is: Linux raspberrypi 3.18.5+ #1 PREEMPT Fri Feb 6 23:35:59 CET 2015 armv6l

changed to your decided Options, but it hangs...

[ 10.686952] bcm2708_i2c 20205000.i2c: BSC0 Controller at 0x20205000 (irq 79) (baudrate 100000) [ 13.745997] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 14.249378] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 15.442994] i2c /dev entries driver [ 15.608391] fbtft_device: SPI devices registered: [ 15.646462] fbtft_device: spidev spi0.0 500kHz 8 bits mode=0x00 [ 15.664860] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00 [ 15.681841] fbtft_device: 'fb' Platform devices registered: [ 15.698083] fbtft_device: bcm2708_fb id=-1 pdata? no [ 15.714000] fbtft_device: Deleting spi0.0 [ 15.732038] fbtft_device: GPIOS used by 'flexfb': [ 15.766545] fbtft_device: 'dc' = GPIO22 [ 15.787180] fbtft_device: 'reset' = GPIO27 [ 15.802012] fbtft_device: SPI devices registered: [ 15.817260] fbtft_device: spidev spi0.1 500kHz 8 bits mode=0x00 [ 15.834016] fbtft_device: flexfb spi0.0 48000kHz 8 bits mode=0x00 [ 16.303381] graphics fb1: flexfb frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 48 MHz [ 16.431106] ads7846_device: Deleting spi0.1 [ 16.508067] ads7846 spi0.1: touchscreen, irq 411 [ 16.522860] input: ADS7846 Touchscreen as /devices/soc/20204000.spi/spi_master/spi0/spi0.1/input/input2 [ 27.755037] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [ 29.312097] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1 [ 38.001814] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS [ 60.434326] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered. [ 119.795427] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.

xstrex commented 9 years ago

Hi everyone, so I've been fighting with my new screen for a few days now and after reading all the posts I could find, and banging my head on the keyboard I finally tried this: http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B) (posted by starwolf73 above) I followed the instruction on the site and it just works perfectly.. no calibration, no problems. Also when I tried to download the package from the above site it was taking a year (20k/s), so I found this as a mirror, and it seems to be much faster: https://ecksteinimg.de/Datasheet/LCD-show.tar.gz

Hope this helps some of you, cheers..

ieidsath commented 9 years ago

Hello, just wanted to share the setup I have for running the Waveshare 3.2" V4 display on a Raspberry Pi model B rev. 1 using Arch Linux.

Took me a couple of days to figure it out, but after piecing together information from various posts (many thanks to notro, Hexxeh, Imaginal, the tutorial at http://www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi, and the Waveshare wiki), I hacked together a working setup.

Step 1) Install rpi-update and firmware

With root permissions:

pacman -S wget
wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update
chmod +x /usr/bin/rpi-update

Then I install the builtin branch for notro's rpi-firmware:†

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

Step 2) Configuring modules

I would recommend doing the following by SSHing into the device. You'll be copying large amounts of text and if nothing is displayed on bootup you can recover easily.

With root permissions:

Insert the following line in /boot/config.txt to enable SPI:

dtparam=spi=on

Edit /etc/modules-load.d/raspberrypi.conf and insert the following modules for SPI, display, and touchscreen drivers:†

spi_bcm2708
fbtft_device
ads7846_device

Create the file /etc/modprobe.d/fbtft.conf. Copy the line in, but pay close attention to the gpio pins:‡

options fbtft_device name=waveshare32b width=320 height=240 gpios=dc:22,reset:21 bgr=1 speed=48000000 buswidth=8 rotate=270 init=-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0XC1,0X30,-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0X12,0X81,-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,-1,0x36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,-1,0xF2,0x00,-1,0x26,0x01,-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,-1,0XE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0x11,-2,120,-1,0x29,-1,0x2c,-3

Step 3) Bootup commands

Back up /boot/cmdline.txt to your home folder if you need to restore it later.

cp /boot/cmdline.txt ~/cmdline.txt.bak

Erase everything in /boot/cmdline.txt and copy this line:

root=/dev/mmcblk0p2 rw rootwait selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop fbtft_device.custom fbtft_device.name=waveshare32b fbtft_device.gpios=dc:22,reset:21 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbtft_device.fps=50 fbtft_device.rotate=270 dma.dmachans=0x7f35 console=ttyAMA0,115200 fbcon=map:10 fbcon=font:VGA8x8 console=tty1 consoleblank=0

(This will boot into the command line on the Waveshare display. If you want the command line on your primary display with HDMI or NTSC, remove "fbcon=map:10 fbcon=font:VGA8x8". Booting fbcon this way is deprecated in future releases.)

Step 4) Reboot

That's it! The display should work and you should see the command line on it now.

† The builtin branch is deprecated, but I got a square display with unused white bars on the side when I set it up with the newer kernel. I haven't figured out a solution yet. Keep in mind that fbtft_device, ads7846_device, and fbcon might not work the same way in newer releases. ‡ The Raspberry Pi Rev. 1 models A and B have a slightly different pinout for GPIO. GPIO21 was changed to GPIO27 in all future revisions, so change the reset pin accordingly.

joelstitch commented 9 years ago

I have a WaveShare 3.5 RPI LCD (A) (http://www.wvshare.com/product/3.5inch-RPi-LCD-A.htm) and cannot get it to work following this guide. I have Kali Linux installed with TFT made specifically for the Raspberry Pi (including A). I followed ieidsath guide and first /boot/config.txt and /boot/cmdline.txt did not exist (don't know if that has anything to do with it not working). Besides that I followed the instructions and it still shows the display on the HDMI and none on the LCD screen.

Sergehog101 commented 8 years ago

Hi All,

I have purchased one of these Spotpear V4 boards to run on a Pi2 B. After contacting the supplier here is the link for a image configured for the display. http://www.spotpear.com/download/image/RPi-2.4inch_3.2inch-LCD-150602.7z Or http://www.spotpear.com/download/image/ for alternate displays. installing this image on a sd card I can confirm all works correctly including the touch screen on my Pi2. Hope this helps.

zheli commented 8 years ago

@ieidsath thx for the info on rev 1! Finally figure out why it didn't work on my board :smiley:

AaronPelzer commented 8 years ago

@Sergehog101 you are the insanity saver!! Been figuring this for days -

ayasystems commented 8 years ago

Could you talk as more about this image??

What is the SO based? Debian? Version kernel?

Did you try to make a dist-upgrade ? Is it working after upgrade ?

Regards El 28 ene. 2016 11:41, "Sergehog101" notifications@github.com escribió:

Hi All,

I have purchased one of these Spotpear V4 boards to run on a Pi2 B. After contacting the supplier here is the link for a image configured for the display. http://www.spotpear.com/download/image/RPi-2.4inch_3.2inch-LCD-150602.7z After installing this image on a sd card I can confirm all works correctly including the touch screen on my Pi2. Hope this helps.

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

mrwolf81 commented 8 years ago

for all of you trying to get the following screen to work on pi B rev1 http://www.waveshare.com/3.2inch-rpi-lcd-b.htm you need to download the image from the website, install/write to SD card, then sudo nano /etc/modules and change this bit: gpios=dc:22,reset:27 to gpios=dc:22,reset:21 and your screen will work ...and work in startx i don't think anyone has been paying any attention to the pin-outs of their screens and the pin-outs of the gpio's on their versions of the raspi! if it doesn't match the code... it ain't gonna work!

dhineshc commented 8 years ago

Hi notro, I am using chromium OS in raspberry pi 3 board with waveshare 3.2 inch TFT display. Chromium OS has Linux kernel 4.4, FBTFT drivers are built part of kernel. I followed the overlay procedure with the waveshare dtb, but on boot up, it gets stuck with the following kernel messages. Any solution ?? 20160907_170704

notro commented 8 years ago

Use a HDMI monitor to see if there are more messages. FBTFT won't display panic messages.

fbettag commented 7 years ago

Allright, the only thing y'all need to do is follow the dts/dtb instructions here: https://github.com/swkim01/waveshare-dtoverlays

Basically copy the dtb file to your /boot/overlay/, add dtoverlay=waveshare35a to config.txt, reboot. Done :)

aoyawale commented 7 years ago

@fbettag does that include the raspberry 3? I just got this LCD and tried to do what is on waveshare page http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B) but, I get a kernel panic when It reboots.

fbettag commented 7 years ago

yes should work for rpi1-3. I had it plugged on my 2 and 3, dunno where my 1 is

aoyawale commented 7 years ago

just tried it and all I get is a block screen during boot. It shows a bit of the booting process then goes blank.

fbettag commented 7 years ago

well if it shows your cli during boot then it works, you're just suffering some misconfiguration. Xorg and fbcp setup properly?

aoyawale commented 7 years ago

where can I find how to configure those? I appreciate the help.

fbettag commented 7 years ago

maybe my blogpost helps http://uberblo.gs/2016/12/kali-on-the-raspberrypi-with-3-5inch-lcd

mrwolf81 commented 7 years ago

dhineshc

Change your pinouts references Dc = 22 Reset = 25 on pi3 i think And make sure you've checked the information others have posted on this. Send more screen shots of all the info during boot

mrwolf81 commented 7 years ago

Sorry correction DC = 22 (GPIO 25) RESET = 21 (GPIO 9) Do not use 27 as reset, that is the I²C id for the eeprom

Sudo nano /etc/modules Change fbtft_device name=waveshare32b gpios=dc:22,reset:27 speed=48000000

To this fbtft_device name=waveshare32b gpios=dc:22,reset:21 speed=48000000

The below is how i set mine up, just changed the gpios to match pinouts of the screen & pi Www.circuitbasics.com/setup-lcd-touchscreen-raspberry-pi/

elBoz73 commented 7 years ago

Hi, I try to replace my squeeezeboxplayer using raspeberry pi 3, picore player (tinycore linux) and my waveshare 3.5. I tried all procedure I known but I still have a white screen (the HDMI is working correctly). do you have a procedure for tiny core ( kernel 4.4.39) that I could use without having X11 installed? thanks for your help