Hello there,
I am beyond my expertise (that which is already limited) have found a guide. Now the guide uses ili9486 so it was substitute it will ili9341 as well as the build they used official build am using Armbian_22.11.1_Orangepi3-lts_bullseye_current_5.15.80 and int with a new one found in the fbtft library. I also need to translate for Russian with chrome not their are photos of it working but all I get is a white screen. here is my version of the overlay.
/dts-v1/;
/plugin/;
/ {
compatible = "xunlong,orangepi-3-lts","allwinner,sun50i-h6";
fragment@0 {
target-path = "/aliases";
__overlay__ {
spi0 = "/soc/spi@5010000";
spi1 = "/soc/spi@5011000";
};
};
fragment@2 {
target = <&r_pio>;
__overlay__ {
spi1_cs1_pin: spi1_cs1_pin {
pins = "PA8"; /* - real use PL8 but... error in calculate pin number 360!!!!*/
function = "gpio_out";
output-high;
};
};
};
fragment@3 {
target = <&spi1>;
__overlay__ {
pinctrl-names = "default", "default";
pinctrl-1 = <&spi1_cs1_pin>;
cs-gpios = <0>, <&r_pio 0 8 0>; /* PL8 */
status = "okay";
debug = <0>;
#address-cells = <1>;
#size-cells = <0>;
spidev@0 {
reg = <0>; /* Chip Select 0 */
compatible = "spidev";
spi-max-frequency = <100000000>;
status = "disabled";
};
spidev@1 {
reg = <1>; /* Chip Select 1 */
compatible = "spidev";
spi-max-frequency = <12000000>;
status = "disabled";
};
};
};
fragment@4 {
target = <&pio>;
__overlay__ {
ili9341_pins: ili9341_pins {
pins = "PD21", "PD16"; /*RESET, DC_RS*/
function = "gpio_out", "gpio_out" ;
};
};
};
fragment@5 {
target = <&spi1>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <0>, <&r_pio 0 8 0>; /* PL8 */
status = "okay";
ili9341: ili9341@0 {
compatible = "ilitek,ili9341";
spi-max-frequency = <32000000>;
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&ili9341_pins>;
status = "okay";
debug = <0>;
txbuflen = <32768>;
rotate = <90>;
bgr;
fps = <60>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&pio 3 21 0>; /*RST= PD21 */
dc-gpios = <&pio 3 16 0>; /*LCD_RS PD16 */
init = <0x1000001
0x2000005
0x1000028
0x10000cf 0x00 0x83 0x30
0x10000ed 0x64 0x03 0x12 0x81
0x10000e8 0x85 0x01 0x79
0x10000cb 0x39 0x2c 0x00 0x34 0x02
0x10000f7 0x20
0x10000ea 0x00 0x00
0x10000c0 0x26
0x10000c1 0x11
0x10000c5 0x35 0x3e
0x10000c7 0xbe
0x100003a 0x55
0x1000036 0x28
0x10000b1 0x00 0x1b
0x1000026 0x01
0x10000f2 0x08
0x1000026 0x01
0x10000e0 0x1f 0x1a 0x18 0x0a 0x0f 0x06 0x45 0x87 0x32 0x0a 0x07 0x02 0x07 0x05 0x00
0x10000e1 0x00 0x25 0x27 0x05 0x10 0x09 0x3a 0x78 0x4d 0x05 0x18 0x0d 0x38 0x3a 0x1f
0x10000b7 0x07
0x10000b6 0x0a 0x82 0x27 0x00
0x1000011
0x2000064
0x1000029
0x2000064>;
};
xpt2046: xpt2046@1 {
compatible = "ti,ads7846";
reg = <1>;
status ="okay";
spi-max-frequency = <1000000>;
interrupts = <0 10 2>; /* high-to-low edge triggered */
interrupt-parent = <&r_pio>; /* PL10<-----> TP_IRQ= PD24 -irq not possible!*/
pendown-gpio = <&r_pio 0 10 0>;
ti,keep-vref-on = <1>;
ti,x-min = /bits/ 16 <00>;
ti,x-max = /bits/ 16 <0xFFF>;
ti,y-min = /bits/ 16 <00>;
ti,y-max = /bits/ 16 <0xFFF>;
ti,x-plate-ohms = /bits/ 16 <60>;
ti,pressure-max = /bits/ 16 <255>;
ti,swap-xy = <0>;
};
};
};
};
now i did a dmesg | grep spi and the touch is loading but not the tft just not sure how to fix it I also read though a lot of forums for some sort of template for this device but still stumped.
[ 2.806604] sun6i-spi 5011000.spi: there is not valid maps for state default
[ 2.808054] sun6i-spi 5011000.spi: chipselect 1 already in use
[ 2.808076] spi_master spi1: spi_device register error /soc/spi@5011000/spidev@1
[ 2.808097] spi_master spi1: Failed to create SPI device for /soc/spi@5011000/spidev@1
[ 8.667723] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[ 8.667753] SPI driver ads7846 has no spi_device_id for ti,ads7843
[ 8.667756] SPI driver ads7846 has no spi_device_id for ti,ads7845
[ 8.667759] SPI driver ads7846 has no spi_device_id for ti,ads7873
[ 8.668043] ads7846 spi1.1: supply vcc not found, using dummy regulator
[ 8.679835] SPI driver fb_ili9341 has no spi_device_id for ilitek,ili9341
[ 8.680032] fb_ili9341 spi1.0: fbtft_property_value: regwidth = 16
[ 8.680043] fb_ili9341 spi1.0: fbtft_property_value: buswidth = 8
[ 8.680049] fb_ili9341 spi1.0: fbtft_property_value: debug = 0
[ 8.680054] fb_ili9341 spi1.0: fbtft_property_value: rotate = 90
[ 8.680060] fb_ili9341 spi1.0: fbtft_property_value: fps = 60
[ 8.680066] fb_ili9341 spi1.0: fbtft_property_value: txbuflen = 32768
[ 8.684745] ads7846 spi1.1: touchscreen, irq 67
[ 8.705549] input: ADS7846 Touchscreen as /devices/platform/soc/5011000.spi/spi_master/spi1/spi1.1/input/input1
[ 9.090648] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 32 KiB buffer memory, fps=62, spi1.0 at 32 MHz
The guide I used
https://4pda.to/forum/index.php?act=search&source=pst&result=posts&sort=dd&subforums=1&username=Ochkariky&noform=1&st=20