AlexTransit's post in Orange Pi Lite. problem with latest firmware. was marked as the answer
May 27, 2024
solved.
the display on the ST7789V use spi0.1
spidev use spi0.0
Could not run on the built-in driver. I get
st7789v spi0.1: error -EINVAL: Failed to setup spi
fb_st7789v spi0.1: write() failed and returned -22
did the ST7789V initialization manually
/dts-v1/;
/plugin/;
/ {
compatible = "allwinner,sun8i-h3";
fragment@0 {
target = <&pio>;
__overlay__ {
st7789v_pins: st7789v_pins {
pins = "PA8", "PA9", "PA10", "PA20";
function = "gpio_out", "gpio_out", "gpio_out", "gpio_out";
};
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
cs-gpios = <&pio 2 3 1>,<&pio 0 20 1>;
spidev@0 {
compatible = "armbian,spi-dev";
reg = <0>;
spi-max-frequency = <1000000>;
};
display: display@1 {
/* compatible = "sitronix,st7789v"; */
compatible = "samsung,s6d02a1";
reg = <1>; /* use cs1. required 1 in section display@1 */
pinctrl-names = "default";
pinctrl-0 =<&st7789v_pins>;
spi-max-frequency = <16000000>;
rotate = <180>; /* in init rotate 0x1000036 0xXX 0(XX=00) 90(XX=a0) 180(XX=36 c0) 270(XX=60) */
width = <240>;
height = <320>;
spi-cpol;
buswidth = <8>;
txbuflen = <153600>;
reset-gpios = <&pio 0 10 1>;
dc-gpios = <&pio 0 9 0>;
led-gpios = <&pio 0 8 0>;
debug = <0>;
init = <
0x1000001
0x2000096
0x1000011
0x100003a 0x05
0x10000b2 0x05 0x05 0x00 0x33 0x33
0x10000b7 0x75
0x10000c2 0x01 0xff
0x10000c3 0x13
0x10000c4 0x20
0x10000bb 0x22
0x10000c5 0x20
0x10000d0 0xa4 0xa1
0x1000029
0x1000021
0x1000036 0xc0
0x100002a 0x00 0x00 0x00 0xef
0x100002b 0x00 0x00 0x01 0x3f
0x100002c
0x10000e0 0xd0 0x05 0x0a 0x09 0x08 0x05 0x2e 0x44 0x45 0x0f 0x17 0x16 0x2b 0x33
0x10000e1 0xd0 0x05 0x0a 0x09 0x08 0x05 0x2e 0x43 0x45 0x0f 0x16 0x16 0x2b 0x33
0x2000064
>;
};
};
};
};
everything works perfectly.
PS I don't know how to fix the topic header. problem solved