[PATCH v2 4/6] rtc: renesas-rtca3: Add support for RZ/V2H SoC

Ovidiu Panait
2025-10-21T08:07:33Z

Add a new compatible string for the Renesas RZ/V2H RTC along with the SoC
specific OF data, to account for the different maximum periodic interrupt
frequency (128Hz).

Also, switch from devm_reset_control_get_shared() to
devm_reset_control_array_get_shared() when retrieving resets.
The RZ/V2H SoC requires two resets for the RTC block instead of one,
so this will allow to handle multiple resets without additional changes.

Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
---
v2 changes: none

drivers/rtc/rtc-renesas-rtca3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-renesas-rtca3.c b/drivers/rtc/rtc-renesas-rtca3.c
index 90dda04fad33..96f5d3734d93 100644
--- a/drivers/rtc/rtc-renesas-rtca3.c
+++ b/drivers/rtc/rtc-renesas-rtca3.c
@@ -738,7 +738,7 @@ static int rtca3_probe(struct platform_device *pdev)
if (ret)
return ret;

- priv->rstc = devm_reset_control_get_shared(dev, NULL);
+ priv->rstc = devm_reset_control_array_get_shared(dev);
if (IS_ERR(priv->rstc))
return PTR_ERR(priv->rstc);

@@ -887,11 +887,16 @@ static int rtca3_resume(struct device *dev)

static DEFINE_SIMPLE_DEV_PM_OPS(rtca3_pm_ops, rtca3_suspend, rtca3_resume);

+static const struct rtca3_of_data rtca3_rzv2h_of_data = {
+ .max_periodic_irq_freq = 128,
+};
+
static const struct rtca3_of_data rtca3_of_data = {
.max_periodic_irq_freq = 256,
};

static const struct of_device_id rtca3_of_match[] = {
+ { .compatible = "renesas,r9a09g057-rtca3", .data = &rtca3_rzv2h_of_data },
{ .compatible = "renesas,rz-rtca3", .data = &rtca3_of_data },
{ /* sentinel */ }
};
--
2.51.0