Use GPIO Pins as RTS and CTS for UART

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Use GPIO Pins as RTS and CTS for UART

4,029件の閲覧回数
Aakash_Sharma
Contributor II

Hi,

We are using IMX8MQ based custom board on which we want to communicate with external BT device on UART3 of IMX with RTS-CTS functionality. We have configured UART3 RX and TX pins as usual but for RTS and CTS we are using GPIO1's IO6 and IO7 pins respectively. But unable to do communication. Below are the dts changes done for the the above mentioned functionality.

 

&uart3 { /* BT */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MQ_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>;
rts-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
cts-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
fsl,uart-has-rtscts;
// resets = <&modem_reset>;
status = "okay";
};

pinctrl_uart3: uart3grp {
fsl,pins = <
MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49
MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49
MX8MQ_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x69
MX8MQ_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x69
>;
};

Please Suggest if anything is missing? or we can't use GPIO as RTS and CTS for UART3 on IMX8MQ.

Thanks.

0 件の賞賛
返信
3 返答(返信)

2,340件の閲覧回数
roke
Contributor III

If you read the binding guide, you will find the conflict issue in your device tree.

 

https://github.com/nxp-imx/linux-imx/blob/rel_imx_4.14.98_2.2.0/Documentation/devicetree/bindings/se...

* Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART)
 
Required properties:
- compatible : Should be "fsl,<soc>-uart"
- reg : Address and length of the register set for the device
- interrupts : Should contain uart interrupt
 
Optional properties:
- fsl,irda-mode : Indicate the uart supports irda mode
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
                  in DCE mode by default.
 
Please check Documentation/devicetree/bindings/serial/serial.txt
for the complete list of generic properties.
 
Note: Each uart controller should have an alias correctly numbered
in "aliases" node.
 
Example:
 
aliases {
serial0 = &uart1;
};
 
uart1: serial@73fbc000 {
compatible = "fsl,imx51-uart", "fsl,imx21-uart";
reg = <0x73fbc000 0x4000>;
interrupts = <31>;
uart-has-rtscts;
fsl,dte-mode;
};
 
 
- uart-has-rtscts: The presence of this property indicates that the
UART has dedicated lines for RTS/CTS hardware flow control, and that
they are available for use (wired and enabled by pinmux configuration).
This depends on both the UART hardware and the board wiring.
Note that this property is mutually-exclusive with "cts-gpios" and
"rts-gpios" above, unless support is provided to switch between modes
dynamically.
 
0 件の賞賛
返信

2,347件の閲覧回数
A_M01
Contributor I

Hi ,
could you get the working case , im also looking for the configuration form imx8mp

0 件の賞賛
返信

3,026件の閲覧回数
mahesh_hns
Contributor II

@Aakash_Sharma Were you able to find the answer to the above query? I am looking for a similar configuration for IMX8MP processor. 

Anyone?

 

0 件の賞賛
返信