linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching
@ 2025-05-29 13:53 Felix Brack
  2025-07-07 22:02 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Brack @ 2025-05-29 13:53 UTC (permalink / raw)
  To: tony, robh, krzk+dt, conor+dt, linux-omap, devicetree; +Cc: linux-kernel, fb

The wiring of the RS-485 transceiver of UART0 of the PDU-001 board
allows sending or receiving date exclusively. In other words: no
character transmitted will ever be received.
Hence the tx-filter counter in the OMAP serial driver can't work
correctly as it relies on receiving the transmitted characters.
This in turn will prevent reception of data unless we disable the
tx-filter counter.
This patch disables the tx-filter counter by enabling the DTS setting
rs485-rx-during-tx. This might sound like the opposite to be done but
it uses the enabling of rs485-rx-during-tx not for receiving the data
transmitted but for disabling the tx-fiter counter.

Tested-by: Felix Brack <fb@ltec.ch>
Signed-off-by: Felix Brack <fb@ltec.ch>
---
 arch/arm/boot/dts/ti/omap/am335x-pdu001.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
index ded19e24e666..6c96840fe8be 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pdu001.dts
@@ -258,6 +258,7 @@ &uart0 {
 
 	rts-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
 	rs485-rts-active-high;
+	rs485-rx-during-tx;
 	rs485-rts-delay = <0 0>;
 	linux,rs485-enabled-at-boot-time;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching
  2025-05-29 13:53 [PATCH] ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching Felix Brack
@ 2025-07-07 22:02 ` Kevin Hilman
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2025-07-07 22:02 UTC (permalink / raw)
  To: tony, robh, krzk+dt, conor+dt, linux-omap, devicetree,
	Felix Brack
  Cc: linux-kernel


On Thu, 29 May 2025 15:53:24 +0200, Felix Brack wrote:
> The wiring of the RS-485 transceiver of UART0 of the PDU-001 board
> allows sending or receiving date exclusively. In other words: no
> character transmitted will ever be received.
> Hence the tx-filter counter in the OMAP serial driver can't work
> correctly as it relies on receiving the transmitted characters.
> This in turn will prevent reception of data unless we disable the
> tx-filter counter.
> This patch disables the tx-filter counter by enabling the DTS setting
> rs485-rx-during-tx. This might sound like the opposite to be done but
> it uses the enabling of rs485-rx-during-tx not for receiving the data
> transmitted but for disabling the tx-fiter counter.
> 
> [...]

Applied, thanks!

[1/1] ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching
      commit: 539e87dd661f5ce321019c27ab15cad55345e429

Best regards,
-- 
Kevin Hilman <khilman@baylibre.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-07 22:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 13:53 [PATCH] ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching Felix Brack
2025-07-07 22:02 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).