i.MX6ULL 4.3" LCD

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

i.MX6ULL 4.3" LCD

Jump to solution
1,633 Views
daneduplooy
Contributor III

I have a custom board based on i.MX6ULLEVK. I am trying to get the display going but am completely new to this and not sure where to start. I am using u-boot 2022.10 and Buildroot with the default imx6ullevk_defconfig (slightly modified for the custom board). Kernel for this is 5.14.14 and Kernel defconfig is imx_v6_v7. Currently the screen just stays off / blank. I can fiddle with the backlight PWM and verify that the backlight is working, but there is nothing on the display. I'm not sure if the display should be working "out of the box" with this build configuration or if there are drivers which I need to enable / other things which need to be done.

The only thing reported during Kernel boot is:

[ 0.471271] platform panel: Fixing up cyclic dependency with 21c8000.lcdif

Interestingly, if I remove lcdif and panel from the device tree then the display backlight comes on (from the "backlight-display" entry), but with the lcdif / panel present in the device tree then the display backlight stays off.

Any help/pointers appreciated, thank-you :-).

0 Kudos
Reply
1 Solution
1,594 Views
daneduplooy
Contributor III

Got this working using the 2nd style by switching to linux-imx for the kernel.

View solution in original post

0 Kudos
Reply
4 Replies
1,595 Views
daneduplooy
Contributor III

Got this working using the 2nd style by switching to linux-imx for the kernel.

0 Kudos
Reply
1,609 Views
daneduplooy
Contributor III

Using the 2nd style I get the following during Kernel boot:

[ 5.041752] mxsfb 21c8000.lcdif: Cannot connect bridge: -19

Again, the 2nd style works fine with u-boot (hardware verified working).

The display backlight comes on.

 

Using the 1st style I get the following during Kernel boot:

[ 0.358471] platform panel: Fixing up cyclic dependency with 21c8000.lcdif

The display backlight stays off.

 

With neither style is there any signal on the LCD clock / data lines.

 

I am wondering whether the display actually works on the MCIMX6ULL-EVK with Kernel 5.14.14 (and the built-in imx6ul-14x14-evk device tree which I am copying from)? I don't currently have an MCIMX6ULL-EVK to test with however my hardware is pretty much identical and as mentioned the hardware/LCD has been verified to work from u-boot. Should the display come on by default? Are there command-line parameters which need to be passed to the kernel in order to activate the display? Is there a command(s) which need to be run after boot to activate the display? Is the "Fixing up cyclic dependency" message normal / to-be-expected?

0 Kudos
Reply
1,611 Views
daneduplooy
Contributor III

I am using the same settings as the imx6ullevk which I copied from. The driver compatible is 'compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif";' in imx6ul.dtsi. I have seen two styles of handling the display in the Device Tree:

First style (used in imx6ul-14x14-evk.dtsi):

/ {
	backlight_display: backlight-display {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 5000000>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		status = "okay";
	};

	panel {
		compatible = "innolux,at043tn24";
		backlight = <&backlight_display>;

		port {
			panel_in: endpoint {
				remote-endpoint = <&display_out>;
			};
		};
	};
};

&lcdif {
	assigned-clocks = <&clks IMX6UL_CLK_LCDIF_PRE_SEL>;
	assigned-clock-parents = <&clks IMX6UL_CLK_PLL5_VIDEO_DIV>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lcdif_dat
		     &pinctrl_lcdif_ctrl>;
	status = "okay";

	port {
		display_out: endpoint {
			remote-endpoint = <&panel_in>;
		};
	};
};

&pwm1 {
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&iomuxc {
	pinctrl-names = "default";

	pinctrl_lcdif_dat: lcdifdatgrp {
		fsl,pins = <
			MX6UL_PAD_LCD_DATA00__LCDIF_DATA00  0x79
			MX6UL_PAD_LCD_DATA01__LCDIF_DATA01  0x79
			MX6UL_PAD_LCD_DATA02__LCDIF_DATA02  0x79
			MX6UL_PAD_LCD_DATA03__LCDIF_DATA03  0x79
			MX6UL_PAD_LCD_DATA04__LCDIF_DATA04  0x79
			MX6UL_PAD_LCD_DATA05__LCDIF_DATA05  0x79
			MX6UL_PAD_LCD_DATA06__LCDIF_DATA06  0x79
			MX6UL_PAD_LCD_DATA07__LCDIF_DATA07  0x79
			MX6UL_PAD_LCD_DATA08__LCDIF_DATA08  0x79
			MX6UL_PAD_LCD_DATA09__LCDIF_DATA09  0x79
			MX6UL_PAD_LCD_DATA10__LCDIF_DATA10  0x79
			MX6UL_PAD_LCD_DATA11__LCDIF_DATA11  0x79
			MX6UL_PAD_LCD_DATA12__LCDIF_DATA12  0x79
			MX6UL_PAD_LCD_DATA13__LCDIF_DATA13  0x79
			MX6UL_PAD_LCD_DATA14__LCDIF_DATA14  0x79
			MX6UL_PAD_LCD_DATA15__LCDIF_DATA15  0x79
			MX6UL_PAD_LCD_DATA16__LCDIF_DATA16  0x79
			MX6UL_PAD_LCD_DATA17__LCDIF_DATA17  0x79
			MX6UL_PAD_LCD_DATA18__LCDIF_DATA18  0x79
			MX6UL_PAD_LCD_DATA19__LCDIF_DATA19  0x79
			MX6UL_PAD_LCD_DATA20__LCDIF_DATA20  0x79
			MX6UL_PAD_LCD_DATA21__LCDIF_DATA21  0x79
			MX6UL_PAD_LCD_DATA22__LCDIF_DATA22  0x79
			MX6UL_PAD_LCD_DATA23__LCDIF_DATA23  0x79
		>;
	};

	pinctrl_lcdif_ctrl: lcdifctrlgrp {
		fsl,pins = <
			MX6UL_PAD_LCD_CLK__LCDIF_CLK	    0x79
			MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE  0x79
			MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC    0x79
			MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC    0x79
			/* used for lcd reset */
			MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09  0x79
		>;
	};

	pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX6UL_PAD_GPIO1_IO08__PWM1_OUT   0x110b0
		>;
	};
};

 

Second style:

/ {
	backlight_display: backlight-display {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 8000000>;
		brightness-levels = <0 16 32 64 96 128 160 255>;
		default-brightness-level = <6>;
		status = "okay";
	};
};

&pwm2 {
	#pwm-cells = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&lcdif {
	assigned-clocks = <&clks IMX6UL_CLK_LCDIF_PRE_SEL>;
	assigned-clock-parents = <&clks IMX6UL_CLK_PLL5_VIDEO_DIV>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lcdif_dat
		     &pinctrl_lcdif_ctrl>;
	display = <&display0>;
	status = "okay";

	display0: display {
		bits-per-pixel = <24>; // 16?
		bus-width = <24>;

		display-timings {
			native-mode = <&timing0>;
			timing0: timing0 {
				clock-frequency = <10000000>;
				hactive = <480>;
				vactive = <272>;
				hback-porch = <43>;
				hfront-porch = <25>;
				vback-porch = <12>;
				vfront-porch = <8>;
				hsync-len = <41>;
				vsync-len = <10>;
				
				hsync-active = <0>;
				vsync-active = <0>;
				de-active = <1>;
				pixelclk-active = <0>;
			};
		};
	};
};

&iomuxc {
	pinctrl-names = "default";

	pinctrl_lcdif_dat: lcdifdatgrp {
		fsl,pins = <
			MX6UL_PAD_LCD_DATA00__LCDIF_DATA00  0x79
			MX6UL_PAD_LCD_DATA01__LCDIF_DATA01  0x79
			MX6UL_PAD_LCD_DATA02__LCDIF_DATA02  0x79
			MX6UL_PAD_LCD_DATA03__LCDIF_DATA03  0x79
			MX6UL_PAD_LCD_DATA04__LCDIF_DATA04  0x79
			MX6UL_PAD_LCD_DATA05__LCDIF_DATA05  0x79
			MX6UL_PAD_LCD_DATA06__LCDIF_DATA06  0x79
			MX6UL_PAD_LCD_DATA07__LCDIF_DATA07  0x79
			MX6UL_PAD_LCD_DATA08__LCDIF_DATA08  0x79
			MX6UL_PAD_LCD_DATA09__LCDIF_DATA09  0x79
			MX6UL_PAD_LCD_DATA10__LCDIF_DATA10  0x79
			MX6UL_PAD_LCD_DATA11__LCDIF_DATA11  0x79
			MX6UL_PAD_LCD_DATA12__LCDIF_DATA12  0x79
			MX6UL_PAD_LCD_DATA13__LCDIF_DATA13  0x79
			MX6UL_PAD_LCD_DATA14__LCDIF_DATA14  0x79
			MX6UL_PAD_LCD_DATA15__LCDIF_DATA15  0x79
			MX6UL_PAD_LCD_DATA16__LCDIF_DATA16  0x79
			MX6UL_PAD_LCD_DATA17__LCDIF_DATA17  0x79
			MX6UL_PAD_LCD_DATA18__LCDIF_DATA18  0x79
			MX6UL_PAD_LCD_DATA19__LCDIF_DATA19  0x79
			MX6UL_PAD_LCD_DATA20__LCDIF_DATA20  0x79
			MX6UL_PAD_LCD_DATA21__LCDIF_DATA21  0x79
			MX6UL_PAD_LCD_DATA22__LCDIF_DATA22  0x79
			MX6UL_PAD_LCD_DATA23__LCDIF_DATA23  0x79
		>;
	};

	pinctrl_lcdif_ctrl: lcdifctrlgrp {
		fsl,pins = <
			MX6UL_PAD_LCD_CLK__LCDIF_CLK	    0x79
			MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE  0x79
			MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC    0x79
			MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC    0x79
			/* used for lcd reset */
			MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09  0x79
		>;
	};

	pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX6UL_PAD_GPIO1_IO08__PWM1_OUT   0x110b0
		>;
	};
};

 

I have managed to get the display working in u-boot using the 2nd style. I'm not sure if the Kernel driver [still] supports this style though (v5.14.14), currently trying to figure that out.

Could anyone explain what is going on with these 2 styles (I think the 2nd style is older and has been superseded by the 1st style), as well as provide any insight into the Freescale driver support for both (I am currently busy studying the driver code but it if anyone has any insight then that would be convenient)?

0 Kudos
Reply
1,621 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

So you have the driver for your lcd? since error mean you not have the proper driver to it, or migrate the driver to the kernel you are using, as well adapt the device tree according to.

regards

 

0 Kudos
Reply