UART5 not working in DTE mode on Colibri i.MX6?

We would like to use all of the five UARTs on Colibri i.MX6. While the first four are working as expected, we have some issues with UART5.

Device tree configuration snippet (complete DTS file available here):

&iomuxc {
	uart5 {
		pinctrl_uart5_dte: uart5grp-dte { /* DTE mode */
			fsl,pins = <
				MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA 0x1b0b1
				MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA 0x1b0b1
			>;
		};
	};	
};

&uart5 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart5_dte>;
	fsl,dte-mode;
	status = "okay";
};

With this configuration, the TX pin seems to be working well (we get data from it), but the RX seems to be completely deaf, since it does not receive data at all, not even in loopback mode (shorting TX and RX pins).

Now the odd part: If I disable DTE mode (comment out the line from device tree), the data flowing out of i.MX6 move to RX pin as expected, and TX now in fact receives data (is not deaf anymore) as proven by loopback test.

Any ideas what could be wrong here?

I believe you got the pinmuxing wrong. DCE vs. DTE requires some strange settings.

From looking at it I’d say you want:

 &iomuxc {
     uart5 {
         pinctrl_uart5_dte: uart5grp-dte { /* DTE mode */
             fsl,pins = <
                 MX6QDL_PAD_CSI0_DAT14__UART5_RX_DATA 0x1b0b1
                 MX6QDL_PAD_CSI0_DAT15__UART5_TX_DATA 0x1b0b1
             >;
         };
     };    
 };

Likely you will have to do the same to your UART4 pinmuxing.

@max.krummenacher
Oh yeah, seems like I got mislead by pinout table in Colibri datasheet. When using DTE mode, I have to mux it in exactly opposite way than what is said in the table, right?

Right. The i.MX 6 documentation is written for DCE mode.

@max.krummenacher
Thanks a lot of help. By the way, what is the reason to use DTE mode on i.MX6 modules?

UART1 in the Apalis standard is defined as full featured UART with 8 signals.
The DTR/DCD/DSR and RI signals are not symmetrical.
For these signals we have to use DTE to get the defined functionality.

Then we decided to use DTE mode for the other defined UARTs on the MXM connector.