I am using Toradex Colibri iMX6ULL System-on-Module (MCIMX6Y2CVM08AA) with our custom designed PCB. We found out we have accidentally swapped Tx and Rx lines in the PCB and the on-board peripherals won't work for us. By default, imx6ull colibri is configured in DTE-MODE (in imx6ull-colibri.dtsi file). We have our board level dts file which includes `imx6ull-colibri.dtsi` file. The UARTs which needs to be swapped (or configured in DCE Mode) are UART5 and UART2. Whenever in my board level dts file, I delete the property dte-mode defined in imx6ull-colibri.dtsi file and redefine pinctrl-0 property to point to right pinctrl node (pinctrl_uart5_own) having right configuration for DCE mode, then UART5 doesn't work. If I use pinctrl_uart5_own pinctrl node with dte-mode property defined, then UART5 works perfectly. Same happens with UART2. Please help.
My top level (board level) dts is given below:
/dts-v1/;
#include "imx6ull-colibri-nonwifi.dtsi"
#include "imx6ull-colibri-eval-v3.dtsi"
/ {
model = "Toradex Colibri iMX6ULL 256MB on Colibri Evaluation Board V3";
compatible = "toradex,colibri_imx6ull-eval", "fsl,imx6ull";
gpio_additional {
pinctrl-name = "default";
pinctrl-0 = <&pinctrl_additionalgpio>;
status = "okay";
};
};
&iomuxc {
imx6ull-colibri {
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x14 // Pin 34 => GPS SafeBoot
MX6UL_PAD_CSI_DATA00__GPIO4_IO21 0x14 // Pin 101 => 1V8 Power Supply Enable
MX6UL_PAD_LCD_ENABLE__GPIO3_IO01 0x14 // Pin 44 => GPS EXINT
MX6UL_PAD_LCD_DATA07__GPIO3_IO12 0x14 // Pin 46 => GPS RST
MX6UL_PAD_LCD_DATA09__GPIO3_IO14 0x14 // Pin 48 => UNUSED
MX6UL_PAD_LCD_DATA06__GPIO3_IO11 0x14 // Pin 80 => SX1301 RST
>;
};
pinctrl_uart5_their: uart5grp_their {
fsl,pins = <
MX6UL_PAD_GPIO1_IO04__UART5_DTE_RX 0x1b0b1
MX6UL_PAD_GPIO1_IO05__UART5_DTE_TX 0x1b0b1
>;
};
pinctrl_uart5_own: uart5grp_own {
fsl,pins = <
MX6UL_PAD_GPIO1_IO04__UART5_DCE_TX 0x0b0b0
MX6UL_PAD_GPIO1_IO05__UART5_DCE_RX 0x0b0b0
>;
};
};
};
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
/delete-property/fsl,dte-mode;
fsl,dce-mode;
};
&uart3 {
status = "disabled";
};
&uart4 {
status = "disabled";
};
&uart5 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart5_own>;
/delete-property/fsl,dte-mode;
};
&ecspi1 {
status = "okay";
};
&i2c1 {
status = "okay";
/* M41T0M6 real time clock on carrier board */
rtc: m41t0m6@68 {
status = "disabled";
};
};
&pwm1 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&lcdif {
status = "disabled";
};
&ecspi1 {
status = "okay";
};
&mcp258x0 {
status = "disabled";
};
&spidev0 {
status = "okay";
};
The Sections 55.4.3.10 and 55.4.3.11 of the i.MX6ULL Reference Manual Rev.1 document clearly say that the functionality of the UART_TX and UART_RX signals remains the same regardless of the mode - DTE or DCE - the UART module operates in. So, there is no way to swap the functionality of these signals by register settings.
Have a great day,
Artur
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
It is possible. Please have a look at this question to understand what I am trying to achieve.