Jump to content
  • 0

tinydrm ili9341 garbled display.


mhel
 Share

Question

Hi, I finally have time to get back to my little project.

I've been trying to get a working display with tinydrm for an ILI9341 base lcd.

My setup works on OpenWrt with the older fbtft driver, but now I'd like to
go back and try Armbian (current release is Jammy) on it.

My first try with devicetree overlay seems functional but not correct.

The display just show garbled data (see attached). What could be the problem with it?

 

This is my env.

verbosity=1
bootlogo=false
console=both
overlay_prefix=sun50i-h5
overlays=usbhost1 usbhost2 spi-spidev
param_spidev_spi_bus=0
rootdev=UUID=e0ed80c4-a252-4d96-ad61-78b7834d6b8d
rootfstype=ext4
user_overlays=spilcd
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

and this is my overlay
 

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";
    
    fragment@0 {
        target = <&spi0>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells = <0>;
            
            display: display@0 {
                compatible = "adafruit,yx240qv29", "ilitek,ili9341";
                reg = <0>;
                rotation = <270>;
                reset-gpios = <&pio 0 6 0>; /* GPIOA 6 */
                dc-gpios = <&pio 0 3 0>; /* GPIOA 3 */            
            };
        };
    };
};

 

ili9341.jpg

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

Got it to work 🙂

I'm not exactly sure what fixed it but I'll probably figure it out once it breaks again.

this is my new overlay so others may find it useful.

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";

  fragmen@0 {
    target = <&pio>;
    __overlay__ {
        display_pins: display_pins {
        pins = "PA3", "PA6";
        function = "gpio_out";
      };
    };
   };

  fragment@1 {
    target = <&spi0>;
    __overlay__ {
    /* needed to avoid dtc warning */
    #address-cells = <1>;
    #size-cells = <0>;

        display: display@0 {
          compatible = "adafruit,yx240qv29", "ilitek,ili9341";
          reg = <0>;
          pinctrl-names = "default";
          pinctrl-0 = <&display_pins>;
          spi-max-frequency = <16000000>;
          rotation= <270>;
          bgr;
          fps = <10>;
          buswidth = <8>;
          height = <240>;
          width = <320>;
          reset-gpios = <&pio 0 6 0>; /* GPIOA 6 */
          dc-gpios = <&pio 0 3 0>; /* GPIOA 3 */
          debug = <3>;
        };
      };
    };

  __overrides__ {
    rotation = <&display>, "rotation:0";
    fps = <&display>, "fps:0";
    debug = <&display>, "debug:0";
  };
};

 

console.jpg

Link to comment
Share on other sites

Help Armbian team helping you!

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.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...