Hi
I have a question on Hardware and Linux driver usage.
We are using iMX6UL CPU ( ) and want to use all the 8 CPU's.
We are reserving UART1 as debug console.
For rest of the UARTs (7 numbers) we want to drive a RS485 driver (ADM2687EBRIZ) direction control via CTS/RTS ?
As per the documentation I am not clear if I need to reserve RTS and CTS lines ? or just CTS lines is good enough ?
If CTS line is good enough then how to configure in the dts file ? All the DTS examples are using both the lines.
e.g. used is UART2
Configure in the DTS to have 3 Lines Tx,Rx,CTS (DCE Mode)
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
uart-has-rtscts;
status = "okay";
};
In the imx.c driver , I see that if "have_rtsgpio" is not set then the toggling will not happen and the comment says RTS is required.The comment is based on UART mode in DTE as RTS is output in DTE only and input in DCE mode.
/* RTS is required to control the transmitter */
if (!sport->have_rtscts && !sport->have_rtsgpio)
rs485conf->flags &= ~SER_RS485_ENABLED;
In the above structure , do I need to enable have_rtsgpio ?
pinctrl_uart2: uart2grp {
fsl,pins =
< MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
MX6UL_PAD_UART3_TX_DATA__UART2_DCE_CTS 0x1b0b1 >;
};
In the above structure do I have to have RTS line also ?
Please correct me and help me with correct pins and dts structures.
i hope u are solved the issue Ramgopal Kota,please give suggestion way you solved ,same requirement i have in i.MX6ull
Thanks in Advance.
Hi Ramgopal
from sect.64.7.1 Generalities i.MX6DQ Reference Manual :
The CTS_B pin can be used to control RS-485 output driver outside the chip.
so it is sufficient for RS485. Unused pin can be used for other purposes, comment
it in pinctrl_uart.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
We dont want to use RS485 9-bit mode. We want to use the normal UART mode
with CTS_B to control the RS485 driver.
If we dont use 9-bit mode, can we still drive CTS_B with linux.
BTW we are using iMX6UL and we are referring to reference manual (Document
Number: IMX6ULRM Rev. 1, 04/2016) and referring "53.7.1 Generalities".
Ramgopal Kota
On Fri, Jun 16, 2017 at 3:41 PM, igorpadykov <admin@community.nxp.com>
I am in need of information about how to do this too!
yes, one can still drive CTS_B with linux even dont use 9-bit mode.
~igor
Does the UART's use the CTS pin by default (on imx6ul EVK)?
you can check it on schematic
Schematics (1)
MCIMX6UL-EVK_DESIGNFILES
Design files, including hardware schematics, Gerbers, and OrCAD files. (REV 0)
http://www.nxp.com/products/sensors/gyroscopes/i.mx6ultralite-evaluation-kit:MCIMX6UL-EVK?fpsp=1&tab...
Best regards
igor