Jump to content

Driving the ili9488 LCD (4.0 inch cheap chinese clone)


Go to solution Solved by robertoj,

Recommended Posts

Posted

hello! i was trying to hook up a 3.5" display to my orange pi zero 2w, but when i try to use the DTS, all i get is black and white stripes. does anyone know a fix or what this even means? 

Posted (edited)

It probably means that you are close to having it work.

75% of the effort (or good luck) results in the LCD displaying noise or bad image.

 

What model LCD?

Photos?

Confirm the wiring matches the default SPI terminals and the custom GPIO I included in the DTS.

Are you connecting the touch chip terminals?

LInux and armbian version? Downloaded or self compiled?

Run the tests I have shown in several of my LCD threads: ili9341, ili9488.

Edited by robertoj
Posted

its an ili9488 3.5" cheap red SPI display, pretty much right after posting the comment i got it to output a garbled image, i did change the pins to match my pin connections. i was running orange pi branded debian, doing stuff on armbian doesn't work for some reason, im going to try to compile it myself. i completely removed touch from the DTS because i dont really need it. i am on orange pi zero 2w btw. for some reason i cant upload an image

Posted

hello again, i searched around and pretty much everything links back to this thread. this is the best result i could get on latest armbian, does anyone know what i can change? i think the problem is that the image is kinda shifted down and then goes back up? im pretty sure i need to change some kind of offset, but other than that im stumped
IMG_20250806_162936.thumb.jpg.4d7b274d0b6a3d26fc7b8d157c2780ac.jpg

Posted (edited)

Try a lower SPI frequency and use direct wires from the orange pi zero 2w to the LCD

 

There might be something in the panel-mipi-dbi-spi.bin firmware to improve the display of the received bytes, but first do these two improvements (first try the direct wires)

 

Opiz2w cases:

https://forum.armbian.com/topic/52880-orangepi-zero-2w-wrong-color-display-on-mpi3501/

https://forum.armbian.com/topic/44191-orangepi-zero-lts-ili9341-tft-lcd-and-later-orangepi-zero-3/page/2/

https://forum.armbian.com/topic/46824-orange-pi-zero-3-ili9486-tft-lcd/

 

Edited by robertoj
Posted (edited)

thanks! direct wiring has definitely changed something, i guess ill keep changing stuff and update if i get something
upd: the direct wiring has definitely made an improvement, but it still looks offset, i have no idea how to fix this, changing stuff in panel-timing just.. does stuff randomly, and i have no idea how to pick the right one. does anyone know the solution to this kind of weirdness?

this is the best i could get it:

 

IMG_20250806_232404.jpg

Edited by p a s h
Posted (edited)

post the link of the online store where you bought your LCD.

 

Why do you describe your problem as "offset", if your problem is a big rectangle that covers 25% of your screen?

Edited by robertoj
Posted

now that i think of it, i think you're right; the data being displayed is not offset its just straight up not displayed in some regions and wraps around for some reason. i bought the display here. its very likely resold from aliexpress.

Posted (edited)

The online store link doesnt work :(

 

Did you try lowering the SPI frequency?

 

Are you using the panel-mipi-dbi-spi driver?

 

I have no idea about the timing parameters in the firmware bin file. Are you familiar with notro's python script that turns a txt into a firmware bin file?

 

There's a chance that your LCD is bad. Try buying an extra LCD.

 

Future note for when you succeed with the driver: X11 will not work. There's a driver issue. If you can compile MESA3D you might get the needed updated driver. I have been using wayland+labwc... and I am currently in the effort to add a wayland greeter for the display manager (lightdm or greetd). (search my threads)

Edited by robertoj
Posted

oh so THAT'S why Xfce didnt launch, good to know. i did try lowering the SPI frequency but the result is pretty much the same. i am using the panel-mipi-dbi-spi driver, i will check the script later and see how it actually works. i am 100% sure the display is not defective, it works perfectly fine through tft_eSPI on an esp32, i will try getting an another unit and see if it changes anything.

Posted

Hmmm ok Now I am out of ideas.

 

Are you using a downloaded armbian image? I have been using only self-compiled armbian images... (I need features of the latest linux-edge)

 

It also prevents some problems if you uninstall or disable plymouth (interferes with loading the firmware file).

Posted (edited)
Quote

what specific issues did you run into?

ok so, i tried to replicate the issues i had but they just... didnt happen? everything just... works perfectly fine????? i have no idea if it was just that i was particularly unlucky or something, but i just compiled a working image fairly easily.
edit: nevermind, when i retried after a restart i got a

Failed to update binfmts [ update-binfmts --enable qemu-arm ]


error, googling yielded almost no information (host: fedora 42)

Quote

Make sure to power the VCC and LED with 3.3v, not 5v 


i did!

Quote

The online store link doesnt work

its a russian store, so it probably has a bunch of countries region blocked (for me it works, even through VPN)
 

Edited by p a s h
Posted (edited)

Share your DTS, maybe you missed something

 

Run:

 

dmesg | grep -E 'spi|panel' and post the result

 

I already saw the online store... it is the same LCD that I use (I have both 3.5" and 4.0" and they work with the same DTS and bin file)

Edited by robertoj
Posted

Are you using the same GPIO wiring as I am?

 

Previously, I was using different GPIO for the chip select, and touch wasn't working... now with my current GPIO in my DTS, it works perfectly.

Posted
Quote

we need full logs of your compilation.  Run like "./compile.sh [...] SHARE_LOG=yes"

 

here: https://paste.armbian.com/oyozunowab (running through docker on fedora 42 latest everything after a restart, the same issue happens on a fresh download too)

Quote

Share your DTS, maybe you missed something

Spoiler

/dts-v1/;
/plugin/;
/ {
    compatible = "allwinner,sun50i-h616";
    fragment@0 {
        target = <&spi1>;
        __overlay__ {
            status = "okay";
            cs-gpios = <&pio 7 5 0>; 
            panel: panel@0 {
                compatible = "panel-mipi-dbi-spi";
                reg = <0>;
                spi-max-frequency = <40000000>;
                width-mm=<79>;
                height-mm=<54>;
                reset-gpios = <&pio 8 6 0>;
                dc-gpios = <&pio 7 4 0>; 
                write-only;
                format = "b6x2g6x2r6x2";
                panel-timing {
                    hactive = <480>;
                    vactive = <320>;
                    hback-porch = <0>;
                    vback-porch = <0>;
                    clock-frequency = <0>;
                    hfront-porch = <0>;
                    hsync-len = <0>;
                    vfront-porch = <0>;
                    vsync-len = <0>;
                };
            };
        };
    };
};

Quote

dmesg | grep -E 'spi|panel

i dont have it available atm, i will include it as soon as i can get access to it, but last time i checked dmesg there was pretty much no errors

Quote

Are you using the same GPIO wiring as I am?

no, not really, i changed the pins for D/C and reset iirc

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines