Linux Watchdog driver development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
	wsa+renesas@sang-engineering.com, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v6 8/8] arm64: dts: renesas: r9a09g087: Use CPG/MSSR syscon for WDTDCR access
Date: Wed, 23 Sep 2026 10:53:48 +0000	[thread overview]
Message-ID: <20260923105348.68A761F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923104054.3324830-9-prabhakar.mahadev-lad.rj@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: syscon regmap lookup fails for WDT due to non-syscon CPG node
--

commit 965ed970b62c83d1a303f6e2583dfa7e66ebde5d
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

arm64: dts: renesas: r9a09g087: Use CPG/MSSR syscon for WDTDCR access

This commit replaces direct register mappings for watchdog timers
wdt0-wdt5 with a syscon phandle pointing to the CPG/MSSR block. The WDTDCR
registers are noted to reside in the second register region of the CPG.

> diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
> index e8d4f76949ccb..40ffe56a40353 100644
> --- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi

[ ... ]

> @@ -327,61 +327,61 @@ channel1 {
>  
>  		wdt0: watchdog@80082000 {
>  			compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
> -			reg = <0 0x80082000 0 0x400>,
> -			      <0 0x81295100 0 0x04>;
> +			reg = <0 0x80082000 0 0x400>;
>  			clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKL>;
>  			clock-names = "pclk";
>  			power-domains = <&cpg>;
> +			renesas,sysc = <&cpg 0>;

[Severity: High]
Does this property correctly resolve the syscon regmap?

Looking at the driver implementation, it appears to use
syscon_regmap_lookup_by_phandle_args() on the cpg node. However, the cpg
node lacks the "syscon" compatible string, and the CPG driver does not
manually register a regmap via of_syscon_register_regmap(). Will this cause
the lookup to perpetually fail with -EPROBE_DEFER and leave the watchdog
unavailable?

Additionally, if the cpg node were defined as a standard syscon, it would
only map its first reg region (size 0x10000). The watchdog driver generates
an offset of 0x15100. Writing to this offset would exceed the regmap's size
limit and cause an out-of-bounds -EIO failure.

Applying the offset to the first region also entirely misses the physically
correct second region address of 0x81295100.

Are there additional patches that update the CPG node or driver to handle
these secondary regions and avoid the regmap lookup failures?

>  			status = "disabled";
>  		};

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923104054.3324830-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=8

      reply	other threads:[~2026-09-23 10:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 10:40 [PATCH v6 0/8] Add syscon support for Renesas WDT driver Prabhakar
2026-09-23 10:40 ` [PATCH v6 1/8] watchdog: rzv2h: Use pm_runtime_put_sync() Prabhakar
2026-09-23 10:40 ` [PATCH v6 2/8] watchdog: rzv2h: Drop enabling clocks in the restart handler Prabhakar
2026-09-23 10:40 ` [PATCH v6 3/8] watchdog: rzv2h: Drop WDTRCR_RSTIRQS define Prabhakar
2026-09-23 10:40 ` [PATCH v6 4/8] watchdog: rzv2h: Propagate WDTDCR access errors Prabhakar
2026-09-23 10:48   ` sashiko-bot
2026-09-23 21:17   ` Guenter Roeck
2026-09-24 12:59     ` Lad, Prabhakar
2026-09-23 21:19   ` Guenter Roeck
2026-09-23 10:40 ` [PATCH v6 5/8] watchdog: rzv2h: Convert WDTDCR handling to regmap Prabhakar
2026-09-23 10:40 ` [PATCH v6 6/8] watchdog: rzv2h: Add syscon support for WDTDCR Prabhakar
2026-09-23 10:52   ` sashiko-bot
2026-09-24 13:44     ` Lad, Prabhakar
2026-09-24 21:48       ` Guenter Roeck
2026-09-25  4:13         ` Biju Das
2026-09-25  4:50           ` Guenter Roeck
2026-09-25  5:11             ` Biju Das
2026-09-25  9:06               ` Lad, Prabhakar
2026-09-25  9:09                 ` Geert Uytterhoeven
2026-09-25  9:20                   ` Lad, Prabhakar
2026-09-25 12:24                     ` Lad, Prabhakar
2026-09-25 13:41                       ` Guenter Roeck
2026-09-23 10:40 ` [PATCH v6 7/8] arm64: dts: renesas: r9a09g077: Use CPG/MSSR syscon for WDTDCR access Prabhakar
2026-09-23 11:05   ` sashiko-bot
2026-09-23 10:40 ` [PATCH v6 8/8] arm64: dts: renesas: r9a09g087: " Prabhakar
2026-09-23 10:53   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260923105348.68A761F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox