Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7604

Interfacing (DSI, CSI, I2C, etc.) • Re: CM4 UARTs - simultaneous access not working reliably when in RS485 mode?

$
0
0
The general idea of what the overlay is doing looks OK, but the implementation is flawed - the additional settings are applied in the wrong place, and get lost. There are two problems with the overlay (and the others in that PR: https://github.com/raspberrypi/linux/pull/6820):
1. The label "rs485" is on the wrong node, so when you set e.g.:

Code:

dtoverlay=uart3,rs485,rs485_rts_on_delay=5
you end up with something like this (before it is applied):

Code:

...rs485: fragment@2 {rs485-rts-delay = <5>;target = <&uart3>;__overlay__ {linux,rs485-enabled-at-boot-time;rs485-rts-delay = <0 0>;};};
Moving the label solves the problem:

Code:

fragment@2 {target = <&uart3>;rs485: __dormant__ {linux,rs485-enabled-at-boot-time;rs485-rts-delay = <0 0>;};};
2. rs485-rts-active-low is a boolean property - it's value is true if the property is present, and false if it is absent. However, the rs485_invert_rts override is treating it as if it is a string, then assigning nothing to it, so it ends up as an empty string. For this, we correct the declaration to make a boolean:

Code:

rs485_invert_rts = <&rs485>,"rs485-rts-active-low?";
I'll create a PR with the fixes.

Statistics: Posted by PhilE — Tue Dec 16, 2025 1:59 pm



Viewing all articles
Browse latest Browse all 7604

Trending Articles