Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 5/9] arm64: dts: airoha: en7581: add watchdog node
Date: Mon, 26 Oct 2026 11:11:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-185067@kernel.org> (raw)
In-Reply-To: <20261026095727.31708-6-ansuelsmth@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] arm64: dts: airoha: watchdog reg size 0x38 excludes WDT_RELOAD at 0x38
--

commit 285873958d4bd82b85e9f3812fdf852db2de2884
Author: Christian Marangi <ansuelsmth@gmail.com>

arm64: dts: airoha: en7581: add watchdog node

This commit adds the watchdog device tree node to en7581.dtsi to handle
system stalls and reboots.

> diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
> index 58bd8b318910e..3a4a4fb0eba9b 100644
> --- a/arch/arm64/boot/dts/airoha/en7581.dtsi
> +++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
> @@ -484,6 +484,14 @@ uart1: serial@1fbf0000 {
>  			clock-frequency = <1843200>;
>  		};
>  
> +		watchdog@1fbf0100 {
> +			compatible = "airoha,en7581-wdt";
> +			reg = <0x0 0x1fbf0100 0x0 0x38>;

[Severity: Medium]
Should the reg size in watchdog@1fbf0100 be 0x3c instead of 0x38?

In drivers/watchdog/airoha_wdt.c, WDT_RELOAD is defined at offset 0x38 and is
accessed as a 32-bit register in airoha_wdt_ping() when pinging or resuming
the watchdog:

#define WDT_RELOAD			0x38
#define   WDT_RLD			BIT(0)
...
static int airoha_wdt_ping(struct watchdog_device *wdd)
{
	struct airoha_wdt_desc *airoha_wdt = watchdog_get_drvdata(wdd);
	u32 val;

	val = readl(airoha_wdt->base + WDT_RELOAD);
	val |= WDT_RLD;
	writel(val, airoha_wdt->base + WDT_RELOAD);

	return 0;
}

With a size of 0x38, the resource mapped via devm_platform_ioremap_resource()
in airoha_wdt_probe() only covers offsets 0x00 through 0x37, leaving the
4-byte WDT_RELOAD register at 0x38..0x3b outside the declared MMIO resource
region (and the binding example in
Documentation/devicetree/bindings/watchdog/airoha,en7581-wdt.yaml also uses
0x3c).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261026095727.31708-1-ansuelsmth@gmail.com?part=5

  reply	other threads:[~2026-10-26 11:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  9:57 [PATCH 0/9] arm64: dts: airoha: en7581: cumulative nodes addition Christian Marangi
2026-10-26  9:57 ` [PATCH 1/9] arm64: dts: airoha: en7581: reorder nodes following incremental regs Christian Marangi
2026-10-26  9:57 ` [PATCH 2/9] arm64: dts: airoha: en7581: add CPU OPP and scaling nodes Christian Marangi
2026-10-26 10:51   ` sashiko-bot
2026-10-26  9:57 ` [PATCH 3/9] arm64: dts: airoha: en7581: add Chip-SCU accessor node Christian Marangi
2026-10-26  9:57 ` [PATCH 4/9] arm64: dts: airoha: en7581: add thermal sensor nodes Christian Marangi
2026-10-26 11:06   ` sashiko-bot
2026-10-26  9:57 ` [PATCH 5/9] arm64: dts: airoha: en7581: add watchdog node Christian Marangi
2026-10-26 11:11   ` sashiko-bot [this message]
2026-10-26  9:57 ` [PATCH 6/9] arm64: dts: airoha: en7581: add PWM node Christian Marangi
2026-10-26  9:57 ` [PATCH 7/9] arm64: dts: airoha: en7581: add nodes for all supported uart and hsuart Christian Marangi
2026-10-26 11:32   ` sashiko-bot
2026-10-26  9:57 ` [PATCH 8/9] arm64: dts: airoha: en7581: add crypto node Christian Marangi
2026-10-26 11:44   ` sashiko-bot
2026-10-26  9:57 ` [PATCH 9/9] arm64: dts: airoha: en7581: add integrated switch node Christian Marangi
2026-10-26 11:57   ` sashiko-bot

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=sashiko-outbox-185067@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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