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

Kernel compilation #1

Open
thijstriemstra opened this issue Nov 21, 2016 · 6 comments
Open

Kernel compilation #1

thijstriemstra opened this issue Nov 21, 2016 · 6 comments

Comments

@thijstriemstra
Copy link

One of these 1.44" Serial LCD Display 128*128 SPI TFT Color Screen With PCB Adapter 5110 recently arrived. The instructions mention "Drive IC using ST7735S , stable and reliable, it shows simple adjustment!". So this library should be compatible right? Is it still necessary to cross-compile a custom kernel?

@rm-hull
Copy link
Owner

rm-hull commented Nov 21, 2016

So this README is probably way out of date - it did work on the 3.8 and 3.9 kernel lines, but I havent kept it up-to-date with any recent kernel, mainly because a lot of effort was put in by Noralf Tronnes + contributors (see https://github.com/notro/fbtft) to build custom framebuffers for a number of different LCD devices. As far as I am aware they are all in the RPi kernel now.

So then answer to:

Is it still necessary to cross-compile a custom kernel?

is no; I think you should just be able to modprobe the relevant kernel module.

The answer for:

So this library should be compatible right?

is, probably - the ST7735R and ST7735S are sufficiently similar so they should work. However, if it were me I wouldn't try to necromance that version of the kernel, instead I would follow the instructions here https://github.com/notro/fbtft/wiki relating to the fb_st7735r driver.

@thijstriemstra
Copy link
Author

But this page mentions 'FBTFT is a dead end'. And "The FBTFT drivers are now in the Linux kernel".

@thijstriemstra
Copy link
Author

And it's indeed in there but how would I activate this: https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fb_st7735r.c

@rm-hull
Copy link
Owner

rm-hull commented Nov 22, 2016

The repo is dead, but the docs are still relevant. Look at this: https://github.com/notro/fbtft/wiki#step-by-step-using-fbtft

You should be able to do something like sudo modprobe fbtft_device name=adafruit18 to initialize the device and then dmesg - the adafruit18 is probably the nearest to what you have.

@thijstriemstra
Copy link
Author

I see! dmesg shows:

fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[  933.364855] fbtft_device: module is from the staging directory, the quality is unknown, you have been warned.
[  933.365860] spidev spi0.0: spidev spi0.0 500kHz 8 bits mode=0x00
[  933.365882] spidev spi0.1: spidev spi0.1 500kHz 8 bits mode=0x00
[  933.365918] bcm2708_fb soc:fb: soc:fb id=-1 pdata? no
[  933.365965] spidev spi0.0: Deleting spi0.0
[  933.367389] fbtft_device: GPIOS used by 'adafruit18':
[  933.367413] fbtft_device: 'reset' = GPIO25
[  933.367424] fbtft_device: 'dc' = GPIO24
[  933.367431] fbtft_device: 'led' = GPIO18
[  933.367450] spidev spi0.1: spidev spi0.1 500kHz 8 bits mode=0x00
[  933.367465] spi spi0.0: fb_st7735r spi0.0 32000kHz 8 bits mode=0x00
[  933.375343] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[  934.270358] graphics fb1: fb_st7735r frame buffer, 128x160, 40 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz

Testing again..

@thijstriemstra
Copy link
Author

thijstriemstra commented Nov 22, 2016

It looks like it's working... or doing something at least because there's something on the screen. Unfortunately the crack in the display is now also visible, probably happend during shipping, so I'll contact the seller.

foo

Wiring:

  • LED - 3.3 V
  • SCK - GPIO11
  • SDA - GPIO10
  • A0 - GPIO23
  • RESET - GPIO24
  • CS - GPIO8
  • GND - GND
  • VCC - 3.3V

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

2 participants