Devicetree
 help / color / mirror / Atom feed
* [PATCH v5 00/17] Add RTC support for Renesas RZ/T2H and RZ/N2H SoCs
@ 2026-08-21 13:55 Prabhakar
  2026-08-21 13:55 ` [PATCH v5 01/17] dt-bindings: rtc: renesas,rzn1-rtc: Add RZ/T2H and RZ/N2H support Prabhakar
                   ` (16 more replies)
  0 siblings, 17 replies; 45+ messages in thread
From: Prabhakar @ 2026-08-21 13:55 UTC (permalink / raw)
  To: Alexandre Belloni, Miquel Raynal, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Magnus Damm, Wolfram Sang
  Cc: linux-rtc, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Biju Das, Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi all,

This series adds support for the RTC IP found on the Renesas RZ/T2H and
RZ/N2H SoCs.

The RTC block is closely related to the RZ/N1 implementation and can
reuse the existing driver infrastructure when operating in SCMP mode,
which is required on these SoCs due to their 195.3 kHz RTC input clock.

While the RZ/T2H and RZ/N2H variants do not implement the RTCA0SUBU
register present on RZ/N1, this register is not accessed by the driver
in SCMP mode, allowing support to be added with minimal changes.

The RZ/T2H RTC variant also supports a 1 Hz output signal on the
RTCAT1HZ pin, controlled by the RTCA0CTL1[RTCA01HZE] bit. This bit is
marked as reserved in the RZ/N1 hardware manual, making RZ/T2H a
distinct RTC variant despite its overall compatibility with the RZ/N1
implementation.

Patches have been rebased on top of next-20260820.

v4->v5:
- Collected Reviewed-by and Tested-by tags from Wolfram
- Added Suggested-by tag from Wolfram.
- Added a new patch to disable interrupts when arming a new alarm
- Added a new patch to handle unset alarm weekday in rzn1_rtc_read_alarm()
- Shuffled the pm_runtime_put_sync() patch to be applied before the patch
  that replaces the .remove() callback with devm_add_action_or_reset()
- Renamed rzn1_data to rzn1_rtc_rzn1_data
- Added a print message to indicate that SUBU mode is not supported
  on the variant.
- Added a comment to indicate that the xtal clock is NULL when SUBU
  mode is not supported.
- Renamed rzt2h_data to rzn1_rtc_rzt2h_data


v3->v4:
- Added Reviewed-by tags from Wolfram.
- Made use of tm->tm_wday directly instead of recalculating the weekday
  from the day-of-month.
- Updated commit message in patch #3
- Shortened the comment describing the calculation of RTC_PCLK.
- Updated usleep_range() value to use 2 * rtc->sync_time.
- Added new patch to gate SUBU register access based on OF match data.
- Added new patch to make use of pm_runtime_put_sync() in rzn1_rtc_disable_hardware().
- Added new patch to drop trailing comma from OF match table sentinel.
- Added OF rzt2h_data for OF data
- Updated commit message for patch #15

v2->v3:
- Added new patch to fix weekday underflow when alarm crosses month
  boundary.
- Make use of devm_add_action_or_reset() to simplify driver teardown
  and remove the .remove() callback.

v1->v2:
- Dropped wakeup capability support patch.
- Dropped header sort patch as it was already fixed upstream.
- Updated commit message to drop reference about RTCA0TCR register.
- Added Acked-by and Reviewed-by tags.
- Updated Kconfig help text to keep it generic and not specific to
  RZ/N1 SoCs.
- Initialized rate variable to 32768 to avoid timeout_us of 0.
- Made use of RZN1_RTC_SUBU_RTCA0FX mask for SUBU register access
  instead of 0x3F.

v1: https://lore.kernel.org/all/20260615154805.1619693-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar

Lad Prabhakar (17):
  dt-bindings: rtc: renesas,rzn1-rtc: Add RZ/T2H and RZ/N2H support
  rtc: rzn1: Handle EPROBE_DEFER for optional pps interrupt
  rtc: rzn1: Fix weekday underflow when alarm crosses month boundary
  rtc: rzn1: Handle unset alarm weekday in rzn1_rtc_read_alarm
  rtc: rzn1: Fix alarm range check truncation on 32-bit systems
  rtc: rzn1: Disable alarm interrupt before reprogramming alarm
    registers
  rtc: rzn1: Fix malformed MODULE_AUTHOR string
  rtc: Kconfig: Broaden RTC_DRV_RZN1 dependency to ARCH_RENESAS
  rtc: rzn1: Use pm_runtime_put_sync()
  rtc: rzn1: Replace remove callback with devm_add_action_or_reset()
  rtc: rzn1: Dynamically calculate synchronization delay based on clock
    rate
  rtc: rzn1: Use temporary variable for struct device
  rtc: rzn1: Consistently use dev_err_probe()
  rtc: rzn1: use FIELD_PREP/FIELD_GET and GENMASK for register access
  rtc: rzn1: Add OF match data to gate SUBU register access
  rtc: rzn1: Drop trailing comma from OF match table sentinel
  rtc: rzn1: Add support for Renesas RZ/T2H and RZ/N2H SoCs

 .../bindings/rtc/renesas,rzn1-rtc.yaml        |  35 +++-
 drivers/rtc/Kconfig                           |   5 +-
 drivers/rtc/rtc-rzn1.c                        | 197 +++++++++++-------
 3 files changed, 147 insertions(+), 90 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2026-08-21 16:41 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 13:55 [PATCH v5 00/17] Add RTC support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-08-21 13:55 ` [PATCH v5 01/17] dt-bindings: rtc: renesas,rzn1-rtc: Add RZ/T2H and RZ/N2H support Prabhakar
2026-08-21 14:05   ` sashiko-bot
2026-08-21 15:03     ` Wolfram Sang
2026-08-21 13:55 ` [PATCH v5 02/17] rtc: rzn1: Handle EPROBE_DEFER for optional pps interrupt Prabhakar
2026-08-21 14:07   ` sashiko-bot
2026-08-21 13:55 ` [PATCH v5 03/17] rtc: rzn1: Fix weekday underflow when alarm crosses month boundary Prabhakar
2026-08-21 14:08   ` sashiko-bot
2026-08-21 13:55 ` [PATCH v5 04/17] rtc: rzn1: Handle unset alarm weekday in rzn1_rtc_read_alarm Prabhakar
2026-08-21 14:10   ` sashiko-bot
2026-08-21 15:08     ` Wolfram Sang
2026-08-21 15:08   ` Wolfram Sang
2026-08-21 13:55 ` [PATCH v5 05/17] rtc: rzn1: Fix alarm range check truncation on 32-bit systems Prabhakar
2026-08-21 14:06   ` sashiko-bot
2026-08-21 13:55 ` [PATCH v5 06/17] rtc: rzn1: Disable alarm interrupt before reprogramming alarm registers Prabhakar
2026-08-21 14:10   ` sashiko-bot
2026-08-21 15:10     ` Wolfram Sang
2026-08-21 15:11   ` Wolfram Sang
2026-08-21 13:55 ` [PATCH v5 07/17] rtc: rzn1: Fix malformed MODULE_AUTHOR string Prabhakar
2026-08-21 14:01   ` sashiko-bot
2026-08-21 13:55 ` [PATCH v5 08/17] rtc: Kconfig: Broaden RTC_DRV_RZN1 dependency to ARCH_RENESAS Prabhakar
2026-08-21 14:02   ` sashiko-bot
2026-08-21 13:56 ` [PATCH v5 09/17] rtc: rzn1: Use pm_runtime_put_sync() Prabhakar
2026-08-21 14:08   ` sashiko-bot
2026-08-21 15:14   ` Wolfram Sang
2026-08-21 13:56 ` [PATCH v5 10/17] rtc: rzn1: Replace remove callback with devm_add_action_or_reset() Prabhakar
2026-08-21 14:07   ` sashiko-bot
2026-08-21 15:15     ` Wolfram Sang
2026-08-21 13:56 ` [PATCH v5 11/17] rtc: rzn1: Dynamically calculate synchronization delay based on clock rate Prabhakar
2026-08-21 14:05   ` sashiko-bot
2026-08-21 13:56 ` [PATCH v5 12/17] rtc: rzn1: Use temporary variable for struct device Prabhakar
2026-08-21 14:05   ` sashiko-bot
2026-08-21 13:56 ` [PATCH v5 13/17] rtc: rzn1: Consistently use dev_err_probe() Prabhakar
2026-08-21 14:03   ` sashiko-bot
2026-08-21 13:56 ` [PATCH v5 14/17] rtc: rzn1: use FIELD_PREP/FIELD_GET and GENMASK for register access Prabhakar
2026-08-21 14:06   ` sashiko-bot
2026-08-21 13:56 ` [PATCH v5 15/17] rtc: rzn1: Add OF match data to gate SUBU " Prabhakar
2026-08-21 14:08   ` sashiko-bot
2026-08-21 15:16   ` Wolfram Sang
2026-08-21 16:40   ` Alexandre Belloni
2026-08-21 13:56 ` [PATCH v5 16/17] rtc: rzn1: Drop trailing comma from OF match table sentinel Prabhakar
2026-08-21 14:07   ` sashiko-bot
2026-08-21 15:18     ` Wolfram Sang
2026-08-21 13:56 ` [PATCH v5 17/17] rtc: rzn1: Add support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-08-21 14:09   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox