* [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support
@ 2026-11-20 15:49 Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Diogo Ivo @ 2026-11-20 15:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc,
Diogo Ivo, Cosmin Tanislav, stable
This series adds hardware RS485 support to the Renesas RSCI serial
driver, along with an RX FIFO trigger fix needed to prevent overruns,
and enables optional RS485 operation on the RZ/G3L SMARC EVK:
- Patch 1 lowers the RSCI RX FIFO trigger level to half the FIFO size
(8 of 16 for RSCI_PORT_SCIF16 and 16 of 32 for RSCI_PORT_SCIF32) to
prevent receive overruns at 115200 baud on RZ/G3L and 1152000 baud on
RZ/T2H.
- Patch 2 documents the standard RS485 properties in the renesas,rsci
Device Tree binding by referencing rs485.yaml#.
- Patch 3 adds hardware RS485 support to the RSCI driver via the
Driver Control Register (DCR) and CCR3.DEN bit, configuring the DE
signal polarity (DCR.DEPOL) and assertion/negation delays (DCR.DEAST
and DCR.DENGT), and handling half-duplex echo suppression in software
when SER_RS485_RX_DURING_TX is not set.
- Patch 4 adds an RS485_ENABLE macro (disabled by default) to the
RZ/G3L SMARC EVK Device Tree to configure RSCI2 for RS485 operation.
This series depends on:
- "Fix transmit handling on SCI/RSCI ports" [1]
[1] https://lore.kernel.org/r/20261117-g2ul_sci-v5-0-30b58ea18923@renesas.com
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Cosmin Tanislav (1):
tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO
Diogo Ivo (3):
dt-bindings: serial: renesas,rsci: Document RS485 properties
serial: sh-sci: rsci: Add RS485 support
arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2
.../devicetree/bindings/serial/renesas,rsci.yaml | 1 +
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 11 +++
drivers/tty/serial/rsci.c | 89 ++++++++++++++++++++++
drivers/tty/serial/sh-sci-common.h | 3 +
drivers/tty/serial/sh-sci.c | 20 ++++-
5 files changed, 122 insertions(+), 2 deletions(-)
---
base-commit: f2b455e5f155a969e576a1ad019a2225b514da2c
change-id: 20261106-divo-ssgrlpcsrc-2996-rs485-cecfa3248bec
Best regards,
--
Diogo Ivo <diogo.ivo.sx@renesas.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO
2026-11-20 15:49 [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
@ 2026-11-20 15:49 ` Diogo Ivo
2026-11-20 16:11 ` Greg Kroah-Hartman
2026-11-20 15:49 ` [PATCH mainline-linux 2/4] dt-bindings: serial: renesas,rsci: Document RS485 properties Diogo Ivo
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Diogo Ivo @ 2026-11-20 15:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc,
Diogo Ivo, Cosmin Tanislav, stable
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
the FIFO holds at least RTRG bytes, so the receive interrupt arrives
with a single byte of space left, causing overruns at 1152000 baud on
RZ/T2H, and at 115200 baud on RZ/G3L.
Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
to 1 because they have no hardware FIFO timeout and a higher trigger
would leave bytes in the FIFO.
Trigger at half the FIFO for RSCI as well, 8 of 16 for RSCI_PORT_SCIF16
and 16 of 32 for the RSCI_PORT_SCIF32 types.
Cc: stable@vger.kernel.org
Fixes: 3a3ab10245b6 ("serial: sh-sci: Update rx_trigger size for RZ/T2H RSCI")
Fixes: 0666e3fe95ab ("serial: sh-sci: Add support for RZ/T2H SCI")
Fixes: 42eeed6d9f31 ("serial: sh-sci: Add support for RZ/G3E RSCI")
Fixes: 8f18d3cbd920 ("serial: sh-sci: Add support for RZ/G3L RSCI")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/tty/serial/sh-sci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index f5194cfa3364..1ab0e5677791 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3348,9 +3348,11 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 64;
break;
case PORT_SCIFA:
+ sci_port->rx_trigger = 32;
+ break;
case RSCI_PORT_SCIF32:
case RSCI_PORT_SCIF32_SINGLE_TCLK:
- sci_port->rx_trigger = 32;
+ sci_port->rx_trigger = 16;
break;
case PORT_SCIF:
if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
@@ -3360,7 +3362,7 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 8;
break;
case RSCI_PORT_SCIF16:
- sci_port->rx_trigger = 16;
+ sci_port->rx_trigger = 8;
break;
default:
sci_port->rx_trigger = 1;
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mainline-linux 2/4] dt-bindings: serial: renesas,rsci: Document RS485 properties
2026-11-20 15:49 [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
@ 2026-11-20 15:49 ` Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 3/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2 Diogo Ivo
3 siblings, 0 replies; 7+ messages in thread
From: Diogo Ivo @ 2026-11-20 15:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc,
Diogo Ivo
Reference rs485.yaml to allow standard RS485 properties on Renesas
RSCI serial controller nodes.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Documentation/devicetree/bindings/serial/renesas,rsci.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml
index 85ebb3056066..9adc7878127d 100644
--- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml
@@ -97,6 +97,7 @@ required:
allOf:
- $ref: serial.yaml#
+ - $ref: rs485.yaml#
- if:
properties:
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mainline-linux 3/4] serial: sh-sci: rsci: Add RS485 support
2026-11-20 15:49 [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 2/4] dt-bindings: serial: renesas,rsci: Document RS485 properties Diogo Ivo
@ 2026-11-20 15:49 ` Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2 Diogo Ivo
3 siblings, 0 replies; 7+ messages in thread
From: Diogo Ivo @ 2026-11-20 15:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc,
Diogo Ivo
The RSCI IP block on RZ/G3E and RZ/G3L has hardware support for RS485,
via a dedicated DE (Driver Enable) output signal meant to control the
driver of the RS485 transceiver. Add support for this feature to the
RSCI driver.
As there is no RE (Receive Enable) signal on RSCI we handle half-duplex
mode in software, by disabling reception while we transmit data and
reenabling it once we finish transmitting data in order to avoid
capturing our echo.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/tty/serial/rsci.c | 89 ++++++++++++++++++++++++++++++++++++++
drivers/tty/serial/sh-sci-common.h | 3 ++
drivers/tty/serial/sh-sci.c | 14 ++++++
3 files changed, 106 insertions(+)
diff --git a/drivers/tty/serial/rsci.c b/drivers/tty/serial/rsci.c
index 80087be11808..00c48937efb0 100644
--- a/drivers/tty/serial/rsci.c
+++ b/drivers/tty/serial/rsci.c
@@ -26,6 +26,7 @@ MODULE_IMPORT_NS("SH_SCI");
#define CCR3 0x14
#define CCR4 0x18
#define FCR 0x24
+#define DCR 0x30
#define CSR 0x48
#define FRSR 0x50
#define FTSR 0x54
@@ -63,11 +64,13 @@ MODULE_IMPORT_NS("SH_SCI");
/* CCR2 (Common Control Register 2) */
#define CCR2_INIT 0xFF000004
+#define CCR2_CKS GENMASK(21, 20) /* Clock select */
#define CCR2_CKS_TCLK (0) /* TCLK clock */
#define CCR2_CKS_TCLK_DIV4 BIT(20) /* TCLK/4 clock */
#define CCR2_CKS_TCLK_DIV16 BIT(21) /* TCLK16 clock */
#define CCR2_CKS_TCLK_DIV64 (BIT(21) | BIT(20)) /* TCLK/64 clock */
#define CCR2_BRME BIT(16) /* Bitrate Modulation Enable */
+#define CCR2_BRR GENMASK(15, 8) /* Bitrate Setting */
#define CCR2_ABCSE BIT(6) /* Asynchronous Mode Extended Base Clock Select */
#define CCR2_ABCS BIT(5) /* Asynchronous Mode Base Clock Select */
#define CCR2_BGDM BIT(4) /* Baud Rate Generator Double-Speed Mode Select */
@@ -103,6 +106,11 @@ MODULE_IMPORT_NS("SH_SCI");
#define FCR_RTRG4_0 GENMASK(20, 16)
#define FCR_TTRG GENMASK(12, 8)
+/* DCR (Driver Control Register) */
+#define DCR_DENGT GENMASK(20, 16) /* Driver Negation Time */
+#define DCR_DEAST GENMASK(12, 8) /* Driver Assertion Time */
+#define DCR_DEPOL BIT(0) /* Driver Effective Polarity Select */
+
/* CSR (Common Status Register) */
#define CSR_RDRF BIT(31) /* Receive Data Full */
#define CSR_TEND BIT(30) /* Transmit End Flag */
@@ -213,6 +221,76 @@ static int rsci_scif_set_rtrg(struct uart_port *port, int rx_trig)
return rx_trig;
}
+static unsigned long rsci_get_base_clock_rate(struct uart_port *port)
+{
+ unsigned int cks, brr, prediv;
+ u32 ccr2;
+
+ ccr2 = rsci_serial_in(port, CCR2);
+ cks = FIELD_GET(CCR2_CKS, ccr2);
+ brr = FIELD_GET(CCR2_BRR, ccr2);
+
+ if (ccr2 & (CCR2_BGDM | CCR2_ABCSE))
+ prediv = 1 << (2 * cks);
+ else
+ prediv = 2 << (2 * cks);
+
+ return DIV_ROUND_CLOSEST(port->uartclk, prediv * (brr + 1));
+}
+
+static int rsci_rs485_config(struct uart_port *port, struct ktermios *termios,
+ struct serial_rs485 *rs485)
+{
+ u32 deast_clks, dengt_clks, base_rate;
+ u32 ccr0, ccr3, dcr;
+
+ ccr0 = rsci_serial_in(port, CCR0);
+ if (ccr0 & (CCR0_TE | CCR0_RE))
+ rsci_serial_out(port, CCR0, ccr0 & ~(CCR0_TE | CCR0_RE));
+
+ ccr3 = rsci_serial_in(port, CCR3);
+ dcr = rsci_serial_in(port, DCR);
+
+ dcr &= ~(DCR_DEPOL | DCR_DEAST | DCR_DENGT);
+
+ if (rs485->flags & SER_RS485_ENABLED) {
+ if (!(rs485->flags & SER_RS485_RTS_ON_SEND))
+ dcr |= DCR_DEPOL;
+
+ base_rate = rsci_get_base_clock_rate(port);
+
+ deast_clks = DIV_ROUND_UP_ULL((u64)rs485->delay_rts_before_send * base_rate,
+ MSEC_PER_SEC);
+ dengt_clks = DIV_ROUND_UP_ULL((u64)rs485->delay_rts_after_send * base_rate,
+ MSEC_PER_SEC);
+
+ /* Per the HW manual a value of 0 clocks is not valid so clamp to 1 */
+ deast_clks = clamp(deast_clks, 1U, FIELD_MAX(DCR_DEAST));
+ dengt_clks = clamp(dengt_clks, 1U, FIELD_MAX(DCR_DENGT));
+
+ dcr |= FIELD_PREP(DCR_DEAST, deast_clks) |
+ FIELD_PREP(DCR_DENGT, dengt_clks);
+ ccr3 |= CCR3_DEN;
+ } else {
+ ccr3 &= ~CCR3_DEN;
+ }
+
+ rsci_serial_out(port, CCR3, ccr3);
+ rsci_serial_out(port, DCR, dcr);
+
+ if (ccr0 & (CCR0_TE | CCR0_RE))
+ rsci_serial_out(port, CCR0, ccr0);
+
+ return 0;
+}
+
+static const struct serial_rs485 rsci_rs485_supported = {
+ .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
+ SER_RS485_RTS_AFTER_SEND | SER_RS485_RX_DURING_TX,
+ .delay_rts_before_send = 1,
+ .delay_rts_after_send = 1,
+};
+
static void rsci_set_termios(struct uart_port *port, struct ktermios *termios,
const struct ktermios *old)
{
@@ -315,6 +393,9 @@ static void rsci_set_termios(struct uart_port *port, struct ktermios *termios,
rsci_serial_out(port, CFCLR, CFCLR_CLRFLAG);
rsci_serial_out(port, FFCLR, FFCLR_DRC);
+ if ((port->rs485.flags & SER_RS485_ENABLED) && port->rs485_config)
+ rsci_rs485_config(port, termios, &port->rs485);
+
ccr0_val |= CCR0_RE;
rsci_serial_out(port, CCR0, ccr0_val);
@@ -400,6 +481,12 @@ static void rsci_start_tx(struct uart_port *port)
*/
ctrl = rsci_serial_in(port, CCR0);
ctrl |= CCR0_TIE | CCR0_TE;
+
+ /* Prevent echo in RS485 half-duplex mode */
+ if ((port->rs485.flags & SER_RS485_ENABLED) &&
+ !(port->rs485.flags & SER_RS485_RX_DURING_TX))
+ ctrl &= ~CCR0_RE;
+
rsci_serial_out(port, CCR0, ctrl);
}
@@ -631,6 +718,7 @@ static const struct sci_port_params rsci_rzg3e_port_params = {
.error_clear = RSCI_ERROR_CLEAR,
.param_bits = &rsci_port_param_bits,
.common_regs = &rsci_common_regs,
+ .rs485_supported = &rsci_rs485_supported,
};
static const struct sci_port_params rsci_rzt2h_port_params = {
@@ -676,6 +764,7 @@ static const struct sci_port_ops rsci_port_ops = {
.suspend_regs_size = rsci_suspend_regs_size,
.set_rtrg = rsci_scif_set_rtrg,
.shutdown_complete = rsci_shutdown_complete,
+ .rs485_config = rsci_rs485_config,
};
struct sci_of_data of_rsci_rzg3e_data = {
diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci-common.h
index b75e5e1d3075..b4f27740a8b9 100644
--- a/drivers/tty/serial/sh-sci-common.h
+++ b/drivers/tty/serial/sh-sci-common.h
@@ -72,6 +72,7 @@ struct sci_port_params {
const struct plat_sci_reg regs[SCI_NR_REGS];
const struct sci_common_regs *common_regs;
const struct sci_port_params_bits *param_bits;
+ const struct serial_rs485 *rs485_supported;
unsigned int fifosize;
unsigned int overrun_reg;
unsigned int overrun_mask;
@@ -100,6 +101,8 @@ struct sci_port_ops {
void (*console_save)(struct uart_port *port);
void (*console_restore)(struct uart_port *port);
size_t (*suspend_regs_size)(void);
+ int (*rs485_config)(struct uart_port *port, struct ktermios *termios,
+ struct serial_rs485 *rs485);
};
struct sci_of_data {
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 1ab0e5677791..4d8d42e4f08a 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2043,6 +2043,10 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void *ptr)
goto out_unlock;
}
+ if ((port->rs485.flags & SER_RS485_ENABLED) &&
+ !(port->rs485.flags & SER_RS485_RX_DURING_TX))
+ ctrl |= bits->rxtx_enable;
+
ctrl &= ~bits->te_clear;
s->ops->write_reg(port, regs->control, ctrl);
out_unlock:
@@ -3865,6 +3869,16 @@ static int sci_probe_single(struct platform_device *dev,
sciport->port.flags |= UPF_HARD_FLOW;
}
+ if (sciport->params->rs485_supported) {
+ sciport->port.rs485_config = sciport->ops->rs485_config;
+ sciport->port.rs485_supported = *sciport->params->rs485_supported;
+
+ ret = uart_get_rs485_mode(&sciport->port);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "Failed to get RS485 mode\n");
+ }
+
if (sci_uart_earlycon && sci_ports[0].port.mapbase == sci_res->start) {
/*
* In case:
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2
2026-11-20 15:49 [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
` (2 preceding siblings ...)
2026-11-20 15:49 ` [PATCH mainline-linux 3/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
@ 2026-11-20 15:49 ` Diogo Ivo
2026-11-20 16:03 ` Krzysztof Kozlowski
3 siblings, 1 reply; 7+ messages in thread
From: Diogo Ivo @ 2026-11-20 15:49 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc,
Diogo Ivo
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@renesas.com>
---
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
<RZG3L_PORT_PINMUX(8, 0, 6)>, /* RSCI2_CTS */
<RZG3L_PORT_PINMUX(8, 1, 5)>; /* RSCI2_SS_CTS#_RTS# */
+#endif
bias-pull-up;
power-source = <1800>;
};
@@ -235,7 +241,12 @@ &rsci2 {
pinctrl-0 = <&rsci2_pins>;
pinctrl-names = "default";
+#if RS485_ENABLE
+ rs485-rts-delay = <1 1>;
+ linux,rs485-enabled-at-boot-time;
+#else
uart-has-rtscts;
+#endif
status = "okay";
};
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2
2026-11-20 15:49 ` [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2 Diogo Ivo
@ 2026-11-20 16:03 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-20 16:03 UTC (permalink / raw)
To: Diogo Ivo, Greg Kroah-Hartman, Jiri Slaby, Biju Das, Wolfram Sang,
Thierry Bultel, Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm
Cc: linux-kernel, linux-serial, devicetree, linux-renesas-soc
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@renesas.com>
> ---
Odd subject prefix. :/
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
> 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.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO
2026-11-20 15:49 ` [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
@ 2026-11-20 16:11 ` Greg Kroah-Hartman
0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-20 16:11 UTC (permalink / raw)
To: Diogo Ivo
Cc: Jiri Slaby, Biju Das, Wolfram Sang, Thierry Bultel,
Geert Uytterhoeven, Lad Prabhakar, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Magnus Damm, linux-kernel,
linux-serial, devicetree, linux-renesas-soc, Cosmin Tanislav,
stable
On Fri, Nov 20, 2026 at 03:49:24PM +0000, Diogo Ivo wrote:
> From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
>
> The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
> which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
> the FIFO holds at least RTRG bytes, so the receive interrupt arrives
> with a single byte of space left, causing overruns at 1152000 baud on
> RZ/T2H, and at 115200 baud on RZ/G3L.
>
> Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
> HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
> to 1 because they have no hardware FIFO timeout and a higher trigger
> would leave bytes in the FIFO.
>
> Trigger at half the FIFO for RSCI as well, 8 of 16 for RSCI_PORT_SCIF16
> and 16 of 32 for the RSCI_PORT_SCIF32 types.
>
> Cc: stable@vger.kernel.org
> Fixes: 3a3ab10245b6 ("serial: sh-sci: Update rx_trigger size for RZ/T2H RSCI")
> Fixes: 0666e3fe95ab ("serial: sh-sci: Add support for RZ/T2H SCI")
> Fixes: 42eeed6d9f31 ("serial: sh-sci: Add support for RZ/G3E RSCI")
> Fixes: 8f18d3cbd920 ("serial: sh-sci: Add support for RZ/G3L RSCI")
So this patch is going to fail to apply to 6.18.y, which from this list
looks like you want it to apply to. So please break it up into
one-patch-per-device to make it simpler for everyone involved.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-20 16:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 15:49 [PATCH mainline-linux 0/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 1/4] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
2026-11-20 16:11 ` Greg Kroah-Hartman
2026-11-20 15:49 ` [PATCH mainline-linux 2/4] dt-bindings: serial: renesas,rsci: Document RS485 properties Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 3/4] serial: sh-sci: rsci: Add RS485 support Diogo Ivo
2026-11-20 15:49 ` [PATCH mainline-linux 4/4] arm64: dts: renesas: r9a08g046l48-smarc: Add RS485 support on RSCI2 Diogo Ivo
2026-11-20 16:03 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox