Skip to main content
AKacp
Associate II
August 28, 2019
Solved

STM32MP1 LTDC device tree for RGB display

  • August 28, 2019
  • 6 replies
  • 4082 views

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

Best answer by AntonioST

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>;
			};
		};
	};
};

6 replies

PatrickF
Technical Moderator
August 29, 2019
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
AntonioST
AntonioSTBest answer
ST Employee
August 29, 2019

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
August 7, 2024
AKacp
AKacpAuthor
Associate II
August 30, 2019

That helped, thx.

HG.11
Associate
May 26, 2021

@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
June 6, 2021

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
March 21, 2022

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