-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Can mipi-dbi-spi work with ili9488? #2
Comments
OK, a little about what I did in 4 days
insert into mkstft35.txt config file:
than...
uncomment: add in the end of file:
and after reboot:
How to get the correct data format (RGB666)? |
The driver does only support RGB565 as does fbtft. |
|
No the DRM driver doesn't support that. The fbtft driver supports that but it is worse than SPI with DMA because it bitbangs the bus. |
Thanks for your reply. Maybe you know the solution for this LCD? I could not find anything intelligible, except for the need to recompile the kernel, which is very difficult for me.... |
Sorry no, the documentation looks horrible as is often the case with these chinese displays. But on the positive side they do publish schematics and firmware sourcecode. It looks like the display has a USB 2.0 OTG connector, maybe you can persuade them to write firmware that implements the GUD USB display protocol: https://github.com/notro/gud/wiki/GUD-Protocol |
Perhaps we are talking about different LCDs. |
Indeed we do, Robin was missing from the one I looked at. Do you have a link I can look at? |
Sorry, but I did not find a datasheet for this LCD (marking CL35BC106-40A). This screen (MKS Robin TFT35 v1.0) is installed on many 3D printers with the mainmoard MKS Robin nano v1.1 - v1.2. It is very similar for MKS TS35 (https://github.com/makerbase-mks/MKS-TFT-Hardware/tree/master/MKS%20TS35/MKS%20TS35%20V2.0_002). But MKS TS35 have a LCD with ST7796 driver. There is only a pinout and a wiring diagram of pcb. I just made a few jumpers on the factory board to get the correct 4-wire SPI connection. |
Where did you find the initialization commands? |
|
Ok, a controller has certain configuration commands but it's the display panel that decides what the parameters should be. In other words: two displays with an ILI9488 controller can have two different controller configurations. You need to find a library or some code that works with your display and use those configuration commands. Is there any open source code for the |
Marlin 2.0 (https://github.com/MarlinFirmware/Marlin) has support for this mainboards and this LCD. When assembling sources for my configuration, ili9488 driver is used.
|
But I forgot to add. Robin nano 1.2 uses a parallel interface to TFT35 ... |
I don't think the interface matters for the commands since the interface is set using the IMx pins. |
I'm afraid (based on what I saw on some pages ILI9488 does not support RGB565 while in SPI mode. It has to be RGB666. My tests confirm this. When trying to use SPI+RGB565, display does not initialize properly. With RGB666 it initializes, but I see garbage of couse (like in 1st post) |
Hey. I have BigTreeTech tft35 spi v2.1 (https://github.com/bigtreetech/TFT35-SPI/tree/master/v2)
As I can see, there is no chance to use it? |
The readme in that repo shows that you can use the fbtft overlay in Raspberry Pi OS with the ili9486 option. fbtft does only support rgb565 so it looks like it should work. If I didn't mess up, this should be an equivalent command file:
The fbtft driver has native 320x480 size which is rotated=90 in the DT overlay option, panel-mipi-dbi doesn't rotate so you have to flip width/height yourself. |
I'm curious because for their board that designed to connect this display they use
it does not look like ILI9488 BTW I will try. |
This seems to be a driver in their custom kernel: https://github.com/bigtreetech/CB1-Kernel/blob/kernel-5.16/kernel/drivers/staging/fbtft/fb_st7796.c
This is curious, it's been years since I worked on fbtft, I thought it only did rgb565 on these displays but this indicates rgb666 or rgb888. But what I find strange is that the driver does this: Probably best to ask the seller about this. |
Thank you. It's very helpful information. I see that I have to build custom kernel (I did it last time as child in 14-15) Any way, it looks like that it can be supported by this DRM module, doesn't it? |
I came across this [PATCH] Allows setting bpp from dt which didn't make it into mainline, and the CB-1 kernel doesn't have this patch either. This indicates that this bpp option is mute.
Yes |
Maybe you can give guideline what to do? I'm worry that I will spend too much time to understand it by myself :( |
I've enabled discussions now so please create a new discussion and link to this issue so we don't clutter it further. Put the display name in the title. Add info about the board you have. |
I have now had a closer look at the ILI9488 datasheet:
4-Line Serial Interface is SPI + D/C gpio, so it should be possible to use panel-mipi-dbi with this interface mode.
|
Just to cover the parallel bus options:
It should be possible to use fbtft for this use case. This comprehensive blog post: Cheap ILI9488 TFT LCD Displays, points to Cheap 3.95 TFT Screen with ili9488 from mcufriend on a Raspberry Pi Zero:
fbtft_device and flexfp doesn't exist in the kernel any more, but it should be possible to make it work. See here for info on how to do that on a Raspberry Pi: https://github.com/notro/fbtft/wiki/FBTFT-RPI-overlays I still haven't seen someone posting a working Devie Tree fragment for a parallel bus display, so it can't be a common setup. |
Sigh, I came across this from a guy that maintains a graphics library (ref):
|
I've sent some patches to add RGB666 support: https://lore.kernel.org/dri-devel/20240507-panel-mipi-dbi-rgb666-v1-0-6799234afa3e@tronnes.org/T/#t |
Linux v6.11 will have RGB666 support: https://github.com/notro/panel-mipi-dbi/wiki#rgb666 |
With Linux 6.11+, you can drive the ili9488, as seen in: Does raspberry pi show LCD graphics since the bootloader or the earliest kernel stage? THANK YOU NOTRO!! |
No it does not, it depends on other subsystems and drivers to be loaded like the SPI driver. If these are built into the kernel image then the driver will be loaded quite early (3 seconds) like it's shown in this post: https://forums.raspberrypi.com/viewtopic.php?p=2241755&sid=0085a2c12a94d34d563f633a2efb2bcb#p2241755 If the driver is compiled as a loadable kernel module, which it is in a regular distro kernel, it will happen rather late. |
I tried to run 3.5 inch LCD with driver ili9488 in 4-line SPI mode on fbtft overlay, but this driver (ili9488) does not support RGB565 mode in 4 line SPI. If driver init with RGB666, then i`m take wrong pictrure on the screen...

Can you explain to the newbie how to run this display (9488) using mipi-dbi-spi?
PS: Raspberry 3b, 5.15.36-v7+
The text was updated successfully, but these errors were encountered: