Tool/software:
Dear TI Support Team,
I am currently working on RS485 communication on the AM64x platform using UART6 in RS485 mode. I've enbaled the uart with CTS and RTS pin configuration, please find the below dts code snippet and I have enabled the RS485 bindings in the device tree and configured the direction control using a GPIO mapped via rts-gpios
. However, I am encountering issues with consistent communication on the RS485 bus.
Key Configuration:
-
SoC: AM6442
-
Kernel Version: 6.6.58-rt45-ti-rt-01780-gc79d7ef3a56f-dirty
-
UART Driver: 8250_omap
-
Direction Control: GPIO pin configured using
rts-gpios
as well as UART RTS
-
DTS code snippet for UART configured with CTS and RTS, here the RTS pin will act as direction control for RS485:
main_uart6_pins_default: main-uart6-pins-default {
bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0074, PIN_INPUT, 2) /* (Y21) GPMC0_AD14.UART6_RXD */
AM64X_IOPAD(0x0078, PIN_OUTPUT, 2) /* (Y20) GPMC0_AD15.UART6_TXD */
AM64X_IOPAD(0x006c, PIN_INPUT, 2) /*(W21) GPMC0_AD12.UART6_CTSn */
AM64X_IOPAD(0x0090, PIN_OUTPUT, 2) /*(P17) GPMC0_BE0n_CLE.UART6_RTSn */
>;
&main_uart6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart6_pins_default>;
};
- RS485 DTS Binding, here RTS pin is configured as GPIO and RS485 binding properties have defined in the dts, please go through the following code snippet.
main_uart6_pins_default: main-uart6-pins-default {
bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x0074, PIN_INPUT, 2) /* (Y21) GPMC0_AD14.UART6_RXD */
AM64X_IOPAD(0x0078, PIN_OUTPUT, 2) /* (Y20) GPMC0_AD15.UART6_TXD */
>;
};
/* RS485 Direction control pin */
rs485_driver_receiver_enable_pin: rs485-DE-RE-pin-default {
pinctrl-single,pins = <
AM64X_IOPAD(0x0090, PIN_OUTPUT, 7) /* (P17) GPMC0_BE0n_CLE.UART6_RTSn as GPIO
>;
};
&main_uart6 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_uart6_pins_default &rs485_driver_receiver_enable_pin>;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-high;
rs485-rx-during-tx;
rts-gpios = <&main_gpio0 35 GPIO_ACTIVE_LOW>;
};
Issue Description:
-
The GPIO used for direction control is not toggling as expected during TX/RX cycles.
-
When using user-space applications with
TIOCSRS485
ioctl, the direction seems to stay fixed. -
Attempted loopback and external device testing fail intermittently.
Request:
-
Please confirm whether
8250_omap
fully supports RS485 withrts-gpios
on AM64x. -
Are there known limitations or patches required for direction control to function reliably with GPIO?
-
Is there an example or recommended configuration for RS485 duplexing on this SoC?
Looking forward to your guidance or any reference materials you could share.
Regards,
Saranbabu KM