WDR_s Posted October 31 Posted October 31 I have this screen here ili9486 : https://pt.aliexpress.com/item/32805704334.html?src=google&pdp_npi=4%40dis!BRL!43.31!38.51!!!!!%40!12000019014148570!ppc!!!&src=google&albch=shopping&acnt=768-202-3196&isdl=y&slnk=&plac=&mtctp=&albbt=Google_7_shopping&aff_platform=google&aff_short_key=UneMJZVf&gclsrc=aw.ds&&albagn=888888&&ds_e_adid=&ds_e_matchtype=&ds_e_device=c&ds_e_network=x&ds_e_product_group_id=&ds_e_product_id=pt32805704334&ds_e_product_merchant_id=107713925&ds_e_product_country=BR&ds_e_product_language=pt&ds_e_product_channel=online&ds_e_product_store_id=&ds_url_v=2&albcp=21106536414&albag=&isSmbAutoCall=false&needSmbHouyi=false&gad_source=1&gclid=EAIaIQobChMI14GV5um3iQMVK2BIAB0KwQPmEAYYASABEgJc4fD_BwE I would like to know if i can connect to my orange pi zero 3 I have already tried to connect but without success, as I am new to this I would like you to help me if possible. Thanks! Sorry for my English I'm on google. 0 Quote
robertoj Posted October 31 Posted October 31 Starting with the DTS that worked for me in the orange pi zero 3, with ili9341: https://forum.armbian.com/topic/44191-orangepi-zero-lts-ili9341-tft-lcd-and-later-orangepi-zero-3/?do=findComment&comment=204672 My DTS is for a customized set of pins that works for me, and it is different than/from the waveshare set of pins. You need to change: * file name change to: ili9486-ads7846-spi1.dts * gpio pin selections everywhere in the DTS * "adafruit,yx240qv29" should be "ilitek,ili9486" * change "rotation" to "rotate" * change "reset-gpios = <&pio N N 0>;" to "reset-gpios = <&pio N N 1>; Then sudo armbian-add-overlay ili9486-ads7846-spi1.dts Reboot (does anyone know the correct DRM driver for ili9486?) 0 Quote
WDR_s Posted November 1 Author Posted November 1 (edited) I used your DTS and modified the driver and some other things and it looked like this: root@orangepizero3:~/testopiz3# cat ili9486-ads7846-spi1.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 7 9 0>,<&pio 2 15 0>; /*PH9=CS0 for lcd, PC15=CS1 for touch*/ ili9486: ili9486@0 { compatible = "ilitek,ili9486"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <24000000>; rotate = <270>; bgr = <0>; fps = <30>; buswidth = <8>; reset-gpios = <&pio 2 14 1>; /* PC14 */ dc-gpios = <&pio 2 7 0>; /* PHC7 */ debug = <3>; }; ads7846: ads7846@1 { compatible = "ti,ads7846"; reg = <1>; pinctrl-names = "default"; spi-max-frequency = <1000000>; interrupt-parent = <&pio>; interrupts = <2 10 2>; /* PC10 - IRQ */ pendown-gpio = <&pio 2 10 1>; /* PC10 */ /* OPTIONS */ ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0xFFF>; ti,y-max = /bits/ 16 <0xFFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFF>; ti,x-plate-ohms = /bits/ 16 <400>; ti,swap-xy = <1>; }; }; }; the screen didn't turn on and I get this: root@orangepizero3:~/testopiz3# dmesg|grep spi [ 1.336361] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.336380] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.336625] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.336642] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.344519] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.344537] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.344790] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.344807] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.353376] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.368687] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.756110] ads7846 spi1.1: supply vcc not found, using dummy regulator [ 5.774274] ads7846 spi1.1: touchscreen, irq 72 [ 5.778306] [drm] Initialized ili9486 1.0.0 20200118 for spi1.0 on minor 2 [ 5.791888] spi_master spi1: noqueue transfer failed [ 5.791896] ili9486 spi1.0: [drm] *ERROR* Failed to update display -5 [ 5.806250] input: ADS7846 Touchscreen as /devices/platform/soc/5011000.spi/spi_master/spi1/spi1.1/input/input4 [ 6.332084] spi_master spi1: noqueue transfer failed [ 6.341922] spi_master spi1: noqueue transfer failed [ 6.343037] ili9486 spi1.0: [drm] fb0: ili9486drmfb frame buffer device [ 6.376583] SPI driver fb_ili9486 has no spi_device_id for ilitek,ili9486 [ 6.392717] spi_master spi1: noqueue transfer failed [ 6.484766] spi_master spi1: noqueue transfer failed [ 6.496428] spi_master spi1: noqueue transfer failed [ 6.507222] spi_master spi1: noqueue transfer failed [ 6.524186] spi_master spi1: noqueue transfer failed [ 6.583772] spi_master spi1: noqueue transfer failed [ 6.665947] spi_master spi1: noqueue transfer failed [ 6.683600] spi_master spi1: noqueue transfer failed [ 8.071086] spi_master spi1: noqueue transfer failed [ 8.225788] spi_master spi1: noqueue transfer failed [ 8.260765] spi_master spi1: noqueue transfer failed [ 8.423577] spi_master spi1: noqueue transfer failed [ 8.455263] spi_master spi1: noqueue transfer failed [ 8.522713] spi_master spi1: noqueue transfer failed [ 8.564872] spi_master spi1: noqueue transfer failed [ 8.575518] spi_master spi1: noqueue transfer failed [ 9.074598] spi_master spi1: noqueue transfer failed [ 9.084348] spi_master spi1: noqueue transfer failed [ 9.116925] spi_master spi1: noqueue transfer failed [ 9.131941] spi_master spi1: noqueue transfer failed [ 9.144523] spi_master spi1: noqueue transfer failed [ 9.155518] spi_master spi1: noqueue transfer failed [ 9.363656] spi_master spi1: noqueue transfer failed [ 9.378223] spi_master spi1: noqueue transfer failed [ 9.391305] spi_master spi1: noqueue transfer failed [ 9.402360] spi_master spi1: noqueue transfer failed [ 9.536236] spi_master spi1: noqueue transfer failed [ 9.644439] spi_master spi1: noqueue transfer failed [ 10.144929] spi_master spi1: noqueue transfer failed [ 10.268524] spi_master spi1: noqueue transfer failed [ 10.285998] spi_master spi1: noqueue transfer failed [ 10.295763] spi_master spi1: noqueue transfer failed [ 10.610540] spi_master spi1: noqueue transfer failed [ 10.778565] spi_master spi1: noqueue transfer failed [ 11.373986] spi_master spi1: noqueue transfer failed [ 11.536724] spi_master spi1: noqueue transfer failed [ 11.615775] spi_master spi1: noqueue transfer failed [ 11.630380] spi_master spi1: noqueue transfer failed [ 11.641227] spi_master spi1: noqueue transfer failed [ 11.691254] spi_master spi1: noqueue transfer failed [ 11.727754] spi_master spi1: noqueue transfer failed [ 11.738178] spi_master spi1: noqueue transfer failed [ 12.109599] spi_master spi1: noqueue transfer failed [ 12.305293] spi_master spi1: noqueue transfer failed [ 12.664486] spi_master spi1: noqueue transfer failed [ 12.674529] spi_master spi1: noqueue transfer failed [ 13.020004] spi_master spi1: noqueue transfer failed [ 13.032088] spi_master spi1: noqueue transfer failed [ 13.042854] spi_master spi1: noqueue transfer failed [ 13.074828] spi_master spi1: noqueue transfer failed [ 13.203632] spi_master spi1: noqueue transfer failed [ 13.315447] spi_master spi1: noqueue transfer failed [ 57.093748] spi_master spi1: noqueue transfer failed Edited November 1 by WDR_s 0 Quote
robertoj Posted November 1 Posted November 1 I see that you didnt change any gpios. You must change them... what are the pins in the orange pi zero 3 that will control the lcd? (you must have the LCD schematic) If you try my original DTS, without having a screen like mine, do you get these 2 files? /dev/fb0 /dev/input/event0 According to this https://mjmwired.net/kernel/Documentation/devicetree/bindings/display/ilitek,ili9486.yaml You must use the line: compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 0 Quote
WDR_s Posted November 1 Author Posted November 1 (edited) The LCD schematic is this: http://wiki.sunfounder.cc/index.php?title=File:3.5inchdisplay.jpg Edited November 1 by WDR_s 0 Quote
robertoj Posted November 2 Posted November 2 https://github.com/jonathan-gatard/ili9486-xpt2046/tree/main use this for inspiration 0 Quote
WDR_s Posted November 5 Author Posted November 5 I changed a few pins and the dts looked like this: Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 2 5 0>,<&pio 7 9 0>; /*PH5=CS0 for lcd, PH9=CS1 for touch*/ }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; ili9486: ili9486@0 { compatible = "ilitek,ili9486"; reg = <0>; spi-max-frequency = <16000000>; rotate = <90>; fps = <30>; buswidth = <8>; regwidth = <16>; bgr = <0>; reset-gpios = <&pio 0 8 1>; /* PC15 */ dc-gpios = <&pio 0 5 0>; /* PC5*/ //debug = <3>; init = <0x10000b0 0x00 0x1000011 0x20000ff 0x100003a 0x55 0x1000036 0x28 0x10000c2 0x44 0x10000c5 0x00 0x00 0x00 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x1000036 0x28 0x1000011 0x1000029>; }; ads7846: ads7846@1 { compatible = "ti,ads7846"; reg = <1>; spi-max-frequency = <2000000>; interrupts = <2 7 2>; /* high-to-low edge triggered */ interrupt-parent = <&pio>; pendown-gpio = <&pio 2 7 0>; ti,keep-vref-on = <1>; ti,x-min = /bits/ 16 <200>; ti,x-max = /bits/ 16 <3900>; ti,y-min = /bits/ 16 <200>; ti,y-max = /bits/ 16 <3900>; ti,x-plate-ohms = /bits/ 16 <60>; ti,pressure-max = /bits/ 16 <255>; ti,swap-xy = <1>; }; }; }; }; the screen still doesn't give an image, but I get this: Spoiler root@orangepizero3:~# dmesg|grep spi [ 1.329893] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.329912] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.330164] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.330182] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.340115] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.356682] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.611681] SPI driver ads7846 has no spi_device_id for ti,tsc2046 [ 5.611706] SPI driver ads7846 has no spi_device_id for ti,ads7843 [ 5.611710] SPI driver ads7846 has no spi_device_id for ti,ads7845 [ 5.611715] SPI driver ads7846 has no spi_device_id for ti,ads7873 [ 5.612139] ads7846 spi1.1: supply vcc not found, using dummy regulator [ 5.625190] ads7846 spi1.1: touchscreen, irq 71 [ 5.636919] input: ADS7846 Touchscreen as /devices/platform/soc/5011000.spi/spi_master/spi1/spi1.1/input/input0 [ 5.774741] SPI driver fb_ili9486 has no spi_device_id for ilitek,ili9486 [ 5.774845] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 5.774856] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 5.774863] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 5.774871] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 5.785022] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 5.785046] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 5.785054] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 5.785061] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 5.808854] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 5.808866] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 5.808873] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 5.808881] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 10.844939] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 10.844949] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 10.844956] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 10.844964] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 11.087041] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 11.087073] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 11.087083] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 11.087091] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 21.220361] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 21.220384] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 21.220391] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 21.220399] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 21.220581] spi spi1.0: deferred probe pending do i have to add anything to /boot/armbianEnv.txt ? i'm in doubt! 0 Quote
robertoj Posted November 7 Posted November 7 Regarding these lines: cs-gpios = <&pio 2 5 0>,<&pio 7 9 0>; /*PH5=CS0 for lcd, PH9=CS1 for touch*/ reset-gpios = <&pio 0 8 1>; /* PC15 */ dc-gpios = <&pio 0 5 0>; /* PC5*/ interrupts = <2 7 2>; /* high-to-low edge triggered */ pendown-gpio = <&pio 2 7 0>; Make sure that you make the comments match with the actual DTS code, for example PH5=<&pio 7 5 0>, because H=7 Also according to the gpio formula, C=2. Also insert some initial comment lines at the top, summarizing the pinout you discovered for the orange pi zero 3, to show your intermediate work You are very close. All those spi1.0, spi1.1 dmesg messages indicate that there's no conflict internally in the CPU, but probably the one or a few IOs are connected to the incorrect pin(s). Another thing to try is change "reset-gpios = <&pio 0 8 1>" to "reset-gpios = <&pio 0 8 0>" because sometimes different kernel modules handle the polarity in the opposite way than it is expected. Also try changing "compatible = "ilitek,ili9486";" to "compatible = "waveshare,rpi-lcd-35";" and look at the example in https://mjmwired.net/kernel/Documentation/devicetree/bindings/display/ilitek,ili9486.yaml to find the little differences in parameters. Keep googling this forum for ili9486, maybe someone did it already 0 Quote
robertoj Posted November 11 Posted November 11 How is it going with the ili9486 LCD? the armbianEnv.txt only needs the user-overlay line with the dts you are using (without the dts extension)… but seeing your progress, I am sure the armbianEnv.txt is perfect as it is now your problem might be the gpio numbers (1st and 2nd parameter in <&pio xxx xxx xxx>) and the polarity setting (3rd parameter) DO NOT ADD ANYTHING ELSE SPI RELATED 0 Quote
WDR_s Posted November 12 Author Posted November 12 Thanks for asking! I'm using this dts: Spoiler root@orangepizero3:~/testopiz3# cat ili9486-ads7846-spi1.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; spidev@0{ status = "disabled"; }; spidev@1{ status = "disabled"; }; }; }; fragment@1 { target = <&pio>; __overlay__ { ili9486_pins: ili9486_pins { allwinner,pins = "PC15", "PC14"; allwinner,function = "gpio_in", "gpio_in"; }; }; }; fragment@2 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; ili9486: ili9486@0{ compatible = "ilitek,ili9486"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&ili9486_pins>; spi-max-frequency = <16000000>; txbuflen = <32768>; rotate = <90>; bgr = <0>; fps = <30>; buswidth = <8>; regwidth = <16>; reset-gpios = <&pio 0 15 1>; dc-gpios = <&pio 0 14 0>; debug = <0>; init = <0x10000b0 0x00 0x1000011 0x20000ff 0x100003a 0x55 0x1000036 0x28 0x10000c2 0x44 0x10000c5 0x00 0x00 0x00 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; }; Come on, even if I change the pins I still get the same thing. Spoiler root@orangepizero3:~# dmesg|grep spi [ 1.329785] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.329803] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.330040] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.330057] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.338159] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.338177] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.338407] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.338424] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.346464] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.364614] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.757805] SPI driver fb_ili9486 has no spi_device_id for ilitek,ili9486 [ 5.758014] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 5.758033] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 5.758046] fb_ili9486 spi1.0: fbtft_property_value: debug = 0 [ 5.758057] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 5.758070] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 5.758081] fb_ili9486 spi1.0: fbtft_property_value: txbuflen = 32768 [ 5.809159] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 5.809172] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 5.809179] fb_ili9486 spi1.0: fbtft_property_value: debug = 0 [ 5.809185] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 5.809192] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 5.809198] fb_ili9486 spi1.0: fbtft_property_value: txbuflen = 32768 [ 10.473865] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 10.473880] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 10.473889] fb_ili9486 spi1.0: fbtft_property_value: debug = 0 [ 10.473897] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 10.473906] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 10.473914] fb_ili9486 spi1.0: fbtft_property_value: txbuflen = 32768 [ 11.180842] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 11.180863] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 11.180871] fb_ili9486 spi1.0: fbtft_property_value: debug = 0 [ 11.180877] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 11.180884] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 11.180891] fb_ili9486 spi1.0: fbtft_property_value: txbuflen = 32768 [ 21.220456] fb_ili9486 spi1.0: fbtft_property_value: regwidth = 16 [ 21.220480] fb_ili9486 spi1.0: fbtft_property_value: buswidth = 8 [ 21.220487] fb_ili9486 spi1.0: fbtft_property_value: debug = 0 [ 21.220493] fb_ili9486 spi1.0: fbtft_property_value: rotate = 90 [ 21.220501] fb_ili9486 spi1.0: fbtft_property_value: fps = 30 [ 21.220507] fb_ili9486 spi1.0: fbtft_property_value: txbuflen = 32768 [ 21.220809] spi spi1.0: deferred probe pending And when I change the driver compatibility from “compatible = ‘ilitek,ili9486’;” to “compatible = ‘waveshare,rpi-lcd-35’;”, it shows this: Spoiler root@orangepizero3:~# dmesg|grep spi [ 1.331757] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.331776] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.332039] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.332056] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.341951] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.356645] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 21.992398] spi spi1.0: deferred probe pending 0 Quote
WDR_s Posted November 12 Author Posted November 12 Every time I change the pins, the driver doesn't load correctly, it always shows me the same driver message. Spoiler SPI driver fb_ili9486 has no spi_device_id for ilitek,ili9486 this error is the wrong pins, but I haven't found a way to solve it yet. Do you have any suggestions? 0 Quote
robertoj Posted November 12 Posted November 12 https://forum.armbian.com/topic/44191-orangepi-zero-lts-ili9341-tft-lcd-and-later-orangepi-zero-3/ See all the things I have tried to make it work with ili9341... consider using dupont wires so that you can use my dts, making the pins match electrically, and changing the driver line to "compatible = "waveshare,rpi-lcd-35"; Also get an ili9341 so that you witness that it can work. 0 Quote
WDR_s Posted November 12 Author Posted November 12 (edited) I used your dts, I just changed the drivers: Spoiler root@orangepizero3:~/testopiz3# cat ili9486-ads7846-spi1.dts /* OrangePi Zero 3 -> ILI9846LCD connections SPI CLOCK = PH6 SPI DO (LCD MISO) = PH8 (OPIZ MISO) SPI DI (LCD MOSI) = PH7 (OPIZ MOSI) LCD DATA/CONTROL = PC15 LCD RESET = PC10 CHIP SELECT = PH9 < NOT USED ANYMORE VCC = 3.3V PIN GND = GND PIN */ /dts-v1/; /plugin/; /{ compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target = <&pio>; __overlay__{ display_pins: display_pins { pins = "PC8", "PC10"; /* DC, reset pins*/ function = "gpio_out", "gpio_out"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status="okay"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; /* Mux the PI to make sure they are set in spi Mode */ /*cs-gpios = <&pio 0 13 0>; /* PA13 chip select NOT USED! */ num-chipselects = <0>; display: display@0 { compatible = "waveshare,rpi-lcd-35","ilitek,ili9486"; /*compatible = "ilitek,ili9486";*/ reg = <0>; pinctrl-names = "default"; pinctrl-1 = <&display_pins>; spi-max-frequency = <16000000>; rotation = <270>; /* rotate for ili9486, rotation for rpi-lcd-35 */ bgr=<0>; fps = <15>; buswidth = <8>; reset-gpios = <&pio 2 10 0>; /* PC10 reset pin*/ dc-gpios = <&pio 2 8 0>; /* PC8 Data control pin */ debug = <3>; init = <0x10000b0 0x00 0x1000011 0x20000ff 0x100003a 0x55 0x1000036 0x28 0x10000c2 0x44 0x10000c5 0x00 0x00 0x00 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x1000036 0x28 0x1000011 0x1000029>; }; }; }; __overrides__ { rotate = <&display>,"rotate:0"; fps = <&display>,"fps:0"; debug = <&display>,"debug:0"; }; }; i knew it wouldn't work, but it starts the driver on your dts. Spoiler root@orangepizero3:~# dmesg|grep spi [ 1.331860] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517 [ 1.331878] sun6i-spi 5010000.spi: Error applying setting, reverse things back [ 1.332144] sun50i-h616-pinctrl 300b000.pinctrl: pin-230 (5011000.spi) status -517 [ 1.332162] sun6i-spi 5011000.spi: Error applying setting, reverse things back [ 1.342085] spi-nor spi0.0: supply vdd not found, using dummy regulator [ 1.356632] spi-nor spi0.0: spi-nor-generic (16384 Kbytes) [ 5.826794] [drm] Initialized ili9486 1.0.0 20200118 for spi1.0 on minor 2 [ 5.846062] spi_master spi1: noqueue transfer failed [ 5.846070] ili9486 spi1.0: [drm] *ERROR* Failed to update display -5 [ 6.392853] spi_master spi1: noqueue transfer failed [ 6.401813] spi_master spi1: noqueue transfer failed [ 6.402930] ili9486 spi1.0: [drm] fb0: ili9486drmfb frame buffer device [ 6.493015] spi_master spi1: noqueue transfer failed [ 6.601019] spi_master spi1: noqueue transfer failed [ 6.612073] spi_master spi1: noqueue transfer failed [ 6.623854] spi_master spi1: noqueue transfer failed [ 6.641744] spi_master spi1: noqueue transfer failed [ 6.751695] spi_master spi1: noqueue transfer failed [ 6.846563] spi_master spi1: noqueue transfer failed [ 6.880841] spi_master spi1: noqueue transfer failed [ 6.891036] spi_master spi1: noqueue transfer failed [ 6.904580] spi_master spi1: noqueue transfer failed [ 6.914475] spi_master spi1: noqueue transfer failed [ 7.142242] spi_master spi1: noqueue transfer failed [ 7.226228] spi_master spi1: noqueue transfer failed [ 7.268840] spi_master spi1: noqueue transfer failed [ 9.517124] spi_master spi1: noqueue transfer failed [ 10.039018] spi_master spi1: noqueue transfer failed [ 10.232173] spi_master spi1: noqueue transfer failed [ 10.275680] spi_master spi1: noqueue transfer failed [ 10.690564] spi_master spi1: noqueue transfer failed [ 10.731026] spi_master spi1: noqueue transfer failed [ 10.805702] spi_master spi1: noqueue transfer failed [ 10.858116] spi_master spi1: noqueue transfer failed [ 10.871689] spi_master spi1: noqueue transfer failed [ 10.907571] spi_master spi1: noqueue transfer failed [ 11.375140] spi_master spi1: noqueue transfer failed [ 11.384944] spi_master spi1: noqueue transfer failed [ 11.420367] spi_master spi1: noqueue transfer failed [ 11.433719] spi_master spi1: noqueue transfer failed [ 11.445033] spi_master spi1: noqueue transfer failed [ 11.456640] spi_master spi1: noqueue transfer failed [ 11.544898] spi_master spi1: noqueue transfer failed [ 11.559093] spi_master spi1: noqueue transfer failed [ 11.579468] spi_master spi1: noqueue transfer failed [ 11.591184] spi_master spi1: noqueue transfer failed [ 11.625091] spi_master spi1: noqueue transfer failed [ 11.644903] spi_master spi1: noqueue transfer failed [ 11.656759] spi_master spi1: noqueue transfer failed [ 11.668277] spi_master spi1: noqueue transfer failed [ 11.679463] spi_master spi1: noqueue transfer failed [ 11.839080] spi_master spi1: noqueue transfer failed [ 11.944803] spi_master spi1: noqueue transfer failed [ 12.044634] spi_master spi1: noqueue transfer failed [ 12.129035] spi_master spi1: noqueue transfer failed [ 12.311136] spi_master spi1: noqueue transfer failed [ 12.711328] spi_master spi1: noqueue transfer failed [ 12.743744] spi_master spi1: noqueue transfer failed [ 12.754734] spi_master spi1: noqueue transfer failed [ 13.128266] spi_master spi1: noqueue transfer failed [ 13.377586] spi_master spi1: noqueue transfer failed [ 13.550212] spi_master spi1: noqueue transfer failed [ 13.750005] spi_master spi1: noqueue transfer failed [ 14.008841] spi_master spi1: noqueue transfer failed [ 14.074675] spi_master spi1: noqueue transfer failed [ 14.085395] spi_master spi1: noqueue transfer failed [ 14.095476] spi_master spi1: noqueue transfer failed [ 14.110914] spi_master spi1: noqueue transfer failed [ 14.158867] spi_master spi1: noqueue transfer failed [ 14.204317] spi_master spi1: noqueue transfer failed [ 14.214390] spi_master spi1: noqueue transfer failed [ 15.225220] spi_master spi1: noqueue transfer failed [ 16.014905] spi_master spi1: noqueue transfer failed [ 16.024943] spi_master spi1: noqueue transfer failed [ 16.106431] spi_master spi1: noqueue transfer failed [ 16.120397] spi_master spi1: noqueue transfer failed [ 16.131900] spi_master spi1: noqueue transfer failed [ 16.168199] spi_master spi1: noqueue transfer failed [ 16.184874] spi_master spi1: noqueue transfer failed [ 16.219440] spi_master spi1: noqueue transfer failed [ 16.256967] spi_master spi1: noqueue transfer failed [ 16.315349] spi_master spi1: noqueue transfer failed Edited November 12 by WDR_s 0 Quote
robertoj Posted November 13 Posted November 13 https://forum.armbian.com/topic/44191-orangepi-zero-lts-ili9341-tft-lcd-and-later-orangepi-zero-3/?do=findComment&comment=204672 ^ Try the DTS from this comment. You need to make the pins match the pins I define there with Dupont wires. 0 Quote
robertoj Posted Thursday at 05:45 PM Posted Thursday at 05:45 PM Did you have any success with the ili9486? I would like to use a bigger 480x320 pixel SPI LCD panel more reference: https://maker.pro/forums/threads/configuration-of-lcd-with-linux.287566/ 0 Quote
WDR_s Posted 9 hours ago Author Posted 9 hours ago Hello. On this screen you need CS, when connected directly to the board, using dupont I'm not sure because I don't have it. The driver will only load if reset and dc are set to 2. At the moment that's all I've found, but it still gives an error when it loads the driver, so I'm trying to solve it. Spoiler reset-gpios = <&pio 2 0 0>: dc-gpios = <&pio 2 0 0>: 0 Quote
robertoj Posted 6 hours ago Posted 6 hours ago Those 2 lines contradict each other: both reset and dc (data/command) cant be the same. Can you send a drawing of the wiring between the orange pi zero and the LCD display? (in terms of SPI-MISO, MOSI, DC, RESET, LED, etc, and the DTS you have just tried? 0 Quote
WDR_s Posted 5 hours ago Author Posted 5 hours ago I know that, I was just giving an example. it should be like this: <&pio 2 N N>: I'm currently using this one: Spoiler /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h616"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; cs-gpios = <&pio 2 9 0>,<&pio 7 15 0>; /*PH9=CS0 for lcd, PC15=CS1 for touch*/ ili9486: ili9486@0 { compatible = "ilitek,ili9486"; reg = <0>; pinctrl-names = "default"; spi-max-frequency = <24000000>; rotation = <270>; bgr = <0>; fps = <30>; buswidth = <8>; reset-gpios = <&pio 2 14 0>; /* PC14 */ dc-gpios = <&pio 2 7 0>; /* PHC7 */ debug = <3>; }; }; }; }; 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.