imx6DL: No signal on UART2 TX/RX pins

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx6DL: No signal on UART2 TX/RX pins

跳至解决方案
2,811 次查看
stasgil
Contributor III

Hi,

    We are using imx6 Dual Lite with kernel 4.1.15, with custom yocto meta layer and on a custom board, that was prototyped from the imx6 wandboard. 

    We have a direct UART to USB connection for UART1 debug output which works fine.

    On the board we also have UART2 connected to MAX3232 UART to RS232 transceiver, and RS232 connects to the lap top USB. (I need to make this output default console output)

    I have configured the UART2 in the device tree as follows:

pinctrl_uart2: uart2grp {
   fsl,pins = <
      MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
      MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
      MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1
      MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1
      >;
}

&uart2 {
   pintctrl-names = "default";
   pinctrl-0 = <&pinctrl_uart2>;
   fsl,uart-has-rtscts;
   fsl,dte-mode;
   status = "okay";
};

when i boot i see the serial driver registers the ttymxc1 port.

From linux, i can see /dev/ttymxc1

However any attempt to write to it (echo -ne 'ASDFG' > /dev/ttymxc1) doesn't result in anything. 

I have connected oscilloscope to RTS/CTS/RX/TX pins and nothing happens when i try writing to the ttymxc1 port, they just stay in 'high' state.

I have repeated steps above with following configuration (without any flow control) as well, but i get same results

pinctrl_uart2: uart2grp {
   fsl,pins = <
      MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
      MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
      >;
}

&uart2 {
   pintctrl-names = "default";
   pinctrl-0 = <&pinctrl_uart2>;
   status = "okay";
};

From the questions i have already browsed here, people seem to have a problem with CTS/RTS lines swapped, but since i've disabled them it shouldn't make any difference. 

I feel like i probably missed some serial port configuration step in Linux, any pointers ?

Thanks !

标签 (2)
标记 (3)
0 项奖励
1 解答
1,236 次查看
stasgil
Contributor III

Hi Igor,

    Thanks for the quick reply !

Ughh it's embarassing, but it's actually just a typo (that's also in the question) that wasn't caught by the compiler, and got me pulling my hair for the whole day, apologise for the inconvenience.....

&uart2 {
   pintctrl-names = "default";
   pinctrl-0 = <&pinctrl_uart2>;
   status = "okay";
};

在原帖中查看解决方案

0 项奖励
3 回复数
1,236 次查看
fabio_estevam
NXP Employee
NXP Employee

Hi Stas,

I think you need to remove the "fsl,dte-mode;" property.

Also, take a look at arch/arm/boot/dts/imx6qdl-udoo.dtsi, which uses the same UART2 pins.

Regards,

Fabio Estevam

0 项奖励
1,236 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Stas

there may be confusion with signals directions related to uart dte/dce modes.

please check Table 86. UART I/O Configuration vs. Mode i.MX6SDL Datasheet
http://www.nxp.com/docs/en/data-sheet/IMX6SDLCEC.pdf

May be useful to attached jtag and check uart and its iomux registers.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
1,237 次查看
stasgil
Contributor III

Hi Igor,

    Thanks for the quick reply !

Ughh it's embarassing, but it's actually just a typo (that's also in the question) that wasn't caught by the compiler, and got me pulling my hair for the whole day, apologise for the inconvenience.....

&uart2 {
   pintctrl-names = "default";
   pinctrl-0 = <&pinctrl_uart2>;
   status = "okay";
};

0 项奖励