Giter Site home page Giter Site logo

notro / fbtft Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 496.0 502 KB

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing

Makefile 0.72% C 99.28%

fbtft's People

Contributors

asmecher avatar cnvogelg avatar genericsoma avatar jantek avatar laurynaskavaliauskas avatar melka avatar notro avatar nzmichaelh avatar projectgus avatar stylesuxx avatar swkim01 avatar wrobell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbtft's Issues

Adafruit 2.2 LCD base on ILI9340 controller.

Is the new 2.2" LCD from Adafruit gonna get supported? It's using the ILI9340 controller. I see they are no longer making the previous LCD that is supported here.

Here is the link
http://www.adafruit.com/products/1480

Is ILI9341 driver somewhat compatible with ILI9340?
If not, can I use the driver ILI9341 as a base to create a new driver for ILI9340, and contribute to the project?

Thanks

All drivers should use write_reg()

write_reg() was meant to superseed write_cmd() and write_data().
After write_reg() was added, the flexfb driver came, and it didn't know beforehand the number of data values. Thus write_cmd/data stayed.

Either I change fbtft_ops.write_reg() to take an array, or I make a workaround for flexfb.

Drivers to be converted

  • adafruit18fb
  • adafruit22fb
  • ili9341fb
  • r61505ufb
  • ssd1351fb

cmdline.txt and fbcon

Device: Nokia3310

Setting the font variable in cmdline.txt to some of the built-in fonts appears to stop the RPI from booting, I have tried several fonts including:

fbcon=font:VGA8x8
fbcon=font:MINI4x6
fbcon=font:Acorn8x8
fbcon=font:PEARL8x8
fbcon=font:VGA8x16

These fonts appear to work:

fbcon=font:ProFont6x11
fbcon=font:7x14

Also discovered that fbcon=rotate:1 does not appear to do anything, however console rotation may not be built into the kernel as

echo "1" /sys/class/graphics/fbcon/rotate_all

does not work either.

Thanks

apt-get upgrade - raspberrypi-bootloader breaks FBTFT

When doing apt-get upgrade the FBTFT drivers disappear

This is the package that breaks FBTFT, because it contains a kernel which overwrites the FBTFT kernel and modules

apt-cache show raspberrypi-bootloader

Description: Raspberry Pi bootloader
 This package contains the Raspberry Pi bootloader (plus, temporarily, a
 kernel).

Update packages except raspberrypi-bootloader

sudo apt-mark hold raspberrypi-bootloader
sudo apt-get update
sudo apt-get upgrade

Update bootloader, but not the kernel and modules

sudo apt-get install rpi-update
sudo SKIP_KERNEL=1 rpi-update

FBTFT for BeagleBone Black

Dear NOTRO:
I am delighted with the fbtft running on Raspberry-
However, I think I have reached the limit of Raspberry capability to run several "heavy" apps.
I wonder if you can think in having the same fbtft running in the BeagleBone Black board. It is far fast and powerful than Raspberry, also, good support from TI.
Let me know, and if I can be of assistance to test releases, will be a privilege.
All the best and do not hesitate to contact me directly at - [email protected]
Nelson -

FBTFT doesn't work by default on the Beaglebone Black

A workaround is to use DMA allocated buffers:

modprobe fbtft dma

On the BBB (drivers/spi/spi-omap2-mcspi.c), non-DMA SPI transfers above 160 bytes uses DMA mapping on the transfer buffer. This fails with FBTFT because it uses vmalloc to allocate the transfer buffer. vmalloc doesn't give physically contiguous memory.

The solution is to use kmalloc/kzalloc instead of vmalloc/vzalloc in fbtft-core.c

Crossref: #22

Pre-compiled Images

I would like to do some development, and bring in the low latency spi drivers, but am having a hard time replicating the actual build environment.

Could you provide the following info for the latest (and future) builds:

  1. exact git repository for the kernel sources you used
  2. version of the compiler/tools you installed onto that image to build?

Ideally this should go into the README file...

ILI9320 vs ILI9341

Hello, i've received an LCD driven by an ILI9320. Is this IC compatible to the ILI9341 your project already supports? if not, i would like to take care of that one and contribute it to your project.

MI0283QT-9A touch screen is mirrored horizontally

I have a problem with the Watterott MI0283QT-9A.

Hardware:
MI0283QT Adapter (inkl. LCD) Rev 1.2
RPi-Shield-Bridge (Raspberry Pi - Arduino Adapter) Rev 1.1

This is how i installed the display: http://pastebin.com/UxrrgjnH

The problem:
The display works well! But the touch screen still has problems.
The touch screen is mirrored horizontally.
I made an image and a video, so its more understandable.

What should I do so that the touch screen is working correctly?

Image:
touch

Video: http://www.youtube.com/watch?v=BCKfEaZimK0

Thanks,
ps915

Prefix before data

Hi Noralf, first of all - great project. I am very happy to have it.

I am developing software for Siemens S65 LCD displays. I have working code for rpi for LS020 and LPH88 displays (native C SPI and GPIO handling). I now try to port it to your framework.

I have following question:

Both LCD controllers want to have a special hex value before video data can be streamed. This value must be inside the spi data frame (CS LOW, SPECIAL VALUE, ALL VIDEO DATA, CS HIGH).

I see 2 possibilities:

  1. overwrite par->fbtftops.write_vmem, and copy the video buffer to an new buffer[len+1] and set buffer[0]=special value. I hate to do so. Bad overhead.

  2. like Chrisitan in r61505u. He used an own gpio for cs and bit banged it in [write] and [write_vmem]. I think this is also not very nice.

What do you think would be best practise?

Greetings from Germany,
Mirko

FBDEV(0) error with raspbian image

Hi there,
i installed
2013-05-25-wheezy-raspbian-2013-07-07-fbtft.zip
to an Raspberry with ITDB02-28 and follow the instructions to start the device.
But after startin X the image isn't displayed and in the log files is the following

----------------extracts---------
[ 659.303] compiled for 1.12.4, module version = 1.2.0
[ 659.304] ABI class: X.Org Server Extension, version 6.0
659.304 Loading extension DRI2
659.304 Matched fbdev as autoconfigured driver 0
659.304 Assigned the driver to the xf86ConfigLayout
659.304 LoadModule: "fbdev"
659.308 Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
659.311 Module fbdev: vendor="X.Org Foundation"
[ 659.312] compiled for 1.12.1, module version = 0.4.2
[ 659.312] ABI class: X.Org Video Driver, version 12.0
659.312 FBDEV: driver for framebuffer: fbdev
659.313 using VT number 7

659.335 Falling back to old probe method for fbdev
659.335 Loading sub module "fbdevhw"
659.335 LoadModule: "fbdevhw"
659.336 Loading /usr/lib/xorg/modules/libfbdevhw.so
659.340 Module fbdevhw: vendor="X.Org Foundation"
[ 659.340] compiled for 1.12.4, module version = 0.0.2
[ 659.340] ABI class: X.Org Video Driver, version 12.1
659.341 FBDEV(0): using default device
659.341 VGA arbiter: cannot open kernel arbiter, no multi-card support
659.342 FBDEV(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 16/16
659.342 FBDEV(0): Depth 16, (==) framebuffer bpp 16
659.342 FBDEV(0): RGB weight 565
659.342 FBDEV(0): Default visual is TrueColor
659.343 FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
659.343 FBDEV(0): hardware: itdb28fb (video memory: 150kB)
659.343 FBDEV(0): checking modes against framebuffer device...
659.343 FBDEV(0): checking modes against monitor...
659.345 FBDEV(0): Virtual size is 320x240 (pitch 320)
659.345 FBDEV(0): Built-in mode "current"
659.345 FBDEV(0): DPI set to (96, 96)
659.346 Loading sub module "fb"
659.346 LoadModule: "fb"
659.346 Loading /usr/lib/xorg/modules/libfb.so
659.356 Module fb: vendor="X.Org Foundation"
[ 659.356] compiled for 1.12.4, module version = 1.0.0
[ 659.357] ABI class: X.Org ANSI C Emulation, version 0.4
659.357 FBDEV(0): using shadow framebuffer
659.357 Loading sub module "shadow"
659.357 LoadModule: "shadow"
659.358 Loading /usr/lib/xorg/modules/libshadow.so
659.363 Module shadow: vendor="X.Org Foundation"
[ 659.363] compiled for 1.12.4, module version = 1.1.0
[ 659.363] ABI class: X.Org ANSI C Emulation, version 0.4
659.364 FBDEV(0): FBIOBLANK: Invalid argument
659.383 FBDEV(0): Backing store disabled
659.384 FBDEV(0): DPMS enabled
659.385 RandR enabled

...................

660.196 This device may have been added with another device file.
660.242 FBDEV(0): FBIOBLANK: Invalid argument


the last two lines are the end of the log File

Please help
btw. I also got that when i compile the fbtft by myselfe
greetings

flashing screen

I have the old adafruit 2.2 display. I believe it is working. I have all the right things in the logs. When I run some of the examples to test the screen, the screen just flashes. Normally it is dark, but when I run a test it flashes white. I never see anything drawn to the screen. I don't see any errors, and in fact the fbtest program says that it passed everything. Any ideas?

SSD1351 Display

Hi,

I am currently kickstarting a breakout board and shields for the SSD1351 chipset and looking at using this library but unsure how to write a driver for it as I have little to no experience with Linux.

I've managed to work with the u8glib on the Arduino to write a display and would like to help with this one.

The display is 128x128 with 65k and 262k colour modes.

I've looked at a post and it seems I have to do an 8 - 9 hour make but I feel this is too long for debugging and fixing any bugs that might arise, is there a faster solution?

Kind regards

James

Your own rpi-update

Why not including your own rpi-update clone that download a compiled firmware from your repository?

Help Me

can help me, I want to use this driver fbtft but I am still confused how to use it, I have tried but failed, can tell you step by step,
I am still new on linux..Please!!!

Nokia 3310 Backlight Reversed

Hi;

The backlight toggle appears to be reversed, when the console blanks, the backlight is on, when the console is active the backlight is off.

Thanks

ArchLinux Instructions or Images

Trying to build this on an archlinux distro but I'm a linux noob. Any chance you'll adapt or post instructions to accomplish this? Thanks.

Upstreaming fbtft

Hi,

We would love to include the fbtft driver in the standard raspberry pi linux kernel (raspberrypi/linux) but have a policy of trying to avoid pulling in out of tree drivers.

Do you have any plans for upstreaming the driver? Once it's been upstreamed we would be happy to pick it up for inclusion.

Best,

Rob Bishop

Kernel module crashes (?)

Not sure about the name so better read further.

I have TFT01-2.2S and I am able to load module and write Hello on display using

echo "Hello" > /dev/tty1

But every time something crashes after about 10 minutes:

[ 132.390000] fbtft_device: SPI devices registered:
[ 132.390000] fbtft_device: spidev spi1.0 1000kHz 8 bits mode=0x00
[ 132.400000] fbtft_device: spidev spi1.1 1000kHz 8 bits mode=0x00
[ 132.400000] fbtft_device: spidev spi1.2 1000kHz 8 bits mode=0x00
[ 132.410000] fbtft_device: spi-sc16is7x2 spi1.3 1000kHz 8 bits mode=0x00
[ 132.420000] fbtft_device: spidev spi1.4 1000kHz 8 bits mode=0x00
[ 132.420000] fbtft_device: spidev spi1.5 1000kHz 8 bits mode=0x00
[ 132.430000] fbtft_device: 'fb' Platform devices registered:
[ 132.440000] spi spi1.6: gpio index 3, gpio_cs 91
[ 132.500000] fbtft_device: GPIOS used by 'fb_ili9341':
[ 132.500000] fbtft_device: 'reset' = GPIO51
[ 132.510000] fbtft_device: 'dc' = GPIO53
[ 132.510000] fbtft_device: SPI devices registered:
[ 132.510000] fbtft_device: spidev spi1.0 1000kHz 8 bits mode=0x00
[ 132.520000] fbtft_device: spidev spi1.1 1000kHz 8 bits mode=0x00
[ 132.530000] fbtft_device: spidev spi1.2 1000kHz 8 bits mode=0x00
[ 132.530000] fbtft_device: spi-sc16is7x2 spi1.3 1000kHz 8 bits mode=0x00
[ 132.540000] fbtft_device: spidev spi1.4 1000kHz 8 bits mode=0x00
[ 132.550000] fbtft_device: spidev spi1.5 1000kHz 8 bits mode=0x00
[ 132.560000] fbtft_device: fb_ili9341 spi1.6 20000kHz 8 bits mode=0x00
[ 133.100000] Console: switching to colour frame buffer device 30x20
[ 133.110000] graphics fb0: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=20, spi1.6 at 20 MHz
[ 602.080000]
[ 602.080000] ======================================================
[ 602.080000] [ INFO: possible circular locking dependency detected ]
[ 602.080000] 3.12.0-rc3-imxv5-x0.3 #3 Not tainted
[ 602.080000] -------------------------------------------------------
[ 602.080000] kworker/0:1/15 is trying to acquire lock:
602.080000{+.+.+.}, at: [] lock_fb_info+0x18/0x3c
[ 602.080000]
[ 602.080000] but task is already holding lock:
602.080000{+.+.+.}, at: [] console_callback+0xc/0x12c
[ 602.080000]
[ 602.080000] which lock already depends on the new lock.
[ 602.080000]
[ 602.080000]
[ 602.080000] the existing dependency chain (in reverse order) is:
[ 602.080000]
[ 602.080000] -> #1 (console_lock){+.+.+.}:
[ 602.080000] [] lock_acquire+0x9c/0x104
[ 602.080000] [] console_lock+0x4c/0x60
[ 602.080000] [] register_framebuffer+0x178/0x264
[ 602.080000] [] fbtft_register_framebuffer+0x1b8/0x2e4 [fbtft]
[ 602.080000] [] fbtft_probe_common+0x144/0x2d4 [fbtft]
[ 602.080000] [] spi_drv_probe+0x18/0x1c
[ 602.080000] [] driver_probe_device+0x104/0x220
[ 602.080000] [] __driver_attach+0x94/0x98
[ 602.080000] [] bus_for_each_dev+0x58/0x88
[ 602.080000] [] bus_add_driver+0xd8/0x26c
[ 602.080000] [] driver_register+0x78/0xf4
[ 602.080000] [] 0xbf03300c
[ 602.080000] [] do_one_initcall+0xe8/0x154
[ 602.080000] [] load_module+0x1a20/0x1f24
[ 602.080000] [] SyS_init_module+0xd8/0xec
[ 602.080000] [] ret_fast_syscall+0x0/0x44
[ 602.080000]
[ 602.080000] -> #0 (&fb_info->lock){+.+.+.}:
[ 602.080000] [] __lock_acquire+0x1534/0x1a64
[ 602.080000] [] lock_acquire+0x9c/0x104
[ 602.080000] [] mutex_lock_nested+0x48/0x2d0
[ 602.080000] [] lock_fb_info+0x18/0x3c
[ 602.080000] [] fbcon_blank+0x240/0x27c
[ 602.080000] [] do_blank_screen+0x1b4/0x270
[ 602.080000] [] console_callback+0x68/0x12c
[ 602.080000] [] process_one_work+0x1c0/0x4a4
[ 602.080000] [] worker_thread+0x13c/0x384
[ 602.080000] [] kthread+0xa4/0xb0
[ 602.080000] [] ret_from_fork+0x14/0x34
[ 602.080000]
[ 602.080000] other info that might help us debug this:
[ 602.080000]
[ 602.080000] Possible unsafe locking scenario:
[ 602.080000]
[ 602.080000] CPU0 CPU1
[ 602.080000] ---- ----
[ 602.080000] lock(console_lock);
[ 602.080000] lock(&fb_info->lock);
[ 602.080000] lock(console_lock);
[ 602.080000] lock(&fb_info->lock);
[ 602.080000]
[ 602.080000] *** DEADLOCK ***
[ 602.080000]
[ 602.080000] 3 locks held by kworker/0:1/15:
[ 602.080000] #0: (events){.+.+.+}, at: [] process_one_work+0x134/0x4a4
[ 602.080000] #1: (console_work){+.+...}, at: [] process_one_work+0x134/0x4a4
[ 602.080000] #2: (console_lock){+.+.+.}, at: [] console_callback+0xc/0x12c
[ 602.080000]
[ 602.080000] stack backtrace:
[ 602.080000] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 3.12.0-rc3-imxv5-x0.3 #3
[ 602.080000] Workqueue: events console_callback
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
[ 602.080000] from
root@wirenboard:~#

Display goes black but Linux still works good.
What's happened and what should I do?

Freetronics OLED128 support (SSD1351)

Hi Notro,

Thanks very much for fbtft! I work for Freetronics and I've been looking at integrating a new open hardware OLED module (model "OLED128") into fbtft.

It's great to think "I wonder if anyone has done something like this..." and find a project as active as fbtft!

Unfortunately I didn't pay a lot of attention before I started integrating, and I've worked against the old non-generic ssd1351fb.c driver which has just been deleted:
https://github.com/projectgus/fbtft/compare/ft_oled128

Before I rebase against fb_ssd1351.c, I was hoping I could ask some advice about the approach.

The main difference for our OLED128 is that we use one of the SSD1351's onboard GPIOs to enable/disable the onboard boost converter for the +15V panel power.

So the addition I made was to register two GPIOs as part of the ssd1351 driver which can then be assigned as the backlight "led" pin, which causes them to be turned on and off (the sequence isn't quite the same as the controller datasheet requests, but it seems to work perfectly well from what I can tell.)

This seemed like the easiest and most "Linux-like" way, but I thought I'd run it past you now before I go and change the code over to use fb_ssd1351.c. The alternative I could see would be to put the ssd1351 GPIO driver into a separate module, but that seemed like it might be overkill given the GPIOs are really part of the same ssd1351 unit.

What do you think? Do you have any comments on my branch, apart from "you based it on the wrong driver"? :)

Cheers,

  • Angus

PS If you are happy to merge support for the OLED128, Freetronics is committed to supporting the module and you can feel free to direct any module-specific queries to me/us. We're also happy to provide you with some sample hardware if that helps at all for testing future updates.

Sticky keys

There is some reports of 'sticky keys' with a USB connected keyboard on the 2013-05-25-wheezy-raspbian-2013-06-14-fbtft release. I have the same problem, and it seems like random keypresses/releases are lost.
The problem is discussed here: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=45851&p=362382
I haven't had this problem at all, until this FBTFT release.
I don't have a HDMI monitor to try with, but I would like to know if the vanilla 2013-05-25-wheezy-raspbian behaves like this?

Console workaround for missing keyreleases:

setterm -repeat off

Add to ~/.profile to make it permanent.

Himax HX8257-A support

I am trying to use a 4.3" tft lcd from here http://www.buy-display.com/default/4-3-tft-display-lcd-module.html. I want to be able to use the output and the touchscreen.

I am totally willing to help make changes and commit new drivers and code to the repository. Only thing is I don't know where to start, some of the problems I for see is that the IC is set for 24-bit data transfer. That and it has a much bigger screen size than the rest of the screens you have used.

I am comfortable with hardware and software including Linux, I have done many DIY projects before and I would like to see if you would like some help with your repo while I'm at it :)

My email is [email protected]. feel free to email me with any comments and feedback you might have. Hell, I'd be happy if you emailed me with some guidance on where to start.

dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update

When compiling adafruit22fb into the kernel, the following appears in the log at boot:

graphics fb1: adafruit22fb frame buffer, 75 KiB video memory, 16 KiB buffer memory, fps=10, spi0.0 at 32 MHz, GPIO25 for reset
bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
adafruit22fb spi0.0: fbtft_update_display: dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update
adafruit22fb spi0.0: fbtft_update_display: dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update
adafruit22fb spi0.0: fbtft_update_display: dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update
adafruit22fb spi0.0: fbtft_update_display: dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update
adafruit22fb spi0.0: fbtft_update_display: dirty_lines_start=219 is larger than dirty_lines_end=0. Shouldn't happen, will do full display update

This doesn't affect the working of the driver/display. It states that an unexpected thing happended, and that it is rectified.

I haven't had time to look into it.

If someone will look into it:
Compile fbtft-core.c with DEBUG to find out which framebuffer function that is triggering this display update.

Infrequent kernel crash when unloading fbtft_device

There is an error in the fbtft module/driver remove/exit code path.
I haven't been able to replicate the error, it happens from time to time during development.

Could be a race condition of some kind.

This is shown on the console

[70120.637884] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[70120.646213] pgd = c0004000
 kernel:[70120.637884] Unable to handle kernel NULL pointer dereference at virtu[70120.656407] [00000000] *pgd=00000000al address 00000000
 kernel:[70120.646213] pgd = c0004000

[70120.666707] Internal error: Oops: 80000005 [#1] PREEMPT ARM

Entering kdb (current=0xc9169100, pid 5136) Oops: (null)
due to oops @ 0x0

Pid: 5136, comm:            ssh-agent
CPU: 0    Not tainted  (3.6.11+ #5)
PC is at 0x0
LR is at fb_release+0x30/0x54
pc : [<00000000>]    lr : [<c0207258>]    psr: 20000033
sp : c9179f00  ip : 00000000  fp : 00000001
r10: d9bd5428  r9 : da811130  r8 : 00000008
r7 : 00000000  r6 : dab63bc8  r5 : dab0380c  r4 : dab03800
r3 : 00000001  r2 : d9a25420  r1 : 00000001  r0 : dab03800
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
Control: 00c5387d  Table: 1abc4008  DAC: 00000015
[<c0013adc>] (unwind_backtrace+0x0/0xf0) from [<c0072c04>] (kdb_dumpregs+0x28/0x50)
[<c0072c04>] (kdb_dumpregs+0x28/0x50) from [<c00755a8>] (kdb_main_loop+0x338/0x788)
[<c00755a8>] (kdb_main_loop+0x338/0x788) from [<c0077f84>] (kdb_stub+0x2d0/0x3d0)
[<c0077f84>] (kdb_stub+0x2d0/0x3d0) from [<c006ed84>] (kgdb_handle_exception+0x144/0x658)
[<c006ed84>] (kgdb_handle_exception+0x144/0x658) from [<c0013244>] (kgdb_notify+0x28/0x44)
[<c0013244>] (kgdb_notify+0x28/0x44) from [<c03a9794>] (notifier_call_chain+0x44/0x84)
[<c03a9794>] (notifier_call_chain+0x44/0x84) from [<c03a980c>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c03a980c>] (__atomic_notifier_call_chain+0x38/0x4c) from [<c03a9838>] (atomic_notifier_call_chain+0x18/0x20)
[<c03a9838>] (atomic_notifier_call_chain+0x18/0x20) from [<c03a9878>] (notify_die+0x38/0x44)
[<c03a9878>] (notify_die+0x38/0x44) from [<c0011068>] (die+0xc8/0x3a0)
[<c0011068>] (die+0xc8/0x3a0) from [<c03a219c>] (__do_kernel_fault.part.9+0x54/0x74)
[<c03a219c>] (__do_kernel_fault.part.9+0x54/0x74) from [<c03a94d4>] (do_page_fault+0x1f8/0x3cc)
[<c03a94d4>] (do_page_fault+0x1f8/0x3cc) from [<c00083c8>] (do_PrefetchAbort+0x34/0x9c)
[<c00083c8>] (do_PrefetchAbort+0x34/0x9c) from [<c03a7e58>] (__pabt_svc+0x38/0x80)
Exception stack(0xc9179eb8 to 0xc9179f00)
9ea0:                                                       dab03800 00000001
9ec0: d9a25420 00000001 dab03800 dab0380c dab63bc8 00000000 00000008 da811130
9ee0: d9bd5428 00000001 00000000 c9179f00 c0207258 00000000 20000033 ffffffff
[<c03a7e58>] (__pabt_svc+0x38/0x80) from [<c0207258>] (fb_release+0x30/0x54)
[<c0207258>] (fb_release+0x30/0x54) from [<c00c372c>] (__fput+0x88/0x228)
[<c00c372c>] (__fput+0x88/0x228) from [<c0037cf4>] (task_work_run+0x94/0xb4)
[<c0037cf4>] (task_work_run+0x94/0xb4) from [<c0023dcc>] (do_exit+0x770/0x7bc)
[<c0023dcc>] (do_exit+0x770/0x7bc) from [<c00240b8>] (do_group_exit+0x3c/0xc4)
[<c00240b8>] (do_group_exit+0x3c/0xc4) from [<c0024150>] (__wake_up_parent+0x0/0x18)
more>
kdb>

itdb28fb problem

Dear notro:
Thank you for taking time to read my problem.I try to use this lib to driver itdb28fb.I input command in terminal:
sudo modprobe fbtft_device name=itdb28fb gpios=reset:17,dc:1,wr:0,cs:21,db00:9,db01:11,db02:18,db03:23,db04:24,db05:25,db06:8,db07:7,led:4
And then:
dmesg
The terminal display like this:
[ 304.294308] fbtft_device: SPI devices registered:
[ 304.294344] fbtft_device: 'fb' Platform devices registered:
[ 304.294369] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 304.298182] fbtft_device: GPIOS used by 'itdb28fb':
[ 304.298214] fbtft_device: 'reset' = GPIO17
[ 304.298224] fbtft_device: 'dc' = GPIO1
[ 304.298232] fbtft_device: 'wr' = GPIO0
[ 304.298241] fbtft_device: 'cs' = GPIO21
[ 304.298248] fbtft_device: 'db00' = GPIO9
[ 304.298257] fbtft_device: 'db01' = GPIO11
[ 304.298265] fbtft_device: 'db02' = GPIO18
[ 304.298273] fbtft_device: 'db03' = GPIO23
[ 304.298281] fbtft_device: 'db04' = GPIO24
[ 304.298293] fbtft_device: 'db05' = GPIO25
[ 304.298301] fbtft_device: 'db06' = GPIO8
[ 304.298309] fbtft_device: 'db07' = GPIO7
[ 304.298317] fbtft_device: 'led' = GPIO4
[ 304.298325] fbtft_device: 'fb' Platform devices registered:
[ 304.298345] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 304.298378] fbtft_device: itdb28fb id=0 pdata? yes
But i don't recieve message like this:
graphics fb1: fb_ili9320 frame buffer, 320x240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi0.0 at 32 MHz
I try to input command in terminal:
FRAMEBUFFER=/dev/fb0 startx
con2fbmap 1 0
The itdb28fb don't work.
Thanks again.

Provide single driver

Hi!
Couldn't you provide a singe driver to build the
module for the running kernel? The in-tree building
makes many time effort when building the whole
kernel on the pi.

display: hy-1.8 spi

Not working on st7735
I did everything according to the instructions where I could make a mistake?

HY-1.8 J1 Raspberry Pi P1
1 - GND - P1.6 GND
2 - VCC - P1.2 5V Power
3 - NC
4 - NC
5 - NC
6 - RESET - P1.22 GPIO25
7 - A0 - P1.18 GPIO24
8 - SDA - P1.19 GPIO10 MOSI
9 - SCK - P1.23 GPIO11 SCLK
10 - CS - P1.24 GPIO8 CE0
11 - SD_SCK
12 - SD_MISO
13 - SD_MOSI
14 - SD_CS
15 - LED+ - P1.4 5V Power
16 - LED- - P1.9 GND

dmesg log:
http://pastebin.com/Kkq6fQGh

LPH88xxxx supported

Here is the code for lph88fb.c

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
#include <linux/types.h>

#include "fbtft.h"

#define DRVNAME     "lph88fb"
#define WIDTH       176
#define HEIGHT      132


/* Module Parameter: debug  (also available through sysfs) */
MODULE_PARM_DEBUG;

u8 buffer[(WIDTH*HEIGHT*2)+1];

void lph88fb_write(struct fbtft_par *par, uint8_t a, uint8_t b, uint8_t c) {
    uint8_t tx[3];
    tx[0] = a;
    tx[1] = b;
    tx[2] = c;
    par->fbtftops.write(par, tx, 3);
}

void lph88fb_reset(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_RESET, par->info->device, "[IN] %s()\n", __func__);

    if (par->gpio.reset == -1)
        return;

    gpio_set_value(par->gpio.reset, 0);
    msleep(50);
    gpio_set_value(par->gpio.reset, 1);
    msleep(50);

    fbtft_dev_dbg(DEBUG_RESET, par->info->device, "[OUT] %s()\n", __func__);
}

void lph88fb_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
    uint16_t x,y,c;

    fbtft_fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par, par->info->device, "[IN] %s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);

    // set y
    y = (ye<<8)|(ys);
    lph88fb_write(par, 0x74, 0x00, 0x16);
    lph88fb_write(par, 0x76, y>>8, y);

    // set x
    x = (xe<<8)|(xs);
    lph88fb_write(par, 0x74, 0x00, 0x17);
    lph88fb_write(par, 0x76, x>>8, x);

    // set cursor
    c = ((xs<<8)|ys);
    lph88fb_write(par, 0x74, 0x00, 0x21);
    lph88fb_write(par, 0x76, c>>8, c);

    fbtft_fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par, par->info->device, "[OUT] %s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
}

static int lph88fb_init_display(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_INIT_DISPLAY, par->info->device, "[IN] %s()\n", __func__);

    // Reset the device
    par->fbtftops.reset(par);

    // Display off
    lph88fb_write(par, 0x74, 0x00, 0x07);
    lph88fb_write(par, 0x76, 0x00, 0x00);
    msleep(10);

    //power on sequence
    //lcd drive control
    lph88fb_write(par, 0x74, 0x00, 0x02);
    lph88fb_write(par, 0x76, 0x04, 0x00);

    //power control 3: VC        //step 1
    lph88fb_write(par, 0x74, 0x00, 0x0C);
    lph88fb_write(par, 0x76, 0x00, 0x01);

    //power control 4: VRH
    lph88fb_write(par, 0x74, 0x00, 0x0D);
    lph88fb_write(par, 0x76, 0x00, 0x06);

    //power control 2: CAD
    lph88fb_write(par, 0x74, 0x00, 0x04);
    lph88fb_write(par, 0x76, 0x00, 0x00);

    //power control 4: VRL
    lph88fb_write(par, 0x74, 0x00, 0x0D);
    lph88fb_write(par, 0x76, 0x06, 0x16);

    //power control 5: VCM
    lph88fb_write(par, 0x74, 0x00, 0x0E);
    lph88fb_write(par, 0x76, 0x00, 0x10);

    //power control 5: VDV
    lph88fb_write(par, 0x74, 0x00, 0x0E);
    lph88fb_write(par, 0x76, 0x10, 0x10);

    //power control 1: BT        //step 2
    lph88fb_write(par, 0x74, 0x00, 0x03);
    lph88fb_write(par, 0x76, 0x00, 0x00);

    //power control 1: DC
    lph88fb_write(par, 0x74, 0x00, 0x03);
    lph88fb_write(par, 0x76, 0x00, 0x00);

    //power control 1: AP
    lph88fb_write(par, 0x74, 0x00, 0x03);
    lph88fb_write(par, 0x76, 0x00, 0x0C);
    msleep(40);

    //power control 5: VCOMG     //step 3
    lph88fb_write(par, 0x74, 0x00, 0x0E);
    lph88fb_write(par, 0x76, 0x2D, 0x1F);
    msleep(40);

    //power control 4: PON       //step 4
    lph88fb_write(par, 0x74, 0x00, 0x0D);
    lph88fb_write(par, 0x76, 0x06, 0x16);
    msleep(100);

    //Entry mode ++
    lph88fb_write(par, 0x74, 0x00, 0x05);
    lph88fb_write(par, 0x76, 0x00, 0x38);

    lph88fb_set_addr_win(par, 0, 0, (WIDTH-1), (HEIGHT-1));

    //display on sequence (bit2 = reversed colors)

    //display control: D0
    lph88fb_write(par, 0x74, 0x00, 0x07);
    lph88fb_write(par, 0x76, 0x00, 0x05);

    //display control: GON
    lph88fb_write(par, 0x74, 0x00, 0x07);
    lph88fb_write(par, 0x76, 0x00, 0x25);

    //display control: D1
    lph88fb_write(par, 0x74, 0x00, 0x07);
    lph88fb_write(par, 0x76, 0x00, 0x27);

    //display control: DTE
    lph88fb_write(par, 0x74, 0x00, 0x07);
    lph88fb_write(par, 0x76, 0x00, 0x37);
    msleep(10);

    fbtft_dev_dbg(DEBUG_INIT_DISPLAY, par->info->device, "[OUT] %s()\n", __func__);
    return 0;
}

int lph88fb_write_vmem(struct fbtft_par *par)
{
    u8 *vmem8;
    size_t remain;
    int i;
    int ret = 0;
    size_t offset, len;

    offset = par->dirty_lines_start * par->info->fix.line_length;
    len = (par->dirty_lines_end - par->dirty_lines_start + 1) * par->info->fix.line_length;
    remain = len;
    vmem8 = par->info->screen_base + offset;

    fbtft_fbtft_dev_dbg(DEBUG_WRITE_VMEM, par, par->info->device, "[IN] %s: offset=%d, len=%d\n", __func__, offset, len);

    if (par->gpio.dc != -1)
        gpio_set_value(par->gpio.dc, 1);

    // Write prefix 1
    lph88fb_write(par, 0x74, 0x00, 0x22);

    // Shit on this
    buffer[0] = 0x76;
    for (i=0;i<len;i+=2) {
        buffer[i+1]   = vmem8[i+1];
        buffer[i+2]   = vmem8[i];
    }


    ret = par->fbtftops.write(par, buffer, len+1);

    fbtft_fbtft_dev_dbg(DEBUG_WRITE_VMEM, par, par->info->device, "[OUT] %s: offset=%d, len=%d, ret=%d\n", __func__, offset, len, ret);

    return ret;
}


struct fbtft_display lph88fb_display = {
    .width = WIDTH,
    .height = HEIGHT,
};

static int lph88fb_probe(struct spi_device *spi)
{
    struct fb_info *info;
    struct fbtft_par *par;
    int ret;

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[IN] %s()\n", __func__);

    info = fbtft_framebuffer_alloc(&lph88fb_display, &spi->dev);
    if (!info)
        return -ENOMEM;

    par = info->par;
    par->spi = spi;
    fbtft_debug_init(par);
    par->fbtftops.init_display = lph88fb_init_display;
    par->fbtftops.reset = lph88fb_reset;
    par->fbtftops.set_addr_win = lph88fb_set_addr_win;
    par->fbtftops.write_vmem = lph88fb_write_vmem;

    ret = fbtft_register_framebuffer(info);
    if (ret < 0)
        goto out_release;

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[OUT] %s()\n", __func__);
    return 0;

out_release:
    fbtft_framebuffer_release(info);

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[OUT] %s()\n", __func__);
    return ret;
}

static int lph88fb_remove(struct spi_device *spi)
{
    struct fb_info *info = spi_get_drvdata(spi);

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "%s()\n", __func__);

    if (info) {

        struct fbtft_par *par = info->par;

        lph88fb_write(par, 0x74, 0x00, 0x0D);
        lph88fb_write(par, 0x76, 0x05, 0x05);
        lph88fb_write(par, 0x74, 0x00, 0x0E);
        lph88fb_write(par, 0x76, 0x1D, 0x1F);
        lph88fb_write(par, 0x74, 0x00, 0x03);
        lph88fb_write(par, 0x76, 0x00, 0x00);

        fbtft_unregister_framebuffer(info);
        fbtft_framebuffer_release(info);
    }

    return 0;
}

static struct spi_driver lph88fb_driver = {
    .driver = {
        .name   = DRVNAME,
        .owner  = THIS_MODULE,
    },
    .probe  = lph88fb_probe,
    .remove = lph88fb_remove,
};

static int __init lph88fb_init(void)
{
    fbtft_pr_debug("\n\n"DRVNAME": %s()\n", __func__);
    return spi_register_driver(&lph88fb_driver);
}

static void __exit lph88fb_exit(void)
{
    fbtft_pr_debug(DRVNAME": %s()\n", __func__);
    spi_unregister_driver(&lph88fb_driver);
}

/* ------------------------------------------------------------------------- */

module_init(lph88fb_init);
module_exit(lph88fb_exit);

MODULE_DESCRIPTION("LPH88 S65 LCD Driver");
MODULE_AUTHOR("Mirko Kohns");
MODULE_LICENSE("GPL");

extract from fbtft_devices.c

{
        .modalias = "lph88fb",
        .max_speed_hz = 13000000,
        .mode = SPI_MODE_0,
        .platform_data = &(struct fbtft_platform_data) {
            .gpios = (const struct fbtft_gpio []) {
                { "reset", 25 },
                {},
            },
        }
    }

extract from Kconfig

config FB_LPH88
    tristate "FB driver for the LPH88 (Siemens S65) LCD display"
    depends on FB_TFT
    help
      Framebuffer support for the LPH88 LCD display in 8-bit SPI mode.

'rotate' and 'bgr' driver arguments should be device arguments

Rotation and BGR control is currently implemented as driver arguments.
If two displays use the same driver, but need different rotation, this is not possible.

To remedy this, a process has been started:

  • Support in core: 0f348ed
  • fbtft_device supports 'rotate' and 'bgr' arguments: cce3681
  • ili9341fb is the first driver to implement this: 6af75a0

Drivers that needs to be changed:

  • adafruit22fb
  • flexfb
  • itdb28fb
  • sainsmart18fb
  • sainsmart32fb

ITDB02-3.2WD support or how to write a driver?

Hi,

I bought a ITDB02-3.2WD. I thought it was supported, but mistook it for the non-widescreen variant. There is sample code for the adruino (And it is supported by utft ). So adding support for this display seems to be pretty straight forward, but I'm stuck in several places.

How To specify that this device needs 16-bit spi? The display controller is hard-wired to 16-bit mode.

Where is the interface to the driver? Which functions do I have to implement? I'd expect to implement a method to draw a pitlxel? What is the most straightforward method? vmem seems easy, just display pixel for pixel from par->info->screen_base right? Do I have to specify the method this somewhere? What is the palette in the framebuffer? rrrrrggggggbbbbb? Is it actually a good idea to flush the complete display or are there better ways?

The sample code often uses functions to pull CS to ground and to set it to high. How do i do this? write_cmd(0x20) for the first and write_cmd(0x21) for the later?

Here is a gist, sadly completely untested and still incomplete.

https://gist.github.com/rtzui/6089580

Multiple displays

Hi! Thanks for your excellent work --

It says on in the documentation that "a driver can support more than one device." Does this mean that fbtft is working with multiple displays? I have two SSD1331s (I just submitted the driver in a pull request, based on the SSD1351 driver), each with its own CS line, but I'm not sure how/if FBTFT supports both. Could you describe this briefly?

Can't do easy fbtft development with notro/rpi-firmware

With the FBTFT image it's easy to do FBTFT driver development: https://github.com/notro/fbtft/wiki/Development

When I try this with the rpi-update release, I end up with: Unable to handle kernel NULL pointer dereference at virtual address 00000004

I follow the guide except that I skip making a new driver, just rebuilding.
This is used to copy .config and Module.symvers

sudo cp /root/.rpi-firmware/extra/{.config,Module.symvers} /tmp && cp -v /tmp/{.config,Module.symvers} ~/linux

First I try loading a driver from the build directory, but using the installed fbtft module:

$ sudo modprobe fbtft
$ sudo insmod ~/linux/drivers/video/fbtft/fb_ili9320.ko
Error: could not insert module /home/pi/linux/drivers/video/fbtft/fb_ili9320.ko: Invalid parameters
$ dmesg
[  945.766702] fb_hello: disagrees about version of symbol fbtft_remove_common
[  945.777462] fb_hello: Unknown symbol fbtft_remove_common (err -22)
[  945.786167] fb_hello: disagrees about version of symbol fbtft_probe_common
[  945.795441] fb_hello: Unknown symbol fbtft_probe_common (err -22)
[ 1888.454673] fb_ili9320: disagrees about version of symbol fbtft_remove_common
[ 1888.463425] fb_ili9320: Unknown symbol fbtft_remove_common (err -22)
[ 1888.472668] fb_ili9320: disagrees about version of symbol fbtft_probe_common
[ 1888.482336] fb_ili9320: Unknown symbol fbtft_probe_common (err -22)

Then I install all the fbtft modules

$ sudo cp -v /lib/modules/$(uname -r)/build/drivers/video/fbtft/*.ko /lib/modules/$(uname -r)/kernel/drivers/video/fbtft/
`/lib/modules/3.6.11+/build/drivers/video/fbtft/ads7846_device.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/ads7846_device.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_hx8340bn.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_hx8340bn.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_hx8347d.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_hx8347d.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_ili9320.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_ili9320.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_ili9325.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_ili9325.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_ili9341.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_ili9341.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_pcd8544.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_pcd8544.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_ssd1289.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_ssd1289.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_ssd1351.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_ssd1351.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fb_st7735r.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fb_st7735r.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fbtft_device.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fbtft_device.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/fbtft.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/fbtft.ko'
`/lib/modules/3.6.11+/build/drivers/video/fbtft/flexfb.ko' -> `/lib/modules/3.6.11+/kernel/drivers/video/fbtft/flexfb.ko'
$ sudo depmod

Reload the new fbtft

$ sudo modprobe -r fbtft
$ sudo modprobe fbtft

Load a driver

$ sudo modprobe fb_ili9320

Now the computer hangs and this shows up on the console

[ 1992.464662] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 1992.476398] pgd = d9ef8000
[ 1992.480907] [00000004] *pgd=00000000
[ 1992.486268] Internal error: Oops: 5 [#1] PREEMPT ARM

Entering kdb (current=0xd9e9a280, pid 7955) Oops: (null)
due to oops @ 0xc005d2b8

Pid: 7955, comm:             modprobe
CPU: 0    Tainted: G           O  (3.6.11+ #1)
PC is at module_put+0x28/0x6c
LR is at sys_init_module+0x428/0x19bc
pc : [<c005d2b8>]    lr : [<c005e500>]    psr: a0000013
sp : d9f61ef0  ip : 00000000  fp : 00000324
r10: 00000024  r9 : bf0f6d9c  r8 : 0000001c
r7 : 00000001  r6 : d9f2e720  r5 : bf0f6d54  r4 : d9f60000
r3 : 00000000  r2 : 00000000  r1 : 00000001  r0 : bf0f6d54
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 00c5387d  Table: 19ef8008  DAC: 00000015
[<c0013c64>] (unwind_backtrace+0x0/0xf0) from [<c00732b8>] (kdb_dumpregs+0x28/0x50)
[<c00732b8>] (kdb_dumpregs+0x28/0x50) from [<c007563c>] (kdb_main_loop+0x3a8/0x6fc)
[<c007563c>] (kdb_main_loop+0x3a8/0x6fc) from [<c0077d20>] (kdb_stub+0x154/0x380)
[<c0077d20>] (kdb_stub+0x154/0x380) from [<c006ee5c>] (kgdb_handle_exception+0x1f8/0x668)
[<c006ee5c>] (kgdb_handle_exception+0x1f8/0x668) from [<c00133e4>] (kgdb_notify+0x24/0x40)
[<c00133e4>] (kgdb_notify+0x24/0x40) from [<c039fdb4>] (notifier_call_chain+0x44/0x84)
[<c039fdb4>] (notifier_call_chain+0x44/0x84) from [<c039fe2c>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c039fe2c>] (__atomic_notifier_call_chain+0x38/0x4c) from [<c039fe58>] (atomic_notifier_call_chain+0x18/0x20)
[<c039fe58>] (atomic_notifier_call_chain+0x18/0x20) from [<c039fe98>] (notify_die+0x38/0x44)
[<c039fe98>] (notify_die+0x38/0x44) from [<c0011138>] (die+0xc4/0x39c)
[<c0011138>] (die+0xc4/0x39c) from [<c0398bf8>] (__do_kernel_fault.part.9+0x54/0x74)
[<c0398bf8>] (__do_kernel_fault.part.9+0x54/0x74) from [<c039fad4>] (do_page_fault+0x1d8/0x3cc)
[<c039fad4>] (do_page_fault+0x1d8/0x3cc) from [<c000832c>] (do_DataAbort+0x34/0x98)
[<c000832c>] (do_DataAbort+0x34/0x98) from [<c039e2d8>] (__dabt_svc+0x38/0x60)
Exception stack(0xd9f61ea8 to 0xd9f61ef0)
1ea0:                   bf0f6d54 00000001 00000000 00000000 d9f60000 bf0f6d54
1ec0: d9f2e720 00000001 0000001c bf0f6d9c 00000024 00000324 00000000 d9f61ef0
1ee0: c005e500 c005d2b8 a0000013 ffffffff
[<c039e2d8>] (__dabt_svc+0x38/0x60) from [<c005d2b8>] (module_put+0x28/0x6c)
[<c005d2b8>] (module_put+0x28/0x6c) from [<c005e500>] (sys_init_module+0x428/0x19bc)
[<c005e500>] (sys_init_module+0x428/0x19bc) from [<c000db60>] (ret_fast_syscall+0x0/0x30)
more>
kdb>

I have no idea what goes wrong here.

SSD1351 Chipset Driver

This is the driver for the SSD1351 chipset.

These displays and shields can currently be pre-ordered from ILSoft as we've just been kickstarted and waiting for the manufacturing.

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>

#include "fbtft.h"

#define DRVNAME     "ssd1351fb"
#define WIDTH       128
#define HEIGHT      128

/* Module Parameter: debug  (also available through sysfs) */
MODULE_PARM_DEBUG;

void ssd1351fb_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
    fbtft_fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par, par->info->device, "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);

    write_cmd(par, 0x15);
    write_data(par, xs);
    write_data(par, xe);

    write_cmd(par, 0x75);
    write_data(par, ys);
    write_data(par, ye);

    write_cmd(par, 0x5c);   
}

static int ssd1351fb_init_display(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_INIT_DISPLAY, par->info->device, "%s()\n", __func__);

    // Display DC
    gpio_set_value(par->gpio.dc, 1);

    // Reset the device.
    par->fbtftops.reset(par);

    // Write the init sequence.
    write_cmd(par, 0xfd); // Command Lock
    write_data(par, 0x12);

    write_cmd(par, 0xfd); // Command Lock
    write_data(par, 0xb1);

    write_cmd(par, 0xae); // Display Off

    write_cmd(par, 0xb3); // Front Clock Div
    write_data(par, 0xf1);

    write_cmd(par, 0xca); // Set Mux Ratio
    write_data(par, 0x7f);

    write_cmd(par, 0xa0); // Set Colour Depth
    write_data(par, 0x74); // 0xb4

    write_cmd(par, 0x15); // Set Column Address
    write_data(par, 0x00);
    write_data(par, 0x7f);

    write_cmd(par, 0x75); // Set Row Address
    write_data(par, 0x00);
    write_data(par, 0x7f);

    write_cmd(par, 0xa1); // Set Display Start Line
    write_data(par, 0x00);

    write_cmd(par, 0xa2); // Set Display Offset
    write_data(par, 0x00);

    write_cmd(par, 0xb5); // Set GPIO
    write_data(par, 0x00);

    write_cmd(par, 0xab); // Set Function Selection
    write_data(par, 0x01);

    write_cmd(par, 0xb1); // Set Phase Length
    write_data(par, 0x32);

    write_cmd(par, 0xb4); // Set Segment Low Voltage
    write_data(par, 0xa0);
    write_data(par, 0xb5);
    write_data(par, 0x55);

    write_cmd(par, 0xbb); // Set Precharge Voltage
    write_data(par, 0x17);

    write_cmd(par, 0xbe); // Set VComH Voltage
    write_data(par, 0x05);

    write_cmd(par, 0xc1); // Set Contrast
    write_data(par, 0xc8);
    write_data(par, 0x80);
    write_data(par, 0xc8);

    write_cmd(par, 0xc7); // Set Master Contrast
    write_data(par, 0x0f);

    write_cmd(par, 0xb6); // Set Second Precharge Period
    write_data(par, 0x01);

    write_cmd(par, 0xa6); // Set Display Mode Reset

    write_cmd(par, 0xb8); // Set CMD Grayscale Lookup
    write_data(par, 0x05);
    write_data(par, 0x06);
    write_data(par, 0x07);
    write_data(par, 0x08);
    write_data(par, 0x09);
    write_data(par, 0x0a);
    write_data(par, 0x0b);
    write_data(par, 0x0c);
    write_data(par, 0x0D);
    write_data(par, 0x0E);
    write_data(par, 0x0F);
    write_data(par, 0x10);
    write_data(par, 0x11);
    write_data(par, 0x12);
    write_data(par, 0x13);
    write_data(par, 0x14);
    write_data(par, 0x15);
    write_data(par, 0x16);
    write_data(par, 0x18);
    write_data(par, 0x1a);
    write_data(par, 0x1b);
    write_data(par, 0x1C);
    write_data(par, 0x1D);
    write_data(par, 0x1F);
    write_data(par, 0x21);
    write_data(par, 0x23);
    write_data(par, 0x25);
    write_data(par, 0x27);
    write_data(par, 0x2A);
    write_data(par, 0x2D);
    write_data(par, 0x30);
    write_data(par, 0x33);
    write_data(par, 0x36);
    write_data(par, 0x39);
    write_data(par, 0x3C);
    write_data(par, 0x3F);
    write_data(par, 0x42);
    write_data(par, 0x45);
    write_data(par, 0x48);
    write_data(par, 0x4C);
    write_data(par, 0x50);
    write_data(par, 0x54);
    write_data(par, 0x58);
    write_data(par, 0x5C);
    write_data(par, 0x60);
    write_data(par, 0x64);
    write_data(par, 0x68);
    write_data(par, 0x6C);
    write_data(par, 0x70);
    write_data(par, 0x74);
    write_data(par, 0x78);
    write_data(par, 0x7D);
    write_data(par, 0x82);
    write_data(par, 0x87);
    write_data(par, 0x8C);
    write_data(par, 0x91);
    write_data(par, 0x96);
    write_data(par, 0x9B);
    write_data(par, 0xA0);
    write_data(par, 0xA5);
    write_data(par, 0xAA);
    write_data(par, 0xAF);
    write_data(par, 0xB4);

    write_cmd(par, 0xaf); // Set Sleep Mode Display On

    par->fbtftops.set_addr_win(par, 0, 0, WIDTH - 1, HEIGHT - 1);

    return 0;
}

static int ssd1351fb_verify_gpios(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_VERIFY_GPIOS, par->info->device, "%s()\n", __func__);

    if (par->gpio.dc < 0)
    {
        dev_err(par->info->device, "Missing info about 'dc' gpio. Aborting.\n");
        return -EINVAL;
    }

    return 0;
}

struct fbtft_display ssd1351fb_display = {
    .width = WIDTH,
    .height = HEIGHT,
};

static int ssd1351fb_probe(struct spi_device *spi)
{
    struct fb_info *info;
    struct fbtft_par *par;
    int ret;

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "%s()\n", __func__);

    info = fbtft_framebuffer_alloc(&ssd1351fb_display, &spi->dev);

    if (!info) return -ENOMEM;

    par = info->par;
    par->spi = spi;

    fbtft_debug_init(par);

    par->fbtftops.init_display  = ssd1351fb_init_display;
    par->fbtftops.set_addr_win  = ssd1351fb_set_addr_win;
    par->fbtftops.verify_gpios  = ssd1351fb_verify_gpios;

    ret = fbtft_register_framebuffer(info);

    if (ret >= 0) return 0;

    fbtft_framebuffer_release(info);

    return ret;
}

static int ssd1351fb_remove(struct spi_device *spi)
{
    struct fb_info *info = spi_get_drvdata(spi);

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "%s()\n", __func__);

    if (info)
    {
        fbtft_unregister_framebuffer(info);
        fbtft_framebuffer_release(info);
    }

    return 0;
}

static struct spi_driver ssd1351fb_driver =
{
    .driver =
    {
        .name   = DRVNAME,
        .owner  = THIS_MODULE,
    },
    .probe  = ssd1351fb_probe,
    .remove = ssd1351fb_remove,
};

static int __init ssd1351fb_init(void)
{
    fbtft_pr_debug("\n\n"DRVNAME": %s()\n", __func__);

    return spi_register_driver(&ssd1351fb_driver);
}

static void __exit ssd1351fb_exit(void)
{
    fbtft_pr_debug(DRVNAME": %s()\n", __func__);

    spi_unregister_driver(&ssd1351fb_driver);
}

module_init(ssd1351fb_init);
module_exit(ssd1351fb_exit);

MODULE_DESCRIPTION("SSD1351 OLED Driver");
MODULE_AUTHOR("James Davies");
MODULE_LICENSE("GPL");

And for the fbtft_device.c. This is to work with the Pi Shield.

{
    .modalias = "ssd1351fb",
    .max_speed_hz = 20000000,
    .mode = SPI_MODE_0,
    .platform_data = &(struct fbtft_platform_data) {
        .gpios = (const struct fbtft_gpio []) {
            { "reset", 24 },
            { "dc", 25 },
            {},
        },
    }
}

And finally the Kconfig

config FB_SSD1351
    tristate "FB driver for the SSD1351 1.5\" OLED display"
    depends on FB_TFT
    help
      Framebuffer support for the SSD1351 1.5\" OLED display in 8-bit SPI mode.

LS020 supported

Here is the code for ls020fb.c

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
#include <linux/types.h>

#include "fbtft.h"

#define DRVNAME     "ls020fb"
#define WIDTH       176
#define HEIGHT      132


/* Module Parameter: debug  (also available through sysfs) */
MODULE_PARM_DEBUG;

u8 buffer[(WIDTH*HEIGHT*2)];

int ls020fb_writeData(struct fbtft_par *par, void *buf, size_t s) {
    int ret;
    gpio_set_value(par->gpio.dc, 0);
    ret = par->fbtftops.write(par, buf, s);
    return ret;
}


void ls020fb_writeCmd(struct fbtft_par *par, uint8_t a, uint8_t b) {
    uint8_t tx[2];
    tx[0] = a;
    tx[1] = b;
    gpio_set_value(par->gpio.dc, 1);
    par->fbtftops.write(par, tx, 2);
}

void ls020fb_reset(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_RESET, par->info->device, "[IN] %s()\n", __func__);

    if (par->gpio.reset == -1)
        return;

    gpio_set_value(par->gpio.reset, 0);
    msleep(50);
    gpio_set_value(par->gpio.reset, 1);
    msleep(50);

    fbtft_dev_dbg(DEBUG_RESET, par->info->device, "[OUT] %s()\n", __func__);
}

void ls020fb_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
{
    fbtft_fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par, par->info->device, "[IN] %s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);

    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x08, ys);                //set y0
    ls020fb_writeCmd(par, 0x09, ye);                //set y1
    ls020fb_writeCmd(par, 0x0A, (WIDTH-1)-xs);  //set x0
    ls020fb_writeCmd(par, 0x0B, (WIDTH-1)-xe);  //set x1
    ls020fb_writeCmd(par, 0x06, ys);                //set y cursor pos
    ls020fb_writeCmd(par, 0x07, (WIDTH-1)-xs);  //set x cursor pos

    fbtft_fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par, par->info->device, "[OUT] %s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);
}

static int ls020fb_init_display(struct fbtft_par *par)
{
    fbtft_dev_dbg(DEBUG_INIT_DISPLAY, par->info->device, "[IN] %s()\n", __func__);

    // Disable DC alias RS
    gpio_set_value(par->gpio.dc, 1);

    // Reset the device
    par->fbtftops.reset(par);

    // Display off
    ls020fb_writeCmd(par, 0xFD, 0xFD);
    ls020fb_writeCmd(par, 0xFD, 0xFD);
    msleep(50);

    //init 1
    ls020fb_writeCmd(par, 0xEF, 0x00);
    ls020fb_writeCmd(par, 0xEE, 0x04);
    ls020fb_writeCmd(par, 0x1B, 0x04);
    ls020fb_writeCmd(par, 0xFE, 0xFE);
    ls020fb_writeCmd(par, 0xFE, 0xFE);
    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x4A, 0x04);
    ls020fb_writeCmd(par, 0x7F, 0x3F);
    ls020fb_writeCmd(par, 0xEE, 0x04);
    ls020fb_writeCmd(par, 0x43, 0x06);

    msleep(7); //important 7ms

    //init 2
    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x09, 0x83);
    ls020fb_writeCmd(par, 0x08, 0x00);
    ls020fb_writeCmd(par, 0x0B, 0xAF);
    ls020fb_writeCmd(par, 0x0A, 0x00);
    ls020fb_writeCmd(par, 0x05, 0x00);
    ls020fb_writeCmd(par, 0x06, 0x00);
    ls020fb_writeCmd(par, 0x07, 0x00);
    ls020fb_writeCmd(par, 0xEF, 0x00);
    ls020fb_writeCmd(par, 0xEE, 0x0C);
    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x00, 0x80);
    ls020fb_writeCmd(par, 0xEF, 0xB0);
    ls020fb_writeCmd(par, 0x49, 0x02);
    ls020fb_writeCmd(par, 0xEF, 0x00);
    ls020fb_writeCmd(par, 0x7F, 0x01);
    ls020fb_writeCmd(par, 0xE1, 0x81);
    ls020fb_writeCmd(par, 0xE2, 0x02);
    ls020fb_writeCmd(par, 0xE2, 0x76);
    ls020fb_writeCmd(par, 0xE1, 0x83);

    msleep(50);

    //display on
    ls020fb_writeCmd(par, 0x80, 0x01);
    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x00, 0x00);

    //display options
    ls020fb_writeCmd(par, 0xEF, 0x90);
    ls020fb_writeCmd(par, 0x01, 0x40); //x1->x0, y0->y1
    ls020fb_writeCmd(par, 0x05, 0x04); //0x04=rotate, 0x00=normal

    ls020fb_set_addr_win(par, 0, 0, (WIDTH-1), (HEIGHT-1));

    fbtft_dev_dbg(DEBUG_INIT_DISPLAY, par->info->device, "[OUT] %s()\n", __func__);
    return 0;
}

int ls020fb_write_vmem(struct fbtft_par *par)
{
    u8 *vmem8;
    size_t remain;
    int i;
    int ret = 0;
    size_t offset, len;

    offset = par->dirty_lines_start * par->info->fix.line_length;
    len = (par->dirty_lines_end - par->dirty_lines_start + 1) * par->info->fix.line_length;
    remain = len;
    vmem8 = par->info->screen_base + offset;

    fbtft_fbtft_dev_dbg(DEBUG_WRITE_VMEM, par, par->info->device, "[IN] %s: offset=%d, len=%d\n", __func__, offset, len);

    // Shit on this
    for (i=0;i<len;i+=2) {
        buffer[i]   = vmem8[i+1];
        buffer[i+1]   = vmem8[i];
    }

    ret = ls020fb_writeData(par, buffer, len);

    fbtft_fbtft_dev_dbg(DEBUG_WRITE_VMEM, par, par->info->device, "[OUT] %s: offset=%d, len=%d, ret=%d\n", __func__, offset, len, ret);

    return ret;
}


struct fbtft_display ls020fb_display = {
    .width = WIDTH,
    .height = HEIGHT,
};

static int ls020fb_probe(struct spi_device *spi)
{
    struct fb_info *info;
    struct fbtft_par *par;
    int ret;

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[IN] %s()\n", __func__);

    info = fbtft_framebuffer_alloc(&ls020fb_display, &spi->dev);
    if (!info)
        return -ENOMEM;

    par = info->par;
    par->spi = spi;
    fbtft_debug_init(par);
    par->fbtftops.init_display = ls020fb_init_display;
    par->fbtftops.reset = ls020fb_reset;
    par->fbtftops.set_addr_win = ls020fb_set_addr_win;
    par->fbtftops.write_vmem = ls020fb_write_vmem;

    ret = fbtft_register_framebuffer(info);
    if (ret < 0)
        goto out_release;

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[OUT] %s()\n", __func__);
    return 0;

out_release:
    fbtft_framebuffer_release(info);

    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "[OUT] %s()\n", __func__);
    return ret;
}

static int ls020fb_remove(struct spi_device *spi)
{
    struct fb_info *info = spi_get_drvdata(spi);


    fbtft_dev_dbg(DEBUG_DRIVER_INIT_FUNCTIONS, &spi->dev, "%s()\n", __func__);

    if (info) {
        struct fbtft_par *par = info->par;

        ls020fb_writeCmd(par, 0xEF, 0x00);
        ls020fb_writeCmd(par, 0x7E, 0x04);
        msleep(62);

        ls020fb_writeCmd(par, 0xEF, 0xB0);
        ls020fb_writeCmd(par, 0x5A, 0x48);
        ls020fb_writeCmd(par, 0xEF, 0x00);
        ls020fb_writeCmd(par, 0x7F, 0x01);
        msleep(62);

        ls020fb_writeCmd(par, 0xEF, 0xB0);
        ls020fb_writeCmd(par, 0x64, 0xFF);
        ls020fb_writeCmd(par, 0x65, 0x00);
        ls020fb_writeCmd(par, 0xEF, 0x00);
        ls020fb_writeCmd(par, 0x7F, 0x01);
        msleep(62);

        ls020fb_writeCmd(par, 0xe2, 0x62);
        msleep(94);

        ls020fb_writeCmd(par, 0xe2, 0x02);
        msleep(62);

        ls020fb_writeCmd(par, 0xef, 0xb0);
        ls020fb_writeCmd(par, 0xbc, 0x02);
        ls020fb_writeCmd(par, 0xef, 0x00);
        ls020fb_writeCmd(par, 0x7f, 0x01);
        msleep(22);

        ls020fb_writeCmd(par, 0xe2, 0x00);
        msleep(22);

        ls020fb_writeCmd(par, 0x80, 0x00);
        ls020fb_writeCmd(par, 0xe2, 0x04);
        msleep(22);

        ls020fb_writeCmd(par, 0xe2, 0x00);
        msleep(22);

        ls020fb_writeCmd(par, 0xe1, 0x00);
        msleep(22);

        ls020fb_writeCmd(par, 0xef, 0xb0);
        ls020fb_writeCmd(par, 0xbc, 0x00);
        ls020fb_writeCmd(par, 0xef, 0x00);
        ls020fb_writeCmd(par, 0x7f, 0x01);
        msleep(62);

        ls020fb_reset(par);

        fbtft_unregister_framebuffer(info);
        fbtft_framebuffer_release(info);
    }

    return 0;
}

static struct spi_driver ls020fb_driver = {
    .driver = {
        .name   = DRVNAME,
        .owner  = THIS_MODULE,
    },
    .probe  = ls020fb_probe,
    .remove = ls020fb_remove,
};

static int __init ls020fb_init(void)
{
    fbtft_pr_debug("\n\n"DRVNAME": %s()\n", __func__);
    return spi_register_driver(&ls020fb_driver);
}

static void __exit ls020fb_exit(void)
{
    fbtft_pr_debug(DRVNAME": %s()\n", __func__);
    spi_unregister_driver(&ls020fb_driver);
}

/* ------------------------------------------------------------------------- */

module_init(ls020fb_init);
module_exit(ls020fb_exit);

MODULE_DESCRIPTION("ls020 S65 LCD Driver");
MODULE_AUTHOR("Mirko Kohns");
MODULE_LICENSE("GPL");

extract from fbtft_devices.c

{
        .modalias = "ls020fb",
        .max_speed_hz = 13000000,
        .mode = SPI_MODE_0,
        .platform_data = &(struct fbtft_platform_data) {
            .gpios = (const struct fbtft_gpio []) {
                { "reset", 25 },
                { "dc", 24 },
                {},
            },
        }
    }

extract from Kconfig

config FB_LS020
    tristate "FB driver for the LS020 (Siemens S65) LCD display"
    depends on FB_TFT
    help
      Framebuffer support for the LS020 LCD display in 8-bit SPI mode.

ERROR: could not insert 'fbtft_device': Invalid argument

I have tried building the kernel from source. I have tried using a preconfigured image and I have tried a standard image updated with rpi-update. I have not had success with any.

I am able to modprobe fbtft, but not with the DMA option. Well it does not complain about DMA, but I don't get the message I should.

dmesg shows this:
[ 587.664683] fbtft_device: SPI devices registered:
[ 587.664720] fbtft_device: 'fb' Platform devices registered:
[ 587.664743] fbtft_device: bcm2708_fb id=-1 pdata? no
[ 587.664781] fbtft_device: spi_busnum_to_master(0) returned NULL

Here is results from lsmod:
fbtft 31181 0
syscopyarea 3028 1 fbtft
sysfillrect 3338 1 fbtft
sysimgblt 2143 1 fbtft
fb_sys_fops 1444 1 fbtft

modprobe fbtft_device=adafruit22 get this:
ERROR: could not insert 'fbtft_device': Invalid argument

I don't see any spi devices in /dev nor do I see a /dev/fb1.

My last attempt was done following the instructions listed here:
https://github.com/notro/rpi-firmware

The rpi-update method. Did I need to get an older version of raspbian for my base? Am I best off just using one of the images that already has fbtft in it? I also noticed that is some cases getting a list of devices by using the name=list option the adafruit device was either listed as adafruit22 or adafruit22fb.

thanks

Boot console

Hello,

I have a question regarding boot console. The wiki said "Compile the driver into the kernel and provide device info in the platform file".
I know how to compile the driver into the kernel, but where is the "platform file"? Could
you provide an example how to do this?

Thanks in advance.

SSD1351: Change front clock divider from /2 to /1

This is a patch to change the SSD1351 front clock divider from /2 to /1. /2 is the default on reset I think, but /1 seems to yield slightly smoother motion when displaying animation, at a cost of very slightly higher power consumption.

From aa1a0dae6c4dca978ebd8a5f5cc0348b0d4f4ea3 Mon Sep 17 00:00:00 2001
From: Angus Gratton <[email protected]>
Date: Thu, 29 Aug 2013 13:56:38 +1000
Subject: [PATCH] SSD1351: Change front clock divider from /2 to /1 This is in
 the internal clock that determines pixel scan rate. Results in slightly
 smoother motion and very slightly higher power consumption.

Signed-off-by: Angus Gratton <[email protected]>

---
 fb_ssd1351.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fb_ssd1351.c b/fb_ssd1351.c
index aff00ae..dd6040c 100644
--- a/fb_ssd1351.c
+++ b/fb_ssd1351.c
@@ -37,7 +37,7 @@ static int init_display(struct fbtft_par *par)
    write_reg(par, 0xfd, 0x12); /* Command Lock */
    write_reg(par, 0xfd, 0xb1); /* Command Lock */
    write_reg(par, 0xae); /* Display Off */
-   write_reg(par, 0xb3, 0xf1); /* Front Clock Div */
+   write_reg(par, 0xb3, 0xf0); /* Front Clock Div - max DCLK, Divider/1 */
    write_reg(par, 0xca, 0x7f); /* Set Mux Ratio */
    write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */
    write_reg(par, 0x15, 0x00, 0x7f); /* Set Column Address */

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.