* [PATCH 0/2] Add RSCI support for RZ/T2N
@ 2026-12-05 16:56 Biju Das
2026-12-05 16:56 ` [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support Biju Das
2026-12-05 16:56 ` [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI Biju Das
0 siblings, 2 replies; 5+ messages in thread
From: Biju Das @ 2026-12-05 16:56 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Lad Prabhakar
Cc: linux-kernel, linux-serial, linux-renesas-soc, devicetree,
linux-renesas-soc, Biju Das
The RZ/T2N (R9A07G076) SoC has an RSCI IP that is similar to the one on
the RZ/T2H (R9A09G077) SoC. The difference is that its serial clock
(SCK) is connected to a CPG mux that selects between the PLL1/PLL4
dividers and an external clock input.
Because of this clock topology, a separate compatible is added for RZ/T2N
rather than reusing the RZ/T2H one. The driver can tell from the clock
frequency whether the external clock is in use, so no additional DT
property is needed.
Patch 1 documents the RZ/T2N compatible and shares the RZ/T2H
clocks/interrupts constraints.
Patch 2 adds the OF match entry and earlycon declaration to the driver,
reusing the RZ/T2H RSCI data.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Biju Das (2):
dt-bindings: serial: renesas,rsci: Document RZ/T2N support
serial: sh-sci: Add support for RZ/T2N RSCI
Documentation/devicetree/bindings/serial/renesas,rsci.yaml | 5 ++++-
drivers/tty/serial/rsci.c | 1 +
drivers/tty/serial/sh-sci.c | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)
---
base-commit: aefb2932fc3869865e001ba6fe14e2781f5b23d6
change-id: 20261205-t2n_serial_bindings-692b6f2a5480
Best regards,
--
Biju Das <biju.das.jz@bp.renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support 2026-12-05 16:56 [PATCH 0/2] Add RSCI support for RZ/T2N Biju Das @ 2026-12-05 16:56 ` Biju Das 2026-12-05 17:10 ` sashiko-bot 2026-12-05 16:56 ` [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI Biju Das 1 sibling, 1 reply; 5+ messages in thread From: Biju Das @ 2026-12-05 16:56 UTC (permalink / raw) To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven, Magnus Damm, Lad Prabhakar Cc: linux-kernel, linux-serial, linux-renesas-soc, devicetree, linux-renesas-soc, Biju Das From: Biju Das <biju.das.jz@bp.renesas.com> Document the serial communication interface (RSCI) found on the Renesas RZ/T2N (R9A07G076) SoC. The RSCI IP on RZ/T2N is similar to that on RZ/T2H (R9A09G077), but its serial clock (SCK) is not a fixed bus clock. It is fed by a CPG mux that selects between the PLL1/PLL4 dividers and an external clock input. Since the clock topology and the resulting clock handling differ from RZ/T2H, add a separate compatible instead of reusing the RZ/T2H one. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- Documentation/devicetree/bindings/serial/renesas,rsci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml index 85ebb3056066..4fc9a7b0a9e8 100644 --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml @@ -14,6 +14,7 @@ properties: compatible: oneOf: - enum: + - renesas,r9a07g076-rsci # RZ/T2N - renesas,r9a08g046-rsci # RZ/G3L - renesas,r9a09g047-rsci # RZ/G3E - renesas,r9a09g077-rsci # RZ/T2H @@ -102,7 +103,9 @@ allOf: properties: compatible: contains: - const: renesas,r9a09g077-rsci + enum: + - renesas,r9a07g076-rsci + - renesas,r9a09g077-rsci then: properties: interrupts: -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support 2026-12-05 16:56 ` [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support Biju Das @ 2026-12-05 17:10 ` sashiko-bot 0 siblings, 0 replies; 5+ messages in thread From: sashiko-bot @ 2026-12-05 17:10 UTC (permalink / raw) To: Biju Das; +Cc: linux-serial, devicetree, robh, conor+dt, wsa+renesas Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] dt-bindings: serial: RZ/T2N compatible rationale contradicts RZ/T2H schema -- commit 6726688cff01b759b63a07dc6671eeb693fb433f Author: Biju Das <biju.das.jz@bp.renesas.com> dt-bindings: serial: renesas,rsci: Document RZ/T2N support This commit adds the renesas,r9a07g076-rsci compatible string for the Renesas RZ/T2N SoC to the RSCI serial binding and applies the existing RZ/T2H property constraints to it. > diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml > index 85ebb3056066f..4fc9a7b0a9e89 100644 > --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml > +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml > @@ -14,6 +14,7 @@ properties: > compatible: > oneOf: > - enum: > + - renesas,r9a07g076-rsci # RZ/T2N > - renesas,r9a08g046-rsci # RZ/G3L > - renesas,r9a09g047-rsci # RZ/G3E > - renesas,r9a09g077-rsci # RZ/T2H > @@ -102,7 +103,9 @@ allOf: > properties: > compatible: > contains: > - const: renesas,r9a09g077-rsci > + enum: > + - renesas,r9a07g076-rsci > + - renesas,r9a09g077-rsci > then: > properties: > interrupts: [Severity: Medium] Should renesas,r9a07g076-rsci declare renesas,r9a09g077-rsci as a fallback compatible like renesas,r9a09g087-rsci (RZ/N2H), or are RZ/T2N's clock differences missing from the schema? The commit message justifies a standalone compatible by claiming SCK on RZ/T2N is fed by a CPG mux rather than a fixed bus clock as on RZ/T2H. In fact, RZ/T2H already defines operation, bus, and optional external sck, with r9a09g077-cpg.c driving sci0fck from CLK_SCI0ASYNC and bus from PCLKM. Meanwhile, this allOf block applies the exact same interrupts, clocks, clock-names, and resets constraints to RZ/T2N as to RZ/T2H. The follow-up commit "serial: sh-sci: Add support for RZ/T2N RSCI" also binds renesas,r9a07g076-rsci directly to of_rsci_rzt2h_data with no clock changes. Because Devicetree bindings define a permanent ABI, omitting a fallback breaks compatibility with existing RZ/T2H drivers if only the upstream CPG mux differs. If RZ/T2N instead has distinct RSCI clock inputs or IP differences, the schema should constrain them and the changelog explain why. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261205-t2n_serial_bindings-v1-0-7d98125dce02@bp.renesas.com?part=1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI 2026-12-05 16:56 [PATCH 0/2] Add RSCI support for RZ/T2N Biju Das 2026-12-05 16:56 ` [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support Biju Das @ 2026-12-05 16:56 ` Biju Das 2026-12-05 17:12 ` sashiko-bot 1 sibling, 1 reply; 5+ messages in thread From: Biju Das @ 2026-12-05 16:56 UTC (permalink / raw) To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven, Magnus Damm, Lad Prabhakar Cc: linux-kernel, linux-serial, linux-renesas-soc, devicetree, linux-renesas-soc, Biju Das From: Biju Das <biju.das.jz@bp.renesas.com> The RSCI IP on the RZ/T2N (R9A07G076) SoC is similar to that on the RZ/T2H (R9A09G077) SoC, but its serial clock is connected to a CPG mux that selects between the PLL1/PLL4 dividers and an external clock input. The driver can determine from the clock frequency it obtains whether the external clock is in use, so no extra DT property is needed to describe that. Because of this difference, a separate compatible is required. Add the OF match entry and earlycon declaration for RZ/T2N, reusing the RZ/T2H RSCI data. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> --- drivers/tty/serial/rsci.c | 1 + drivers/tty/serial/sh-sci.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/tty/serial/rsci.c b/drivers/tty/serial/rsci.c index 0391111db8ae..07921da8df17 100644 --- a/drivers/tty/serial/rsci.c +++ b/drivers/tty/serial/rsci.c @@ -727,6 +727,7 @@ static int __init rsci_rzt2h_early_console_setup(struct earlycon_device *device, return scix_early_console_setup(device, &of_rsci_rzt2h_data); } +OF_EARLYCON_DECLARE(rsci, "renesas,r9a07g076-rsci", rsci_rzt2h_early_console_setup); OF_EARLYCON_DECLARE(rsci, "renesas,r9a08g046-rsci", rsci_rzg3l_early_console_setup); OF_EARLYCON_DECLARE(rsci, "renesas,r9a09g047-rsci", rsci_rzg3e_early_console_setup); OF_EARLYCON_DECLARE(rsci, "renesas,r9a09g077-rsci", rsci_rzt2h_early_console_setup); diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 73639b974c27..3056955ade59 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3692,6 +3692,10 @@ static const struct of_device_id of_sci_match[] __maybe_unused = { .data = &of_sci_scif_rzv2h, }, #ifdef CONFIG_SERIAL_RSCI + { + .compatible = "renesas,r9a07g076-rsci", + .data = &of_rsci_rzt2h_data, + }, { .compatible = "renesas,r9a08g046-rsci", .data = &of_rsci_rzg3l_data, -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI 2026-12-05 16:56 ` [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI Biju Das @ 2026-12-05 17:12 ` sashiko-bot 0 siblings, 0 replies; 5+ messages in thread From: sashiko-bot @ 2026-12-05 17:12 UTC (permalink / raw) To: Biju Das; +Cc: linux-serial, devicetree, robh, conor+dt, wsa+renesas Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] serial: sh-sci: RZ/T2N clock claim unsupported by rsci_set_termios() -- commit 05c1400238002902941cd903784bfd2cd2a1ac11 Author: Biju Das <biju.das.jz@bp.renesas.com> serial: sh-sci: Add support for RZ/T2N RSCI This commit adds the OF match entry and earlycon declaration for the RZ/T2N (R9A07G076) RSCI, reusing the RZ/T2H RSCI configuration data. > diff --git a/drivers/tty/serial/rsci.c b/drivers/tty/serial/rsci.c > index 40db9daa4272d..fe947826f52cc 100644 > --- a/drivers/tty/serial/rsci.c > +++ b/drivers/tty/serial/rsci.c > @@ -725,6 +725,7 @@ static int __init rsci_rzt2h_early_console_setup(struct earlycon_device *device, > return scix_early_console_setup(device, &of_rsci_rzt2h_data); > } > > +OF_EARLYCON_DECLARE(rsci, "renesas,r9a07g076-rsci", rsci_rzt2h_early_console_setup); > OF_EARLYCON_DECLARE(rsci, "renesas,r9a08g046-rsci", rsci_rzg3l_early_console_setup); > OF_EARLYCON_DECLARE(rsci, "renesas,r9a09g047-rsci", rsci_rzg3e_early_console_setup); > OF_EARLYCON_DECLARE(rsci, "renesas,r9a09g077-rsci", rsci_rzt2h_early_console_setup); > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c > index bd58bbfa65aa7..5ae02b88699eb 100644 > --- a/drivers/tty/serial/sh-sci.c > +++ b/drivers/tty/serial/sh-sci.c > @@ -3667,6 +3667,10 @@ static const struct of_device_id of_sci_match[] __maybe_unused = { > .data = &of_sci_scif_rzv2h, > }, > #ifdef CONFIG_SERIAL_RSCI > + { > + .compatible = "renesas,r9a07g076-rsci", > + .data = &of_rsci_rzt2h_data, > + }, > { > .compatible = "renesas,r9a08g046-rsci", > .data = &of_rsci_rzg3l_data, [Severity: Medium] Is RZ/T2N external-clock handling missing here, or is the commit message inaccurate? The commit message states that a separate compatible is needed because the RZ/T2N serial clock is fed by a CPG mux selecting between PLL1/PLL4 and an external clock, and that the driver can determine from the clock frequency whether the external clock is in use. However, both entries reuse the RZ/T2H data verbatim. sci_port_enable() only reads clk_get_rate() into clk_rates[SCI_FCK], and rsci_set_termios() always runs sci_scbrr_calc() on SCI_FCK and writes CCR3_INIT | CCR3_FM without inspecting the frequency or setting CCR3_CKE1/CCR3_CKE0. If RZ/T2N requires distinct clock or register setup when the external clock is selected, reusing of_rsci_rzt2h_data will break baud-rate configuration in that mode. If CCF hides the CPG mux completely so the programming model matches RZ/T2H, the commit message should be corrected and RZ/T2N could fall back to renesas,r9a09g077-rsci instead of adding standalone match and earlycon entries. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261205-t2n_serial_bindings-v1-0-7d98125dce02@bp.renesas.com?part=2 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-05 17:12 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-12-05 16:56 [PATCH 0/2] Add RSCI support for RZ/T2N Biju Das 2026-12-05 16:56 ` [PATCH 1/2] dt-bindings: serial: renesas,rsci: Document RZ/T2N support Biju Das 2026-12-05 17:10 ` sashiko-bot 2026-12-05 16:56 ` [PATCH 2/2] serial: sh-sci: Add support for RZ/T2N RSCI Biju Das 2026-12-05 17:12 ` sashiko-bot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox