[PATCH 2/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E

From: Diogo Ivo

Date: Fri Nov 27 2026 - 11:04:01 EST


From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx>

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.

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 (16 of 32) for RSCI_PORT_SCIF32.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 42eeed6d9f31 ("serial: sh-sci: Add support for RZ/G3E RSCI")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx>
Co-developed-by: Diogo Ivo <diogo.ivo.sx@xxxxxxxxxxx>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@xxxxxxxxxxx>
---
drivers/tty/serial/sh-sci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 6c156646d5cd..dcd97f9b5268 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3348,10 +3348,12 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 64;
break;
case PORT_SCIFA:
- case RSCI_PORT_SCIF32:
case RSCI_PORT_SCIF32_SINGLE_TCLK:
sci_port->rx_trigger = 32;
break;
+ case RSCI_PORT_SCIF32:
+ sci_port->rx_trigger = 16;
+ break;
case PORT_SCIF:
if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
/* RX triggering not implemented for this IP */

--
2.56.1