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 !
Solved! Go to Solution.
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";
};
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
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!
-----------------------------------------------------------------------------------------------------------------------
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";
};