Skip to main content
AKacp
Associate II
Aug 28, 2019 8:37 PM UTC
Solved

STM32MP1 LTDC device tree for RGB display

Hello,

is there any example how to configure LTDC device tree entry for RGB display ?

Documentation is unclear on that, only MIPI mode is quite well documented.

Regards

Arkadiusz

This topic has been closed for replies.
AntonioST
AntonioSTBest answer
ST Employee
Aug 29, 2019 1:00 PM UTC

On the boards DK1 and DK2 the LTDC output is connected to the HDMI transmitter sil sii9022

This is a first example of using LTDC, but not exactly what you want.

On board EV1 there is an empty connector for LTDC. I have used it to test some RGB LCD panels described in Linux driver panel-simple.c

These are the lines I have added at the end of stm32mp157c-ev1.dts

With the information in the datasheet of the panel is not difficult to add a new entry in panel-simple.c

/* disable DSI panel */
&dsi {
	status = "disabled";
};
 
/* connect LTDC to the panel */
&ltdc {
	port {
		ltdc_ep1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&panel_rgb_in>;
		};
	};
};
 
/* simple-panel on LTDC */
/ {
	panel-rgb@0 {
		compatible = "ampire,am-480272h3tmqw-t01h", "simple-panel";
		status = "okay";
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&ltdc_pins_b>;
		pinctrl-1 = <&ltdc_pins_sleep_b>;
 
		port {
			panel_rgb_in: endpoint {
				remote-endpoint = <&ltdc_ep1_out>;
			};
		};
	};
};

7 replies

PatrickF
ST Employee
Aug 29, 2019 7:14 AM UTC
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
AntonioST
AntonioSTBest answer
ST Employee
Aug 29, 2019 1:00 PM UTC

On the boards DK1 and DK2 the LTDC output is connected to the HDMI transmitter sil sii9022

This is a first example of using LTDC, but not exactly what you want.

On board EV1 there is an empty connector for LTDC. I have used it to test some RGB LCD panels described in Linux driver panel-simple.c

These are the lines I have added at the end of stm32mp157c-ev1.dts

With the information in the datasheet of the panel is not difficult to add a new entry in panel-simple.c

/* disable DSI panel */
&dsi {
	status = "disabled";
};
 
/* connect LTDC to the panel */
&ltdc {
	port {
		ltdc_ep1_out: endpoint@1 {
			reg = <1>;
			remote-endpoint = <&panel_rgb_in>;
		};
	};
};
 
/* simple-panel on LTDC */
/ {
	panel-rgb@0 {
		compatible = "ampire,am-480272h3tmqw-t01h", "simple-panel";
		status = "okay";
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&ltdc_pins_b>;
		pinctrl-1 = <&ltdc_pins_sleep_b>;
 
		port {
			panel_rgb_in: endpoint {
				remote-endpoint = <&ltdc_ep1_out>;
			};
		};
	};
};

debugging
Lead
Aug 7, 2024 11:02 AM UTC
AKacp
AKacpAuthor
Associate II
Aug 30, 2019 6:52 PM UTC

That helped, thx.

HG.11
Associate
May 26, 2021 9:27 AM UTC

@AntonioST​ As this does not seem to work anymore after 2 years, could you please update your answer according to the latest device tree changes?

Cody
Visitor II
Jun 6, 2021 5:10 PM UTC

I was able to get my display working on openstlinux-5.10-dunfell-mp1-21-03-31 with the following code.

	/* root */
	panel {
		compatible = "innolux,at070tn92";
		enable-gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
 	reset-gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>;
		//backlight = <&panel_backlight>;
 	 	status = "okay";	
		port@0 {
			reg = <0>;
			panel_in: endpoint {
				remote-endpoint = <&ltdc_ep0_out>;			
			};
	
		};
	};
 
&ltdc{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&ltdc_pins_mx>;
	pinctrl-1 = <&ltdc_sleep_pins_mx>;
	status = "okay";
 
	/* USER CODE BEGIN ltdc */
 port {
		#address-cells = <1>;
		#size-cells = <0>;
 
		ltdc_ep0_out: endpoint@0 {
			reg = <0>;
			remote-endpoint = <&panel_in>;
		};
	};
	/* USER CODE END ltdc */
};

wElev.1
Visitor II
Mar 21, 2022 11:13 AM UTC

Hello everybody,

Thank you for this information, I can't use the "modetest" command, it doesn't seem to recognize the screen.

Are there any specific things to configure when using buildroot and an RGB screen in dpi?

# modetest

trying to open device 'i915'...failed

trying to open device 'amdgpu'...failed

trying to open device 'radeon'...failed

trying to open device 'nouveau'...failed

trying to open device 'vmwgfx'...failed

trying to open device 'omapdrm'...failed

trying to open device 'exynos'...failed

trying to open device 'tilcdc'...failed

trying to open device 'msm'...failed

trying to open device 'sti'...failed

trying to open device 'tegra'...failed

trying to open device 'imx-drm'...failed

trying to open device 'rockchip'...failed

trying to open device 'atmel-hlcdc'...failed

trying to open device 'fsl-dcu-drm'...failed

trying to open device 'vc4'...failed

trying to open device 'virtio_gpu'...failed

trying to open device 'mediatek'...failed

trying to open device 'meson'...failed

trying to open device 'pl111'...failed

trying to open device 'stm'...failed

trying to open device 'sun4i-drm'...failed

trying to open device 'armada-drm'...failed

trying to open device 'komeda'...failed

trying to open device 'imx-dcss'...failed

trying to open device 'mxsfb-drm'...failed

no device found

Thank you very much