Re: [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2

From: Diogo Ivo

Date: Tue Nov 24 2026 - 09:25:55 EST


Hi Krzysztof,

On 11/20/2026 4:03 PM, Krzysztof Kozlowski wrote:
On 20/11/2026 16:49, Diogo Ivo wrote:
Add an RS485_ENABLE macro (disabled by default) to configure RSCI2
for RS485 operation using the RSCI2_DE pinmux instead of RTS/CTS
hardware flow control.

Signed-off-by: Diogo Ivo <diogo.ivo.sx@xxxxxxxxxxx>
---

Odd subject prefix. :/

Yeah sorry about that, it slipped on my side and will fix for v2.

DTS cannot be combined in this patchset and must be split. Don't mix
patches from independent subsystems when you send something explicitly
targeting only one subsystem.
See also: Documentation/devicetree/bindings/submitting-patches.rst

Ok, then I'll send this patch separately.

arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 68d7b579e352..d583f52e61e7 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -23,6 +23,8 @@
#define KEY_2_GPIO RZG3L_GPIO(6, 4)
#define KEY_3_GPIO RZG3L_GPIO(6, 5)

+#define RS485_ENABLE 0
+
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/renesas,r9a08g046-pinctrl.h>
@@ -185,8 +187,12 @@ rsci1_pins: rsci1 {
rsci2_pins: rsci2 {
pinmux = <RZG3L_PORT_PINMUX(7, 6, 5)>, /* RSCI2_RXD_MISO_SCL */
<RZG3L_PORT_PINMUX(7, 7, 5)>, /* RSCI2_TXD_MOSI_SDA */
+#if RS485_ENABLE
+ <RZG3L_PORT_PINMUX(8, 1, 6)>; /* RSCI2_DE */
+#else

That's dead code.

The way that this is meant to be used is that whenever someone wants to
use RS485 on the board they would change RS485_ENABLE to 1, similarly to the way the other defines are used on this DTS. If this is not ok from your point of view then I can move the RS485 enablement to an overlay.

However, when you raised that point I realized that with the current approach the RSCI UART ports will always advertise RS485 support, even when RS485_ENABLE is 0 and as such the pinmuxing does not expose the DE pin to the outside, making it impossible to use this functionality.

There are other boards upstream that behave in this way, namely the imx8mp-hummingbird-iiot-rs485-{a, b}.dtso, where from my understanding the ports will always advertise RS485 support, even without the overlays. So I would like to ask the maintainers if this behaviour is ok
or if it needs changing, specifically adding runtime pinmuxing support to the driver (and perhaps the core).

Thanks,
Diogo


Best regards,
Krzysztof