cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 LTDC device tree for RGB display

AKacp
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
AntonioST
ST Employee

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

View solution in original post

7 REPLIES 7
PatrickF
ST Employee

Hi,

Did you look at https://wiki.st.com/stm32mpu/wiki/LTDC_device_tree_configuration ?

DPI/RGB bindings are in https://github.com/STMicroelectronics/linux/blob/v4.19-stm32mp/Documentation/devicetree/bindings/display/st,stm32-ltdc.txt

Regards

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.
AntonioST
ST Employee

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

AKacp
Associate II

That helped, thx.

HG.11
Associate II

@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
Associate II

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
Associate

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

Hello, I am using ECO 5.0 and  the solution does not work. here are my details

https://community.st.com/t5/stm32-mpus-products/stm32mp1-eco-5-0-ltdc-device-tree-rgb-lcd-not-working-anymore/td-p/706511