[PATCH v9 0/4] watchdog: rzv2h_wdt: Access WDTDCR through CPG/MSSR syscon
From: Prabhakar
Date: Wed Nov 11 2026 - 06:07:37 EST
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Hi all,
On RZ/T2H and RZ/N2H, the watchdog debug control registers (WDTDCR) are
located in the CPG/MSSR SYS block rather than the watchdog register space.
This series exposes those registers through the CPG/MSSR syscon and updates
the watchdog driver and device trees to use that interface.
Normal start and stop operations use the syscon regmap. Since the watchdog
restart handler runs in atomic context, the series also adds a lockless CPG
helper for restarting the counter. Existing device trees using the separate
WDTDCR register region remain supported.
The device trees for R9A09G077 and R9A09G087 are updated to identify each
watchdog's WDTDCR through a `renesas,sysc` phandle.
v8->v9:
- Rebased on -next due to devm_kzalloc_obj change
- Added RB tag from Guenter for patch #2
- Dropped WDT driver patches as they are now queued in WDT branch
v7->v8:
- Dropped patch "watchdog: rzv2h: Drop enabling clocks in the
restart handler" addressing Sashiko's comments
v6->v7:
- Added a new patch to introduce rzt2h_cpg_wdtdcr_count_start() function
- Added new patch to drop pm_runtime_resume_and_get() &
pm_runtime_put_sync() calls while accessing the WDTDCR register.
- Dropped propagating WDTDCR access errors.
- Dropped converting WDTDCR handling to regmap as this would require
resource address comparison to get WDT index to call
rzt2h_cpg_wdtdcr_count_start().
- Made use of rzt2h_cpg_wdtdcr_count_start() in restart handler
- Added if regmap is available, use it for WDTDCR access
- Updated commit message
v5->v6:
- Used pm_runtime_put_sync() in rzv2h_wdt_stop() function.
- rebased on top of next-20260922
v4->v5:
- patch #1 is new addressing Sashiko's comments to avoid potential deadlock
- patch #4 is new addressing Sashiko's comments
- Dropped checking rzt2h_wdt_wdtdcr_count_start() return value in
restart path.
- Handled the regmap locking in the driver and introduced nolock
version to be used in the restart path.
- Added review-by tag.
[0] https://lore.kernel.org/all/20260817192540.423994-1-prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx/
[1] https://lore.kernel.org/all/20260814191415.2110732-1-prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx/
Cheers,
Prabhakar
Lad Prabhakar (4):
clk: renesas: r9a09g077: Add helper to start WDTDCR counter
watchdog: rzv2h_wdt: Add syscon based WDTDCR access
arm64: dts: renesas: r9a09g077: Use CPG/MSSR syscon for WDTDCR access
arm64: dts: renesas: r9a09g087: Use CPG/MSSR syscon for WDTDCR access
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 24 +++----
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 24 +++----
drivers/clk/renesas/r9a09g077-cpg.c | 35 ++++++++--
drivers/watchdog/rzv2h_wdt.c | 77 ++++++++++++++++++++--
include/linux/clk/renesas.h | 6 ++
5 files changed, 130 insertions(+), 36 deletions(-)
--
2.56.1