I'm trying to use the UART-2 Ports on Wand Board Quad(Ver C1). I have modified the imx6qdl.dtsi and imx6qdl-wandboard.dtsi file for enabling the UART2 port on the Wandboard-Quad.After executing commands
--> cat /dev/ttymxc1 &
-->echo 1234567890 > /dev/ttymxc1
But I'm not getting the echo response for the command executed.(pin 6 --U2_RXand pin 14-U2_TX are shorted ).
*************************************
below path location of git where the changes were made
************************************************************
/home/lablinux/fsl-community-bsp/build/tmp/work/wandboard_quad-poky-linux-gnueabi/linux-wandboard/3.10.17-r0/git/arch/arm/boot/dts
Below Changes done in sourcefile --> imx6qdl.dtsi
--------------------------------------------
pinctrl_uart2_3: uart2grp-3 { /* DTE mode */
fsl,pins = <
MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA 0x1b0b1
MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA 0x1b0b1
>;
};
below path location of git where the changes were made (imx6qdl-wandboard.dtsi)
------------------------------------------------------
pinctrl_gpio: commented this two pins.
/*MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x4001b0b0 /* GPIO3_27 EDM pin 258 */
/*MX6QDL_PAD_EIM_D26__GPIO3_IO26 0x4001b0b0 /* GPIO3_26 EDM pin 259 */
added below to support uart2
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2_3>;
status = "okay";
};
After making the above changes i executed the below commands
-->bitbake -c devshell virtual/kernel (From build directory /home/lablinux/fsl-community-bsp/build)
-->make dtbs (from /home/lablinux/fsl-community-bsp/build/tmp/work/wandboard_quad-poky-linux-gnueabi/linux-wandboard/3.10.17-r0/git/)
-->bitbake -c deploy -f virtual/kernel (From build directory /home/lablinux/fsl-community-bsp/build).
then executed
-->bitbake core-image-minimal (From build directory /home/lablinux/fsl-community-bsp/build)
After this loaded the core-image-minimal.sdcard on the SD card using the dd command.
I am able to see the ttymxc1 after executing ls /dev.
But after executing below commands
--> cat /dev/ttymxc1 &
-->echo 1234567890 > /dev/ttymxc1
i am not seeing the echoing (Shorting of tx and rx taken care).(Also ran a serial test and observed the TX(14 pin) line on Oscilloscope no signals are appearing).
Used as reference the below link-->Wandboard Discussion Forums • View topic - Enable Second UART (Kernel 3.10 with Device Tree)
Please let me know above steps followed for dtsi changes are correct.??and why tthe communication is not happening..
Hi harsh
regarding " the TX(14 pin) line on Oscilloscope no signals are appearing" -
in "DTE" mode as shown on pinctrl_uart2_3, TX is input according to
Table 90. UART I/O Configuration vs. Mode i.MX6DQ Datasheet
http://www.nxp.com/docs/en/data-sheet/IMX6DQCEC.pdf
In general one can attach jtag debugger and test uart writing to its registers.
Example of uart2 dts can be found on :
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for the reply.
I was able to see the echo on the terminal after making the following changes.
In the imx6qdl_wandboard.dtsi For uart2 previously we had written as below.
&uart2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2_3>; status = "okay"; }; ********************** and in the file imx6qdl.dtsi we had created a group as belowpinctrl_uart2_3: uart2grp-3 { /* DTE mode */ fsl,pins = < MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA 0x1b0b1 MX6QDL_PAD_SD4__DAT5_UART2_RTS_B 0x1b0b1 MX6QDL_PAD_SD4__DAT6_UART2_CTS_B 0x1b0b1 MX6QDL_PAD_SD4__DAT7_UART2_TX_DATA 0x1b0b1 >; };But the changes didn't work. So i changed the imx6qdl_wandboard.dtsi to below&uart2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart2_1>; status = "okay"; }; and after this i was able to see the UART2 working.Verfied by the echo test. Then verfied with the scope also. And below were the dtsi configuration for uart2 group-1 in imx6qdl.dtsiuart2 { pinctrl_uart2_1: uart2grp-1 { fsl,pins = < MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1 MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1 >; };