Closed martinlbb closed 9 years ago
The DMA capable spi-bcm2708 driver that I'm using doesn't support 9-bit. I work around this in FBTFT by zero padding the buffer and emulate using 8-bit (8x 9-bit = 9x 8-bit): https://github.com/notro/fbtft/blob/master/fbtft-io.c#L37
I you need native 9-bit support, you have to use the vanilla driver.
Hi Notro!
Thank you for this quick and usefull answer. I am gonna test it soon :)
And I let you know
Hi Notro,
I tried native 9 bit support with this ILI9341 screen. Unfortunately, nothing appear on screen, just backlight on.
Do you have any tip(s) to debug it, and make it running?
All the best!
Please give the command you use to load fbtft_device.
I have tried many configurations:
I am using a breadbord to test screen, and try swaping MISO/MOSI (we never know). No luck.
PINOUT (TFT <-> Raspi) TFT 5V -> PIN 2 TFT GND -> PIN 6 TFT RESET -> PIN 22 (Gpio 25) TFT LED -> PIN 12 (Gpio 18)
SDI -> MOSI PIN 19 SDO -> MISO PIN 21 SCL -> SCLK PIN 23
From datasheet, I guess this screen is a 9 bit SPI using 4 wires (SCL/MISO/MOSI/CS).
Backlight is working fine.
First try: sudo modprobe name=mi0283qt-9a cs=0 gpios=reset:25,led:18 speed=16000000 rotate=90
Second try: sudo modprobe name=mi0283qt-9a cs=0 gpios=reset:25,led:18 speed=32000000 rotate=90
Each time a /dev/fb1 device is created, and driver seems to be okay. But, if I try fbi or a X session, nothing happens.
What do you suggest Notro as a next step?
Last question: which spi-bcm2708 do I need to use? The DMA's one (on your repo) or vanillia one?
An STMPE610 is also hooked on this board on CE1, using your code it successfully initialize and run smoothly (internal gpio and touchscreen).
Many thanks for your help Notro :)
mi0283qt-9a uses the default init sequence in the driver: https://github.com/notro/fbtft/blob/master/fb_ili9341.c#L42
My guess is that you need a different init sequence. Does the datasheet have the sequence, or do you have access to some example code?
Factory datasheet is very short, with no init sequence. Here it is: https://www.wetransfer.com/downloads/325af0ca92b2a681d1d50e6b5a635bec20141113204538/853dcaf0d345c0e90a8581ce7a9c667520141113204538/15ddb8 (wrong link modified)
Nor I don't have access to any example code :(
It is hard to debug this, as I can't clearly identify if it is a software or hardware problem. This device a write only, isn't it?
Hi Notro!
I just had some informations from factory. They sent me a quick copy/paste of init sequence. And your guess was good. There is some differences :)
I try and let you know (crossing my fingers).
Hi,
I am working on supporting a new ILI9341 device, who use 9 bit SPI.
When I use spi_dev, to read ILI9341 register, with raspberry module, everything works fine. However, when switching to Nostro's module (using rpi_update, branch loadadble module), I have a invalid bits_per_word 9 (must be 8). And then a failure.
Screen is attached to Rapsberry using MISO/MOSI/SCLK/CS and RESET/LED. It's a MTF0280QT-17 V2.0.
On current raspberry kernel and module, I can read register:
modinfo:
After upgrading modules/kernel with Nostro's version, using
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
:Dmesg:
[ 109.261226] spidev spi0.0: setup: invalid bits_per_word 9 (must be 8)
Modinfo:
What can I do next? Replacing Nostro's spi8bcm2708 with rapsberry version?
Thanks :)