To preface: I’ve double checked that the wiring is correct and swapped the display with another (same exact model) in case it was a hardware issue.
After doing what you had said with the spi-cc-cs1
and spi-cc-1cs-ili9341
overlays in that order with the rotation, but still white screen. Below are the system messages I thought would relate to the issue.
potato@raspbian-bullseye-aml-s905x-cc:~ $ sudo /opt/libretech-wiring-tool/ldto merge spi-cc-cs1 spi-cc-1cs-ili9341
Overlay spi-cc-cs1: merged for next boot
Overlay spi-cc-1cs-ili9341: merged for next boot
potato@raspbian-bullseye-aml-s905x-cc:~ $ dmesg | grep drm
[ 2.997686] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 3.158778] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops)
[ 3.166572] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
[ 3.209523] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device
[ 7.407822] systemd[1]: Starting Load Kernel Module drm...
[ 9.629110] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 1
[ 9.753938] [drm] Initialized ili9341 1.0.0 20210716 for spi0.0 on minor 2
[ 9.758371] panel-ilitek-ili9341 spi0.0: [drm] fb2: ili9341drmfb frame buffer device
potato@raspbian-bullseye-aml-s905x-cc:~ $ dmesg | grep ili9341
[ 9.669830] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply from device tree
[ 9.669854] panel-ilitek-ili9341 spi0.0: Looking up vcc-supply property in node /soc/bus@c1100000/spi@8d80/display@0 failed
[ 9.669886] panel-ilitek-ili9341 spi0.0: get optional vcc failed
[ 9.753938] [drm] Initialized ili9341 1.0.0 20210716 for spi0.0 on minor 2
[ 9.758371] panel-ilitek-ili9341 spi0.0: [drm] fb2: ili9341drmfb frame buffer device
UPDATE: I got it to work as it did before, but only with the following device tree overlay files. I am not sure what exactly is the reason for it working, but it isn’t the wiring or the hardware, since I didn’t change any of that. It could be the old ISO Image that I used paired with the updated device tree overlay files. Note that I referred to this old commit to get the device tree overlay files I used with the corresponding ISO Image a months ago (around August).
ISO Image: 2022-09-22-raspbian-bullseye-arm64-lite+aml-s905x-cc.img
Device Tree Overlay Files:
spicc.dts (no changes from old commit):
/*
* Copyright (c) 2017 BayLibre, SAS.
* Author: Neil Armstrong <narmstrong@baylibre.com>
*
* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
*/
/*
* Overlay aimed to enable SPICC on Header 7J1 :
* Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (SS0)
*/
/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__ {
status = "okay";
pinctrl-0 = <&spi_pins>;
pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>;
pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>;
pinctrl-names = "default", "idle-high", "idle-low";
cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
};
};
};
spicc-ili9341.dts (modified from old commit):
/*
* 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 = "adafruit,yx240qv29", "ilitek,ili9341";
reg = <0>;
height = <320>;
width = <240>;
rotate = <180>;
buswidth = <8>;
spi-max-frequency = <30000000>;
dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
};
};
Steps to reproduce:
git clone https://github.com/libre-computer-project/libretech-wiring-tool.git
- Copy the old/modified
.dts
files into the libretech-wiring-tool/libre-computer/aml-s905x-cc/dt/
directory.
- In the same directory, delete the corresponding
.dtbo
files to the old/modified .dts
files, if they exist.
- Run
sudo ./install.sh
to generate the .dtbo
files for the .dts
files you added.
- Making sure to have the device tree cleared with
sudo ldto reset
and sudo reboot
before doing sudo ldto merge spicc spicc-ili9341
and sudo reboot
to merge the new device tree overlays that you added to the system.
Resulting Behavior
- The display points to
/dev/fb1
which you can write pixel data to in the format you can find by doing fbset -fb /dev/fb1
- The display was unresponsive to data being sent to the framebuffer until I used
con2fbmap 1 1
to set the console (pointing at /dev/fb0
) to point to /dev/fb1
where the display is pointing to. This triggered the display to initialize in some way such that it become responsive from new data being sent to the framebuffer.
Goal: I want the display to always be responsive to data on boot.