lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com>
Date:   Wed, 15 Mar 2023 21:41:56 +0100
From:   Francesco Dolcini <francesco@...cini.it>
To:     Lukas Wunner <lukas@...ner.de>,
        Vignesh Raghavendra <vigneshr@...com>, Bin Liu <b-liu@...com>,
        linux-serial@...r.kernel.org, Zeng Chao <chao.zeng@...mens.com>
Cc:     Rob Herring <robh@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        ilpo.jarvinen@...ux.intel.com, tony@...mide.com,
        andriy.shevchenko@...ux.intel.com,
        matthias.schiffer@...tq-group.com, linux-kernel@...r.kernel.org,
        Max Krummenacher <max.krummenacher@...adex.com>
Subject: Wrong 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ