From b631cd0d9cee3aecce9380597151d1f20cbb5b7b Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 15 Mar 2023 19:27:55 +0100 Subject: arm64: dts: ti: k3-am625-verdin-dev: fix rs485 rts polarity The 8250_omap.c driver uses the RS485 RTS polarity device tree property inverted to how it is described in the generic binding document [1], [2]. To have RTS low when sending one needs to set rs485-rts-active-high; The same is true when setting the RTS polarity through ioctl. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/serial/rs485.yaml#n32 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/8250_omap.c#n861 Upstream-Status: Pending Initial DTS to be used for bring-up an validation of the V1.0 design, we'll decide on the step forward to mainline this once the bring-up and validation will be done. Signed-off-by: Max Krummenacher --- arch/arm64/boot/dts/ti/k3-am625-verdin-dev.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am625-verdin-dev.dtsi b/arch/arm64/boot/dts/ti/k3-am625-verdin-dev.dtsi index bbb8b5ba644d..6559d21615ec 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-verdin-dev.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am625-verdin-dev.dtsi @@ -156,7 +156,11 @@ /* Verdin UART_1, connector X50 through RS485 transceiver. */ &main_uart1 { linux,rs485-enabled-at-boot-time; - rs485-rts-active-low; + /* + * The 8250 OMAP driver interprets rs485-rts-active-high and its + * ioctl equivalent as driving RTS low on send. + */ + rs485-rts-active-high; rs485-rx-during-tx; status = "okay"; }; @@ -220,5 +224,5 @@ /* Verdin UART_2 */ /* TODO: enable it, currently reserved by DM firmware */ &wkup_uart0 { - status = "reserved"; + status = "okay"; }; -- cgit v1.2.3