All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pinkesh Vaghela" <pinkesh.vaghela@einfochips.com>,
	devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 4/7] riscv: dts: eswin: add hsp bus node
Date: Thu, 15 Oct 2026 13:09:32 +0000	[thread overview]
Message-ID: <sashiko-outbox-172899@kernel.org> (raw)
In-Reply-To: <20261015125454.1381941-5-pinkesh.vaghela@einfochips.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dts: unclocked syscon MMIO access due to missing clocks property
--

commit 411f5ceff131ac2449926a00c5f169d3aa665b6d
Author: Pinkesh Vaghela <pinkesh.vaghela@einfochips.com>

riscv: dts: eswin: add hsp bus node

This commit adds 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>;
> +
> +			syscon: syscon@50440000 {
> +				compatible = "eswin,eic7700-syscfg", "syscon";
> +				reg = <0x0 0x50440000 0x0 0x2000>;
> +			};

[Severity: High]
Will accessing this syscon node result in an unclocked MMIO fault?

The syscon node lacks a clocks property and seems to rely on the parent
simple-pm-bus for clocks. However, generic syscon does not trigger parent
runtime PM.

When looking at of_syscon_register() in drivers/mfd/syscon.c, it only attaches
a clock if the clocks property is present on the syscon node itself:

drivers/mfd/syscon.c:of_syscon_register() {
        ...
        if (check_res) {
                clk = of_clk_get(np, 0);
                if (IS_ERR(clk)) {
                        ret = PTR_ERR(clk);
                        /* clock is optional */
                        if (ret != -ENOENT)
                                goto err_clk;
                } else {
                        ret = regmap_mmio_attach_clk(regmap, clk);
        ...
}

Meanwhile, looking at simple_pm_bus_probe() in drivers/bus/simple-pm-bus.c,
the simple-pm-bus only enables runtime PM:

drivers/bus/simple-pm-bus.c:simple_pm_bus_probe() {
        ...
        pm_runtime_enable(&pdev->dev);

        if (np)
                of_platform_populate(np, NULL, lookup, &pdev->dev);
        ...
}

Since simple-pm-bus strictly relies on children to wake it up, and syscon
bypasses platform_device PM entirely, the bus is never resumed. Does this
mean any driver or debugfs interface accessing the eswin,eic7700-syscfg
regmap will perform MMIO without enabling the HSP_CFG_CLK?

> +		};
> +
>  		uart0: serial@50900000 {
>  			compatible = "snps,dw-apb-uart";
>  			reg = <0x0 0x50900000 0x0 0x10000>;

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

  reply	other threads:[~2026-10-15 13:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 12:54 [PATCH v5 0/7] riscv: eswin: eic7700: Add support for clocks, resets, pinctrl, HSP bus, I2C and watchdog Pinkesh Vaghela
2026-10-15 12:54 ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 1/7] riscv: dts: eswin: add reset generator for EIC7700 SoC Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 2/7] riscv: dts: eswin: add clock " Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 3/7] riscv: dts: eswin: eic7700: add pinctrl support Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 4/7] riscv: dts: eswin: add hsp bus node Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 13:09   ` sashiko-bot [this message]
2026-10-15 12:54 ` [PATCH v5 5/7] dt-bindings: i2c: dw: add ESWIN EIC7700 SoC I2C controller Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 6/7] riscv: dts: eswin: add I2C controller support Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela
2026-10-15 12:54 ` [PATCH v5 7/7] riscv: dts: eswin: add watchdog support Pinkesh Vaghela
2026-10-15 12:54   ` Pinkesh Vaghela

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-172899@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.