Hello,
I’ve successfully set up my ILI9341 SPI TFT LCD with the spicc
and spicc-ili9341
overlays on Le Potato. However, it’s displaying the main CLI on /dev/fb0
. When I overwrite pixel data, a persistent cursor remains in the screen center. I’d prefer this not to be treated as the primary display.
Note: occassionally the initialization fails, making the display not associate with fb0 or fb1. It just becomes unresponsive in this case.
Here is the dmesg message when it does work (but only on fb0 which conflicts with the main display):
potato@raspberrypi:~ $ dmesg | grep -i ilitek
[ 8.193630] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply from device tree
[ 8.193657] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply property in node /soc/bus@c1100000/spi@8d80/display@0 failed
[ 8.193695] panel-ilitek-ili9341 spi0.0: get optional vcc failed
[ 8.614362] panel-ilitek-ili9341 spi0.0: [drm] Initialized display serial interface
[ 8.783437] panel-ilitek-ili9341 spi0.0: [drm] fb0: ili9341drmfb frame buffer device
And when it doesn’t work, leading to a black and unresponsive display (even when I try to write to fb1 nothing happens):
potato@raspberrypi:~ $ dmesg | grep -i ilitek
[ 8.330873] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply from device tree
[ 8.330899] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply property in node /soc/bus@c1100000/spi@8d80/display@0 failed
[ 8.330937] panel-ilitek-ili9341 spi0.0: get optional vcc failed
[ 8.334849] panel-ilitek-ili9341 spi0.0: [drm] fb1: ili9341drmfb frame buffer device
Any advice on how to resolve this?
Thanks in advance!
I want to add that changing the overlay to the following seemed to help make the fb_ili9341 driver take over and initialize the display correctly to point to /dev/fb1/, being responsive. I am not sure what the actual solution is, but I assume this may be useful:
/*
* Copyright (c) 2018 BayLibre, SAS.
* Author: Neil Armstrong <narmstrong@baylibre.com>
*
* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
*/
/*
* Overlay aimed to enable the Ilitek ILI9341 based panels such as the :
* - Adafruit 2.2" SPI display
* - Adafruit 2.8" Touch Shield V2 (SPI)
* - Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket
* - Adafruit 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket
* - Adafruit 2.2" 18-bit color TFT LCD display with microSD card breakout
* - Adafruit TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers
* Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS), 29 (DC), 31 (Reset)
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-gxl-gpio.h>
{
compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
fragment@0 {
target-path = "/aliases";
__overlay__ {
spi0 = "/soc/cbus@c1100000/spi@8d80";
};
};
fragment@1 {
target = <&spicc>;
__overlay__ {
/*
* The display signals are connected to :
* - SDO(MISO) to Pin21 (SPI_MISO)
* - LED/Backlight to Pin2 (5v)
* - SCK to Pin23 (SPI_CLK)
* - SDI(MOSI) to Pin19 (SPI_MOSI)
* - D/C to Pin29 (GPIOX_17)
* - RESET to Pin31 (GPIOX_18)
* - (LCD) CS to Pin24 (GPIOX_10)
* - GND to Pin25 (GND)
* - VCC/VIN to Pin17 (3.3V)
*/
display@0 {
compatible = "ilitek,ili9341";
reg = <0>;
height = <320>;
width = <240>;
rotate = <180>;
buswidth = <8>;
spi-max-frequency = <41666667>;
led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>;
dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
};
};
Since most ILI9341 displays do not come with a static pinout that can fit on top of the 40 pin header, you need to assign or align the proper GPIOs.
I had aligned the GPIOs properly as the display works now, I just think it was an overlay/driver issue as it only began working after I modified the preexisting overlay from the libre wiring tools.