Getting 2.4" SPI TFT to work with BBB using TINY_DRM freezes console

I have been trying to get Adafruit 2.4" SPI TFT to work. Connected LCD to SPI1.0 and compiled BBB image and have updated DTS and added necessary kernel fragments
Link i followed is this one Reference-Link
Fragment for adding TINY DRM is as below
FragmentForTinyDRM
In local.conf i have added

MACHINE ??= “beaglebone”
CORE_IMAGE_EXTRA_INSTALL += “kernel-modules”
Post i flash image to SD card an image boots i see console freezes post and last line i see if
[drm] Initialized ili9341 1.0.0 20180514 for spi1.0 on minor 0

I am unclear on where i am going wrong with this and would appreciate any insight or direction

Can you ssh into the board ?

The reason the console appears to freeze might be because output is being redirected to the lcd display rather than the serial console.

What is the purpose of the display ? You mught find it easier just to talk directly to the display using spidev and ignore the drm.module

Source your build and let see what layers you have

$bitbake-layers show-layers

If you are using the TI yocto it might have some issues. The best has been MACHINE=“beaglebone-yocto” from poky and using kirkstone branches of all the layers.

Thanks for the reply
Now, i have started building image by using machine=beaglebone-yocto
I am using dunfell branch
The reason for freeze appears to be due to not enabling pwm-backlight and once i did that the freeze stopped, but not appears on display
so far i have tried tiny_drm as well as FB_TFT_ILI9341
CONFIG_STAGING=y
CONFIG_FB_TFT=y
CONFIG_FB_TFT_ILI9341=y
& another build with
CONFIG_DRM_MIPI_DBI=m
CONFIG_TINYDRM_ILI9341=m

below are the dts changes

&spi1 {
        #address-cells = <1>;
        #size-cells = <0>;

        status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&spi1_pins>;
        channel@0{
                     status = "disabled";
                     reg = <0>;
            };
        display@0{
                    status = "okay";
                    compatible = "adafruit,yx240qv29", "ilitek,ili9341"; //this makes ili9341 visible once we do lsmod
                    //compatible = "ilitek,ili9341"; ->no driver name ili seen if we do this
                    reg = <0>;
                    spi-max-frequency = <16000000>;
                    dc-gpios    = <&gpio3 19 0>;   // lcd dc    P9.27 gpio3[19]
                    reset-gpios = <&gpio3 21 0>;   // lcd reset P9.25 gpio3[21]
                    //reset-gpios = <&gpio3 21 1>;   // lcd reset P9.25 gpio3[21]
                    // backlight is optional
                    // choose either pwm or gpio control
                    //backlight = <&backlight_gpio>; // lcd lite  P9.23 gpio1[17]

                    backlight = <&backlight_pwm>;    // lcd lite  P9.16 gpmc_a2.ehrpwm1b

                    // refer to https://elinux.org/Beagleboard:Cape_Expansion_Headers
                    // rotation is optional
                    rotation = <270>;
                    bgr;
                    fps = <50>;
                    buswidth = <9>;
                    regwidth = <8>;
                    //This should get lots 
                    //debug = <7>;
           };
};
1 Like

I build image based on yocto-linux
Some progress from loading driver, but still nothing on display

I was able to get LCD up and running, added notes to this link
working-solution
-maheshG

1 Like