how to RS485 in devicetree IMX8mp

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

how to RS485 in devicetree IMX8mp

754 次查看
Cyriactoms
Contributor II

I am using  custom board which is designed based on imx8mp evk board having imx8mp. I need to configure rs485 for uart1 and uart3 i have created one based on my knowledge but data transfer is not happening in it. can anyone help to figureout the issue with it 

&uart1{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
assigned-clocks = <&clk IMX8MP_CLK_UART1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
fsl,uart-has-rtscts;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rs485-rx-during-tx;
rs485-rts-delay = <0 0>;
status = "okay";
};
&uart3{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MP_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rs485-rx-during-tx;
rs485-rts-delay = <0 0>;
status = "okay";

};
pinctrl_uart1: rs485_01{
fsl,pins =<
MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x00000106
MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x00000106
MX8MP_IOMUXC_SD1_DATA0__UART1_DCE_RTS 0x00000106
MX8MP_IOMUXC_SD1_DATA1__UART1_DCE_CTS 0x00000106

>;
};
pinctrl_uart3: rs485_02{
fsl,pins =<
MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x00000106
MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x00000106
MX8MP_IOMUXC_SD1_STROBE__UART3_DTE_RTS 0x00000106
MX8MP_IOMUXC_SD1_RESET_B__UART3_DTE_CTS 0x00000106
 
 
标签 (1)
标记 (1)
0 项奖励
回复
4 回复数

731 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @Cyriactoms 

I hope you are doing very well.

 

I noticed that in your UART3 configuration, you are mixing DCE and DTE modes for the TX/RX and RTS/CTS pins. This inconsistency can lead to improper signal routing. Please ensure that all pins for a UART instance use the same mode (either DCE or DTE).

Also, the rs485-rts-active-low property assumes your transceiver enables transmission when RTS is low, please be sure about it.

 

Several of your RTS/CTS pins are muxed from SD1 interface signals. Ensure that usdhc1 is disabled.

 

I hope this can helps to you.

 

Best regards,

Salas.

0 项奖励
回复

709 次查看
Cyriactoms
Contributor II
rs485-rts-active-low if i didnt add this function means what is the default state
0 项奖励
回复

703 次查看
Cyriactoms
Contributor II

the DTE pins i got it from config tools when i do the pinmux  ihave atteached the screenshot on it

0 项奖励
回复

694 次查看
Cyriactoms
Contributor II
Is there anyother defconfig need to be added for the rs485 to be enabled
0 项奖励
回复