lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWrong RS485 RTS polarity in 8250 OMAP UART Driver vs DT binding?
Hello all,
I have been recently working on RS485 on a TI K3 AM62 (using 8250_omap.c
driver) and there is something that I do not really understand about
the RTS polarity.

According to the DT binding (Documentation/devicetree/bindings/serial/rs485.yaml)
when `rs485-rts-active-low` is present the behavior should be "drive RTS
low when sending", however in the code it seems that this is handled the
opposite way (drivers/tty/serial/8250/8250_omap.c:861).

/*
* Retain same polarity semantics as RS485 software emulation,
* i.e. SER_RS485_RTS_ON_SEND means driving RTS low on send.
*/

We have working hardware, using another UART that expect
rs485-rts-active-low, and the exact same HW, when using OMAP uart,
requires rs485-rts-active-high (the HW is modular, so we are really just
changing the uart, keeping the same RS485 transceiver / connections).

What's going on there? Is the semantic of the 8250_omap driver just the
opposite as it should be? Am I doing something wrong in the device tree?

This is the relevant DTS part.

&main_uart1 {
linux,rs485-enabled-at-boot-time;
rs485-rts-active-high;
rs485-rx-during-tx;
status = "okay";
};

Francesco

\
 
 \ /
  Last update: 2023-03-27 01:01    [W:0.039 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site