ST7789V usage with iMX91-FRDM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ST7789V usage with iMX91-FRDM

449 Views
nvijzendoorn
Contributor I

Hello,

We are doing research for an upcoming project where we are going to integrate the iMX91 with a small st7789v display. Currently we are trying to get the st7789v working with FRDM-i.MX91 board. We included the st7789v driver statically into the kernel via the make configuration and we are trying to hook it up to the display-subsystem because that is probably the way to go. (If not another way is fine to)

We do this by the following section from our DTS file which be based of both imx91-11x11-frdm.dts and imx91-11x11-frdm-tianma-wvga-panel.dts combined with this thread https://community.toradex.com/t/st7789v-tft-display-bring-up-on-colibri-imx7d/19169/22:

&lpspi3 {
	fsl,spi-num-chipselects = <1>;
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&pinctrl_lpspi3>;
	pinctrl-1 = <&pinctrl_lpspi3>;
	cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
	pinctrl-assert-gpios = <&pcal6408 0 GPIO_ACTIVE_HIGH>;
	status = "okay";

	spidev0: spi@0 {
		reg = <0>;
		compatible = "lwn,bk4";
		spi-max-frequency = <1000000>;
		status = "disabled";
	};

	panel: panel@0 {
		compatible = "sitronix,st7789v";
		
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_disp_gpio>;
		
		reg = <0>;
		
		reset-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
		dc-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
		backlight = <&backlight>;
		power-supply = <&reg_vexp_3v3>;
		
		spi-max-frequency = <100000>;
		spi-rx-bus-width = <0>;
		spi-cpol;
		spi-cpha;
		
		width = <240>;
		height = <320>;
		rotate = <270>;
		
		debug = <0x4000000>;
		
		status = "okay";
		
		port {
			panel_in: endpoint {
				remote-endpoint = <&display_out>;
			};
		};
	};
};

&lcdif {
	assigned-clock-rates = <300000000>, <30000000>, <200000000>, <133333333>;
	status = "okay";
	
	lcdif_disp: port {
		#address-cells = <1>;
		#size-cells = <0>;

		display_out: endpoint@2 {
			reg = <2>;
			remote-endpoint = <&panel_in>;
		};
	};
};

 

The lcdif_disp port is used because this label is used in imx91.dtsi in the display-subsystem however if we override this label the following kernel messages disappear:

[    0.873918] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    0.882305] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[    0.890224] imx-drm display-subsystem: [drm] Cannot find any crtc or sizes

 

What would be the proper way to hookup the display to the display-subsystem if possible? And / or how can we get the display up and running with an /dev/fb0 device?

Any help would be highly appreciated.

PS. If it would be easier to use the ili9341  this is also an option for us however then we still would like to know how to hookup it up in the device-tree.

 

We are using the branch scarthgap of the Yocto project.

0 Kudos
Reply
4 Replies

371 Views
nvijzendoorn
Contributor I

Oké, I got some further. Apparently there is a panel driver for the st7789v but not an tinyDRM driver.

This probably is fixed by merging the following merge request:
https://patchwork.kernel.org/project/dri-devel/patch/20210330080846.116223-1-zhangxuezhi3@gmail.com/ 
https://patchwork.kernel.org/project/dri-devel/patch/20210330081505.116351-1-zhangxuezhi3@gmail.com/ 

 

However to test if this would solve my issue I decided to first check this with an ili9341 since this has an tinyDRM driver build into the kernel. However when I use this by enabling the configurations and define the proper configuration in the DTS:
- CONFIG_DRM_PANEL_ILITEK_ILI9341=y
- CONFIG_TINYDRM_ILI9341=y

Now the backlight is functioning normal again. But there is nothing on the screen and I receive errors like this from the kernel:
[ ..... ] fsl-edma-v3 42000000.dma-controller: Source Address Error interrupt.

Any idea on how to debug this problem would be appreciated. I presume it's from the ili9431 driver, but I cannot find where it tries to flush the framebuffer to the display?

0 Kudos
Reply

324 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @nvijzendoorn!

Apparently the driver is not 100% functionality with Linux yet

Unfortunately we don't provide the driver for that display.

 

I recommend using the supported display.

 

Best Regards!

Chavira

0 Kudos
Reply

427 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @nvijzendoorn!

Thank you for contacting NXP Support!

 

Try adding the next configs to your kernel:

CONFIG_DRM_PANEL_SITRONIX_ST7789V=y
CONFIG_DRM=y
CONFIG_SPI=y
CONFIG_BACKLIGHT_GPIO=y
CONFIG_PWM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
 
 
 
 

0 Kudos
Reply

412 Views
nvijzendoorn
Contributor I

@Chavira thanks for your response, unfortunately all these configurations where already on so that was not the issue.

Personally I think there is something wrong with my DTS but the iMX platform and the display-subsystem is rather new to me so I'm not sure.

0 Kudos
Reply