Update:
Retried compiling and installing the kernel/driver for my LCD, but couldn’t get it to work now. Tried using latest available kernel installed on top of the one that came with the os (Ubuntu focal). It shows error like this:
fbtft: version magic '5.10.69-12-amlogic-g98700611d064 SMP preempt mod_unload aarch64' should be '5.10.69-13-amlogic-g104342c59952 SMP preempt mod_unload aarch64'
But using 5.10.69-12
kernel version at least i can get it to load the lcd kernel and device tree overlays. I can see it writes to the framebuffer (created /dev/fb1) when i test it with fbi commands. However it is not showing anything on my lcd, i have two 128x160 st7735s both didn’t work.
I tried to use the same setup from when I got it to work and was able narrow it down to the only thing that’s left to test is to use the older kernel version (5.10.69.4 < kernel version < 5.10.69-12
). Unfortunately it no longer exists in radxa’s apt repository and I have no idea where to get it.
One thing to note that I might have missed or vaguely explained in my steps is the part where you get the values for the pins, for example:
reset-gpios = <0x30 8 1>;
for reset pin
To explain it further we need to grab it from the installed kernel’s dto and the pin assignment, focus on the value 0x30
.
0x30
- this can be found here:
cd /boot/dtbs/5.10.69-xxxxxxx/amlogic
sudo dtc -I dtb -o dts -o meson-g12a-radxa-zero.dts meson-g12a-radxa-zero.dtb
open the file thats generated called meson-g12a-radxa-zero.dts
, and do a text search for the word meson-g12a-periphs-pinctrl
. Within the text under that, look for the keyword bank@40
and under that take the value from phandle = <0x30>;
. That 0x30 is what you are looking for.
For values 8
and 1
, I should have it explained in the original steps.
Again the result of my attempt to run this again is not successful in the sense that I can load the driver and see that it starts in dmesg, loads /dev/fb1, and tries to write values to my LCD but is not showing anything on my screen.
If someone can point out to me where / how to get those older kernels just to see if my theory on newer kernels can’t load LCD driver, that would be great.