St7789v tft display bring up on colibri imx7d

Dear @henrique.tx , I’m totally agree with you, I prefer to use the panel driver, instead of staging driver.

But I have to do it step by step. Because the only driver that works for me is “staging” driver in kernel 4.9 (AS MODULE) I started from it. As I wrote here:

now I’m able to have the driver integrated into kernel 4.9 (NOT as a module) and I have the splash screen. This is the first step.

Then I passed to kernel 5.4, and I tried to do the same (with “staging” driver, and the same device tree like in kernel 4.9). The strange thing is that the /dev/fb0 interface is correctly setup, but it doesn’t work (also with a simple “cat /dev/urandom > /dev/fb0”). This is quite surprising for me.

So I cut off “staging” driver and I tried with “panel” driver under drm. For this I enable “Direct Rendering Manager” in “Graphic support” under “Device Drivers”, and then “Sitronix ST7789V panel” under “Display Panels”.

Then I use this devicetree for this:

&iomuxc {	
	pinctrl_disp_gpio: disp_gpio_muxgrp {
		fsl,pins = <
			MX7D_PAD_ECSPI2_SS0__GPIO4_IO23      0x14  // DIS_RST   @ SODIMM 65
			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2  0x14  // DIS_D/CX  @ SODIMM 63
		>;
	};
};

&ecspi3 {
	// Enable the SPI controller
	status = "okay";
	
	// needed to avoid dtc warning
	#address-cells = <1>;
	#size-cells = <0>;

	mcp2515: can@0 {
		compatible = "microchip,mcp2515";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_can_int>;
		reg = <0>;
		clocks = <&clk16m>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <10000000>;
		status = "disabled";
	};

	spidev0: spidev@0 {
		compatible = "toradex,evalspi";
		reg = <0>;
		spi-max-frequency = <23000000>;
		status = "disabled";
	};
	
    panel@0 {
		compatible = "sitronix,st7789v";

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_disp_gpio>;		
		
		reg = <0>;
		reset-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
		backlight = <&pwm1>;
		power-supply = <&reg_module_5v>;
		spi-max-frequency = <100000>;
		spi-cpol;
		spi-cpha;
/*		
		port {
			panel_input: endpoint {
				remote-endpoint = <&tcon0_out_panel>;
			};
		};
*/		
	};

Where I commented “port” because I don’t know how to define it. Is it mandatory?

In this way I have no error in dmesg, but I don’t have any /dev/fb interface.

Is there anybody that are able to use this display via “drm” and “panel” driver (or a similar fb display)? Because I don’t see anybody that are using this interface and it’s very poor documented.

I there anyone that can address me to define the devicetree in the correct way? Also about the port?

Thanks a lot!

Valerio