UART 5 on Apalis iMX6Q with Linux

I am using an Apalis iMX6Q IT 2GB module on a custom carrier board and need to utilize all 5 UART’s on the module. The OS is a custom build based on BSP 5.1.0-devel+git.a2f08dfd79ae. UART’s 1-4 seem to be functioning normally and show in /dev. However I cannot seem to get UART 5 to show. I have made the following device tree changes.

imx6qdl-apalis.dtsi - added too

&uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3_dte>;
	fsl,dte-mode;
	status = "disabled";
};

&iomuxc {
    ....
    ....
    pinctrl_uart3_dce: uart3dcegrp {
		fsl,pins = <
 			MX6QDL_PAD_EIM_D24__UART3_TX_DATA   0x1b0b1
			MX6QDL_PAD_EIM_D25__UART3_RX_DATA   0x1b0b1
		>;
	};

	/* DTE mode */
	pinctrl_uart3_dte: uart3dtegrp { 
		fsl,pins = <
			MX6QDL_PAD_EIM_D24__UART3_RX_DATA   0x1b0b1
			MX6QDL_PAD_EIM_D25__UART3_TX_DATA   0x1b0b1
		>;
	};
    ....
    ....
};

imx6qdl-apalis-acu3.dtsi - added too

&uart3 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart3_dte>;
};

I guess my question is, what am I missing? I have followed the advice given on these forums for similar questions and cannot seem to get this working. I see apalis-uart1 through apalis-uart4 in /dev on the module but no apalis-uart5. The device tree files are in a custom kernel recipe with a .bbappend that adds them to the appropriate arch/arm/boot/dts folder. I can provide full device tree files if desired. Any help would be greatly appreciated.

-Mike

Could you try to set &uart3 status to enabled at imx6qdl-apalis.dtsi ? Since we don’t have a full view of your Device Tree files it’s not clear in what order dtsi files get processed.

You can also try to build only kernel and Device tree as described here and then replace dtb file on “live” image to be sure it’s not a yocto build issue.

Another way to simplify Device Tree changes applying/debugging is by using DT overlays.

@alex.tx I have attempted your suggestion with no luck. I have attached my device tree files here. I am still learning how all of this device tree stuff works. Would using overlays be an easier approach? If so, then what do I use as a base device tree since the apalis module will be on a custom carrier board?

Which my suggestion you attempted? Have you tried to compile device tree as described here?
Please check this article.

@alex.tx I changed the device tree to enable uart3 in imx6qdl-apalis.dtsi as you suggested. Then included the .dtb using bitbake and also built/added it separately using “make dtbs”. None of these options worked for me

  • What is name of your newly built dtb file?

  • Can you see it at /boot folder after you boot Linux on Apalis imx6?

  • Please take a look here.

@alex.tx

What is name of your newly built dtb file?

  • imx6q-apalis-acu3.dtb

Can you see it at /boot folder after you boot Linux on Apalis imx6?
Yes, it is in the /boot directory along with

  • boot.scr
  • inx6q-apalis-eval.dtb
  • overlays
  • overlays.txt
  • zImage

Please take a look here.

  • Looking at the console output during the boot process, it is loading the correct device tree. Also, rebooting and using the command printenv from U-Boot shows both fdt_file and fdtfile as imx6q-apalis-acu3.dtb

One thing that I did just notice when looking at the contents of /dev. I see 4 apalis-uart entries apalis-uart1 through apalis-uart4. Now there is no apalis-uart5 however there is ttymxc0 through ttymxc4. If I am not mistaken, those are the UART channels. So should this mean that I can access the 5th UART from userspace?

When &uart3 is enabled you should get /dev/ttymxc2 to access it.