* [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC
@ 2026-09-17 9:13 Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 01/10] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path Lad Prabhakar
` (10 more replies)
0 siblings, 11 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
Hi All,
This patch series aims to add RTC support to RZ/V2N SoC. The RTC IP on
RZ/V2N SoC is identical to one found on the RZ/V2H(P) SoC for which
patches have been already backported.
All the patches have been cherry-picked from upstream kernel.
Cheers,
Prabhakar
Lad Prabhakar (6):
rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup
error path
rtc: renesas-rtca3: Check RADJ poll result during initial setup
rtc: renesas-rtca3: Fix incorrect error message for reset assert
rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
rtc: renesas-rtca3: Factor out year decoding helper
arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC
Ovidiu Panait (4):
dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
clk: renesas: r9a09g056: Add clock and reset entries for RTC
arm64: dts: renesas: r9a09g056: Add RTC node
arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC
.../bindings/rtc/renesas,rz-rtca3.yaml | 5 +++-
arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 15 +++++++++++
.../dts/renesas/r9a09g056n48-rzv2n-evk.dts | 5 ++++
drivers/clk/renesas/r9a09g056-cpg.c | 4 +++
drivers/rtc/rtc-renesas-rtca3.c | 26 +++++++++++--------
5 files changed, 43 insertions(+), 12 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 01/10] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 02/10] rtc: renesas-rtca3: Check RADJ poll result during initial setup Lad Prabhakar
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 7e342d87aa8e6b831cf6d21ca41b1f7e032d0fcf upstream.
In rtca3_set_alarm(), the setup_failed path attempts to disable the
Periodic Interrupt Enable (PIE) bit and wait until it is cleared.
However, the polling condition passed to readb_poll_timeout_atomic()
uses an incorrect expression:
!(tmp & ~RTCA3_RCR1_PIE)
As ~RTCA3_RCR1_PIE evaluates to a mask of all bits except PIE, the
condition effectively waits for all non-PIE bits to become zero, which
is unrelated to the intended operation and is unlikely to ever be true.
This causes the poll to time out unnecessarily.
Fix the condition to check for the PIE bit itself being cleared:
!(tmp & RTCA3_RCR1_PIE)
This correctly waits until PIE is deasserted after being cleared.
Fixes: d4488377609e3 ("rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC")
Cc: stable@vger.kernel.org
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://patch.msgid.link/20260602192559.1791344-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/rtc/rtc-renesas-rtca3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index 3c677790d8fab..0f9d88c1cdee8 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -455,7 +455,7 @@ static int rtca3_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
* specified timeout for setup.
*/
writeb(rcr1 & ~RTCA3_RCR1_PIE, priv->base + RTCA3_RCR1);
- readb_poll_timeout_atomic(priv->base + RTCA3_RCR1, tmp, !(tmp & ~RTCA3_RCR1_PIE),
+ readb_poll_timeout_atomic(priv->base + RTCA3_RCR1, tmp, !(tmp & RTCA3_RCR1_PIE),
10, RTCA3_DEFAULT_TIMEOUT_US);
atomic_set(&priv->alrm_sstep, RTCA3_ALRM_SSTEP_DONE);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 02/10] rtc: renesas-rtca3: Check RADJ poll result during initial setup
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 01/10] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 03/10] rtc: renesas-rtca3: Fix incorrect error message for reset assert Lad Prabhakar
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit fafb016d081200c7652e84202f8ba5951e659a53 upstream.
In rtca3_initial_setup(), the driver clears the RTCA3_RADJ register and
waits for it to reach zero using readb_poll_timeout(). Check the return
value of readb_poll_timeout() and propagate the error if the poll fails.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://patch.msgid.link/20260602192559.1791344-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/rtc/rtc-renesas-rtca3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index 0f9d88c1cdee8..cbd040272aa91 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -634,6 +634,8 @@ static int rtca3_initial_setup(struct clk *clk, struct rtca3_priv *priv)
writeb(0, priv->base + RTCA3_RADJ);
ret = readb_poll_timeout(priv->base + RTCA3_RADJ, tmp, !tmp, 10,
RTCA3_DEFAULT_TIMEOUT_US);
+ if (ret)
+ return ret;
/* Start the RTC and enable automatic time error adjustment. */
mask = RTCA3_RCR2_START | RTCA3_RCR2_AADJE;
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 03/10] rtc: renesas-rtca3: Fix incorrect error message for reset assert
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 01/10] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 02/10] rtc: renesas-rtca3: Check RADJ poll result during initial setup Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 04/10] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation Lad Prabhakar
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 09939630aad95fc3dc4cc2d94a5a96d7c4d6642f upstream.
Update the message to "assert reset" to accurately reflect the
operation being performed.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://patch.msgid.link/20260602192559.1791344-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/rtc/rtc-renesas-rtca3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index cbd040272aa91..c1e07eaa4c4fc 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -702,7 +702,7 @@ static void rtca3_action(void *data)
ret = reset_control_assert(priv->rstc);
if (ret)
- dev_err(dev, "Failed to de-assert reset!");
+ dev_err(dev, "Failed to assert reset!");
ret = pm_runtime_put_sync(dev);
if (ret < 0)
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 04/10] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (2 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 03/10] rtc: renesas-rtca3: Fix incorrect error message for reset assert Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 05/10] rtc: renesas-rtca3: Factor out year decoding helper Lad Prabhakar
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 9fb12656a7a5473b1ce46e27f78e92e5e8df7c58 upstream.
Correct a typo in the kernel-doc comment for struct
rtca3_ppb_per_cycle by fixing "adjutment" to "adjustment".
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://patch.msgid.link/20260602192559.1791344-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/rtc/rtc-renesas-rtca3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index c1e07eaa4c4fc..9ce28af388c96 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -103,7 +103,7 @@ enum rtca3_alrm_set_step {
/**
* struct rtca3_ppb_per_cycle - PPB per cycle
- * @ten_sec: PPB per cycle in 10 seconds adjutment mode
+ * @ten_sec: PPB per cycle in 10 seconds adjustment mode
* @sixty_sec: PPB per cycle in 60 seconds adjustment mode
*/
struct rtca3_ppb_per_cycle {
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 05/10] rtc: renesas-rtca3: Factor out year decoding helper
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (3 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 04/10] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 06/10] dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support Lad Prabhakar
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 2098bb8ac5f5a66b1a0e02512ae11b6208936c92 upstream.
The logic to decode the year value from the hardware registers is
duplicated in both rtca3_read_time() and rtca3_read_alarm().
Introduce a helper rtca3_decode_year() to centralize this conversion.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
Link: https://patch.msgid.link/20260602192559.1791344-6-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/rtc/rtc-renesas-rtca3.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index 9ce28af388c96..66da5451eeba0 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -228,12 +228,19 @@ static void rtca3_prepare_cntalrm_regs_for_read(struct rtca3_priv *priv, bool cn
}
}
+static u32 rtca3_decode_year(u8 mask, u16 year)
+{
+ u8 y = FIELD_GET(mask, year);
+ u32 century = bcd2bin((y == 0x99) ? 0x19 : 0x20);
+
+ return (century * 100 + bcd2bin(y)) - 1900;
+}
+
static int rtca3_read_time(struct device *dev, struct rtc_time *tm)
{
struct rtca3_priv *priv = dev_get_drvdata(dev);
u8 sec, min, hour, wday, mday, month, tmp;
u8 trials = 0;
- u32 year100;
u16 year;
guard(spinlock_irqsave)(&priv->lock);
@@ -274,9 +281,7 @@ static int rtca3_read_time(struct device *dev, struct rtc_time *tm)
tm->tm_wday = bcd2bin(FIELD_GET(RTCA3_RWKCNT_WK, wday));
tm->tm_mday = bcd2bin(FIELD_GET(RTCA3_RDAYCNT_DAY, mday));
tm->tm_mon = bcd2bin(FIELD_GET(RTCA3_RMONCNT_MONTH, month)) - 1;
- year = FIELD_GET(RTCA3_RYRCNT_YEAR, year);
- year100 = bcd2bin((year == 0x99) ? 0x19 : 0x20);
- tm->tm_year = (year100 * 100 + bcd2bin(year)) - 1900;
+ tm->tm_year = rtca3_decode_year(RTCA3_RYRCNT_YEAR, year);
return 0;
}
@@ -354,7 +359,6 @@ static int rtca3_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
struct rtca3_priv *priv = dev_get_drvdata(dev);
u8 sec, min, hour, wday, mday, month;
struct rtc_time *tm = &wkalrm->time;
- u32 year100;
u16 year;
guard(spinlock_irqsave)(&priv->lock);
@@ -373,9 +377,7 @@ static int rtca3_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
tm->tm_wday = bcd2bin(FIELD_GET(RTCA3_RWKAR_DAYW, wday));
tm->tm_mday = bcd2bin(FIELD_GET(RTCA3_RDAYAR_DATE, mday));
tm->tm_mon = bcd2bin(FIELD_GET(RTCA3_RMONAR_MON, month)) - 1;
- year = FIELD_GET(RTCA3_RYRAR_YR, year);
- year100 = bcd2bin((year == 0x99) ? 0x19 : 0x20);
- tm->tm_year = (year100 * 100 + bcd2bin(year)) - 1900;
+ tm->tm_year = rtca3_decode_year(RTCA3_RYRAR_YR, year);
wkalrm->enabled = !!(readb(priv->base + RTCA3_RCR1) & RTCA3_RCR1_AIE);
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 06/10] dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (4 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 05/10] rtc: renesas-rtca3: Factor out year decoding helper Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 07/10] clk: renesas: r9a09g056: Add clock and reset entries for RTC Lad Prabhakar
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
commit f3ac75cfacc66f48523e730646dbbc2f19844799 upstream.
The Renesas RZ/V2N (r9a09g056) RTC is identical to the RZ/V2H
(r9a09g057) variant. Add the compatible string for RZ/V2N and
extend the existing RZ/V2H reset configuration to cover both
variants.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260125192706.27099-4-ovidiu.panait.rb@renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml b/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml
index ccb1638c35b9b..988bb9fa81434 100644
--- a/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml
+++ b/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml
@@ -14,6 +14,7 @@ properties:
items:
- enum:
- renesas,r9a08g045-rtca3 # RZ/G3S
+ - renesas,r9a09g056-rtca3 # RZ/V2N
- renesas,r9a09g057-rtca3 # RZ/V2H
- const: renesas,rz-rtca3
@@ -82,7 +83,9 @@ allOf:
properties:
compatible:
contains:
- const: renesas,r9a09g057-rtca3
+ enum:
+ - renesas,r9a09g056-rtca3
+ - renesas,r9a09g057-rtca3
then:
properties:
resets:
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 07/10] clk: renesas: r9a09g056: Add clock and reset entries for RTC
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (5 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 06/10] dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 08/10] arm64: dts: renesas: r9a09g056: Add RTC node Lad Prabhakar
` (3 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
commit c8d5972a25408b1daf73653ccd5207fdfc80c964 upstream.
Add module clock and reset entries for the RTC module on the Renesas
RZ/V2N (R9A09G056) SoC.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260125192706.27099-3-ovidiu.panait.rb@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[PL: manually applied the changes]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/clk/renesas/r9a09g056-cpg.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/renesas/r9a09g056-cpg.c b/drivers/clk/renesas/r9a09g056-cpg.c
index 197f3392c6ed2..bbaaaf3f9894a 100644
--- a/drivers/clk/renesas/r9a09g056-cpg.c
+++ b/drivers/clk/renesas/r9a09g056-cpg.c
@@ -268,6 +268,8 @@ static const struct rzv2h_mod_clk r9a09g056_mod_clks[] __initconst = {
BUS_MSTOP(5, BIT(13))),
DEF_MOD("wdt_3_clk_loco", CLK_QEXTAL, 5, 2, 2, 18,
BUS_MSTOP(5, BIT(13))),
+ DEF_MOD("rtc_0_clk_rtc", CLK_PLLCM33_DIV16, 5, 3, 2, 19,
+ BUS_MSTOP(3, BIT(11) | BIT(12))),
DEF_MOD("rspi_0_pclk", CLK_PLLCLN_DIV8, 5, 4, 2, 20,
BUS_MSTOP(11, BIT(0))),
DEF_MOD("rspi_0_pclk_sfr", CLK_PLLCLN_DIV8, 5, 5, 2, 21,
@@ -430,6 +432,8 @@ static const struct rzv2h_reset r9a09g056_resets[] __initconst = {
DEF_RST(7, 6, 3, 7), /* WDT_1_RESET */
DEF_RST(7, 7, 3, 8), /* WDT_2_RESET */
DEF_RST(7, 8, 3, 9), /* WDT_3_RESET */
+ DEF_RST(7, 9, 3, 10), /* RTC_0_RST_RTC */
+ DEF_RST(7, 10, 3, 11), /* RTC_0_RST_RTC_V */
DEF_RST(7, 11, 3, 12), /* RSPI_0_PRESETN */
DEF_RST(7, 12, 3, 13), /* RSPI_0_TRESETN */
DEF_RST(7, 13, 3, 14), /* RSPI_1_PRESETN */
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 08/10] arm64: dts: renesas: r9a09g056: Add RTC node
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (6 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 07/10] clk: renesas: r9a09g056: Add clock and reset entries for RTC Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 09/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC Lad Prabhakar
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
commit eb90ae0b39a15c380e640efc0c927b012d8b28fb upstream.
Add RTC node to Renesas RZ/V2N ("R9A09G056") SoC DTSI.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260125192706.27099-5-ovidiu.panait.rb@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g056.dtsi b/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
index 9a244145c60d9..01a5980b9260f 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g056.dtsi
@@ -634,6 +634,21 @@ wdt3: watchdog@13000400 {
status = "disabled";
};
+ rtc: rtc@11c00800 {
+ compatible = "renesas,r9a09g056-rtca3", "renesas,rz-rtca3";
+ reg = <0 0x11c00800 0 0x400>;
+ interrupts = <GIC_SPI 524 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 525 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 526 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "alarm", "period", "carry";
+ clocks = <&cpg CPG_MOD 0x53>, <&rtxin_clk>;
+ clock-names = "bus", "counter";
+ power-domains = <&cpg>;
+ resets = <&cpg 0x79>, <&cpg 0x7a>;
+ reset-names = "rtc", "rtest";
+ status = "disabled";
+ };
+
scif: serial@11c01400 {
compatible = "renesas,scif-r9a09g056",
"renesas,scif-r9a09g057";
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 09/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (7 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 08/10] arm64: dts: renesas: r9a09g056: Add RTC node Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 10/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC Lad Prabhakar
2026-09-25 8:24 ` [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC nobuhiro.iwamatsu.x90
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
commit b901f2f03ed72ccef7a46619550546e2471d581f upstream.
Enable RTC.
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260125192706.27099-6-ovidiu.panait.rb@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
index 38c9a0489f851..914960100e659 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
@@ -454,6 +454,10 @@ &qextal_clk {
clock-frequency = <24000000>;
};
+&rtc {
+ status = "okay";
+};
+
&rtxin_clk {
clock-frequency = <32768>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6.1.y-cip 10/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (8 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 09/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC Lad Prabhakar
@ 2026-09-17 9:13 ` Lad Prabhakar
2026-09-25 8:24 ` [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC nobuhiro.iwamatsu.x90
10 siblings, 0 replies; 14+ messages in thread
From: Lad Prabhakar @ 2026-09-17 9:13 UTC (permalink / raw)
To: cip-dev, Nobuhiro Iwamatsu, Pavel Machek; +Cc: Biju Das
commit 8fdfbe0f114fd406a1e98d185a8f9e1d193a6526 upstream.
The RZ/V2N SoC provides an internal RTC, which is enabled in the DT.
The RZ/V2N EVK board also includes an external RTC in the RAA215300
PMIC.
Add an "rtc0" alias pointing to the on-SoC RTC node to ensure a stable
device numbering.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260506155804.3984418-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
index 914960100e659..29364343048cf 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
+++ b/arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts
@@ -26,6 +26,7 @@ aliases {
i2c7 = &i2c7;
i2c8 = &i2c8;
mmc1 = &sdhi1;
+ rtc0 = &rtc;
serial0 = &scif;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* RE: [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
` (9 preceding siblings ...)
2026-09-17 9:13 ` [PATCH 6.1.y-cip 10/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC Lad Prabhakar
@ 2026-09-25 8:24 ` nobuhiro.iwamatsu.x90
2026-09-25 12:33 ` [cip-dev] " Pavel Machek
10 siblings, 1 reply; 14+ messages in thread
From: nobuhiro.iwamatsu.x90 @ 2026-09-25 8:24 UTC (permalink / raw)
To: prabhakar.mahadev-lad.rj, cip-dev, pavel; +Cc: biju.das.jz
Hi all,
> -----Original Message-----
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Sent: Thursday, September 17, 2026 6:14 PM
> To: cip-dev@lists.cip-project.org; iwamatsu nobuhiro(岩松 信洋 □DITC○
> CPT) <nobuhiro.iwamatsu.x90@mail.toshiba>; Pavel Machek
> <pavel@nabladev.com>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>
> Subject: [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC
>
> Hi All,
>
> This patch series aims to add RTC support to RZ/V2N SoC. The RTC IP on
> RZ/V2N SoC is identical to one found on the RZ/V2H(P) SoC for which patches
> have been already backported.
>
> All the patches have been cherry-picked from upstream kernel.
>
> Cheers,
> Prabhakar
>
> Lad Prabhakar (6):
> rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup
> error path
> rtc: renesas-rtca3: Check RADJ poll result during initial setup
> rtc: renesas-rtca3: Fix incorrect error message for reset assert
> rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
> rtc: renesas-rtca3: Factor out year decoding helper
> arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC
>
> Ovidiu Panait (4):
> dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
> clk: renesas: r9a09g056: Add clock and reset entries for RTC
> arm64: dts: renesas: r9a09g056: Add RTC node
> arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC
I reviewed this series, looks good to me.
I can apply this if tests are no issues and there are no other comments.
Test: https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/2881561788
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [cip-dev] [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC
2026-09-25 8:24 ` [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC nobuhiro.iwamatsu.x90
@ 2026-09-25 12:33 ` Pavel Machek
2026-09-28 22:30 ` nobuhiro.iwamatsu.x90
0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2026-09-25 12:33 UTC (permalink / raw)
To: nobuhiro.iwamatsu.x90
Cc: prabhakar.mahadev-lad.rj, cip-dev, pavel, biju.das.jz
[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]
Hi!
> > This patch series aims to add RTC support to RZ/V2N SoC. The RTC IP on
> > RZ/V2N SoC is identical to one found on the RZ/V2H(P) SoC for which patches
> > have been already backported.
> >
> > All the patches have been cherry-picked from upstream kernel.
> >
> > Cheers,
> > Prabhakar
> >
> > Lad Prabhakar (6):
> > rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup
> > error path
> > rtc: renesas-rtca3: Check RADJ poll result during initial setup
> > rtc: renesas-rtca3: Fix incorrect error message for reset assert
> > rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
> > rtc: renesas-rtca3: Factor out year decoding helper
> > arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC
> >
> > Ovidiu Panait (4):
> > dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
> > clk: renesas: r9a09g056: Add clock and reset entries for RTC
> > arm64: dts: renesas: r9a09g056: Add RTC node
> > arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC
>
> I reviewed this series, looks good to me.
> I can apply this if tests are no issues and there are no other comments.
> Test: https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/2881561788
>
> Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Looks good to me, too.
Reviewed-by: Pavel Machek <pavel@nabladev.com>
As you are already running the tests, I'll let you apply the series.
Thank and best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [cip-dev] [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC
2026-09-25 12:33 ` [cip-dev] " Pavel Machek
@ 2026-09-28 22:30 ` nobuhiro.iwamatsu.x90
0 siblings, 0 replies; 14+ messages in thread
From: nobuhiro.iwamatsu.x90 @ 2026-09-28 22:30 UTC (permalink / raw)
To: pavel; +Cc: prabhakar.mahadev-lad.rj, cip-dev, biju.das.jz
Hi all,
> -----Original Message-----
> From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On
> Behalf Of Pavel Machek via lists.cip-project.org
> Sent: Friday, September 25, 2026 9:33 PM
> To: iwamatsu nobuhiro(岩松 信洋 □DITC○CPT)
> <nobuhiro.iwamatsu.x90@mail.toshiba>
> Cc: prabhakar.mahadev-lad.rj@bp.renesas.com; cip-dev@lists.cip-project.org;
> pavel@nabladev.com; biju.das.jz@bp.renesas.com
> Subject: Re: [cip-dev] [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N
> SoC
>
> Hi!
>
> > > This patch series aims to add RTC support to RZ/V2N SoC. The RTC IP
> > > on RZ/V2N SoC is identical to one found on the RZ/V2H(P) SoC for
> > > which patches have been already backported.
> > >
> > > All the patches have been cherry-picked from upstream kernel.
> > >
> > > Cheers,
> > > Prabhakar
> > >
> > > Lad Prabhakar (6):
> > > rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup
> > > error path
> > > rtc: renesas-rtca3: Check RADJ poll result during initial setup
> > > rtc: renesas-rtca3: Fix incorrect error message for reset assert
> > > rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation
> > > rtc: renesas-rtca3: Factor out year decoding helper
> > > arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC
> > > RTC
> > >
> > > Ovidiu Panait (4):
> > > dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
> > > clk: renesas: r9a09g056: Add clock and reset entries for RTC
> > > arm64: dts: renesas: r9a09g056: Add RTC node
> > > arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC
> >
> > I reviewed this series, looks good to me.
> > I can apply this if tests are no issues and there are no other comments.
> > Test:
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/pipelines/288156
> > 1788
> >
> > Reviewed-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
>
> Looks good to me, too.
>
> Reviewed-by: Pavel Machek <pavel@nabladev.com>
>
> As you are already running the tests, I'll let you apply the series.
>
Thank you. I applied with your Reviewed-by tag.
> Thank and best regards,
> Pavel
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-09-28 22:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 9:13 [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 01/10] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 02/10] rtc: renesas-rtca3: Check RADJ poll result during initial setup Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 03/10] rtc: renesas-rtca3: Fix incorrect error message for reset assert Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 04/10] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 05/10] rtc: renesas-rtca3: Factor out year decoding helper Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 06/10] dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 07/10] clk: renesas: r9a09g056: Add clock and reset entries for RTC Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 08/10] arm64: dts: renesas: r9a09g056: Add RTC node Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 09/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RTC Lad Prabhakar
2026-09-17 9:13 ` [PATCH 6.1.y-cip 10/10] arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Add alias for on-SoC RTC Lad Prabhakar
2026-09-25 8:24 ` [PATCH 6.1.y-cip 00/10] Add RTC support to RZ/V2N SoC nobuhiro.iwamatsu.x90
2026-09-25 12:33 ` [cip-dev] " Pavel Machek
2026-09-28 22:30 ` nobuhiro.iwamatsu.x90
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox