Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pinkesh Vaghela" <pinkesh.vaghela@einfochips.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 5/8] riscv: dts: eswin: add hsp bus node
Date: Mon, 06 Jul 2026 08:23:34 +0000	[thread overview]
Message-ID: <20260706082335.4C4351F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260706081055.1126275-6-pinkesh.vaghela@einfochips.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The `hsp_sp_csr` syscon node lacks a `clocks` property, causing unclocked MMIO accesses that can crash the system.
- [Low] Non-generic node name for syscon device.
--

commit 2f5171ba39f634bc5960f8f8754a5b822bc8c76b
Author: Pinkesh Vaghela <pinkesh.vaghela@einfochips.com>

riscv: dts: eswin: add hsp bus node

Add an HSP bus node to manage the HSP CFG clock used by HSP
peripherals. This clock is required for accessing both the HSP CSR
registers and the register spaces of HSP peripheral devices.

> diff --git a/arch/riscv/boot/dts/eswin/eic7700.dtsi b/arch/riscv/boot/dts/eswin/eic7700.dtsi
> --- a/arch/riscv/boot/dts/eswin/eic7700.dtsi
> +++ b/arch/riscv/boot/dts/eswin/eic7700.dtsi
[ ... ]
> @@ -252,6 +252,19 @@ plic: interrupt-controller@c000000 {
>  			#interrupt-cells = <1>;
>  		};
>  
> +		hsp: bus@50400000 {
> +			compatible = "simple-pm-bus";
> +			ranges = <0x0 0x50400000 0x0 0x50400000 0x0 0xa0000>;
> +			clocks = <&clk EIC7700_CLK_GATE_HSP_CFG_CLK>;
> +			#address-cells = <2>;
> +			#size-cells = <2>;
> +
> +			hsp_sp_csr: hsp-sp-top-csr@50440000 {

[Severity: Low]
Does this node name violate standard Device Tree naming conventions?

According to the Devicetree Specification, node names should be generic and
reflect the function of the device rather than its precise programming model.

Should this be named syscon@50440000 instead of hsp-sp-top-csr@50440000?

> +				compatible = "eswin,eic7700-syscfg", "syscon";
> +				reg = <0x0 0x50440000 0x0 0x2000>;
> +			};

[Severity: High]
Will accessing this syscon node cause a synchronous external abort?

Since this syscon node is placed under a simple-pm-bus, and syscon nodes
do not bind to standard platform drivers, no pm_runtime_get_sync() is ever
called on behalf of the syscon. 

This means the parent bus remains runtime-suspended, leaving the
EIC7700_CLK_GATE_HSP_CFG_CLK clock disabled.

The syscon regmap implementation can manage its own clock explicitly during
IO accesses via regmap_mmio_attach_clk(), but it requires the clocks property
to be present in the syscon node itself.

Because this is missing the clocks property, neither the bus nor the regmap
will enable the clock prior to the MMIO access, which could crash the system
if accessed via debugfs or a consumer driver.

Should the clocks property be added directly to this node as well?

> +		};
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260706081055.1126275-1-pinkesh.vaghela@einfochips.com?part=5

  reply	other threads:[~2026-07-06  8:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06  8:10 [PATCH v2 0/8] riscv: eswin: eic7700: Add support for clocks, resets, pinctrl, HSP bus, I2C and watchdog Pinkesh Vaghela
2026-07-06  8:10 ` [PATCH v2 1/8] riscv: dts: eswin: add reset generator for EIC7700 SoC Pinkesh Vaghela
2026-07-06  8:10 ` [PATCH v2 2/8] riscv: dts: eswin: add clock " Pinkesh Vaghela
2026-07-06  8:16   ` sashiko-bot
2026-07-06  8:10 ` [PATCH v2 3/8] riscv: dts: eswin: eic7700: add pinctrl support Pinkesh Vaghela
2026-07-06  8:23   ` sashiko-bot
2026-07-06  8:10 ` [PATCH v2 4/8] dt-bindings: mfd: syscon: add ESWIN EIC7700 compatible Pinkesh Vaghela
2026-07-06  8:10 ` [PATCH v2 5/8] riscv: dts: eswin: add hsp bus node Pinkesh Vaghela
2026-07-06  8:23   ` sashiko-bot [this message]
2026-07-06 17:05     ` Conor Dooley
2026-07-06  8:10 ` [PATCH v2 6/8] dt-bindings: i2c: dw: add ESWIN EIC7700 SoC I2C controller Pinkesh Vaghela
2026-07-06 16:59   ` Conor Dooley
2026-07-06  8:10 ` [PATCH v2 7/8] riscv: dts: eswin: add I2C controller support Pinkesh Vaghela
2026-07-06  8:10 ` [PATCH v2 8/8] riscv: dts: eswin: add watchdog support Pinkesh Vaghela
2026-07-06  8:22   ` 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=20260706082335.4C4351F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=pinkesh.vaghela@einfochips.com \
    --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