All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yixun Lan" <dlan@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] dts: riscv: spacemit: k3: Fix I/O power settings
Date: Mon, 18 May 2026 21:15:45 +0000	[thread overview]
Message-ID: <20260518211546.A52A3C2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260518-07-dts-pinctrl-io-power-v1-1-abe19c14a726@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `spacemit,apbc` DT property triggers a spurious boot warning and relies on a fragile probe deferral dependency, because the target `syscon_apbc` node lacks the `"syscon"` compatible string.
--

commit 89bb8c89cecf7c32a2e825a2b8f604c5c45762bd
Author: Yixun Lan <dlan@kernel.org>

dts: riscv: spacemit: k3: Fix I/O power settings
    
SpacemiT K3 SoC support dual-voltage I/O power domain, while initially
configure to 3.3v, and need to access register from APBC space to switch
to 1.8v domain.
    
Fix the GMAC0's I/O pins 1.8v switch failure that will result a broken
ethernet driver.

> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> index 815debd16409b..2b0bf9cd755bd 100644
> --- a/arch/riscv/boot/dts/spacemit/k3.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
> @@ -803,6 +803,7 @@ pinctrl: pinctrl@d401e000 {
>  			clocks = <&syscon_apbc CLK_APBC_AIB>,
>  				 <&syscon_apbc CLK_APBC_AIB_BUS>;
>  			clock-names = "func", "bus";
> +			spacemit,apbc = <&syscon_apbc>;

Does this newly added spacemit,apbc property trigger a spurious boot warning
and rely on a fragile probe deferral dependency?

Looking at the referenced syscon_apbc node, it lacks the "syscon" compatible
string.

This prevents syscon_node_to_regmap() from instantiating the regmap
on-the-fly, causing it to return -EPROBE_DEFER if the pinctrl driver probes
before the clock driver registers the regmap.

The pinctrl driver catches this with a blanket IS_ERR() check and prints a
now-spurious "no syscon found" warning during boot while discarding the
regmap pointer:

drivers/pinctrl/spacemit/pinctrl-k1.c:spacemit_pinctrl_probe() {
	...
	pctrl->regmap_apbc = syscon_regmap_lookup_by_phandle(np, "spacemit,apbc");
	if (IS_ERR(pctrl->regmap_apbc)) {
		dev_warn(dev, "no syscon found, disable power voltage switch functionality\n");
		pctrl->regmap_apbc = NULL;
	}
	...
}

The voltage switch functionality only ultimately succeeds because the
subsequent devm_clk_get_enabled() call against the same node also returns
-EPROBE_DEFER.

This gives the clock driver time to probe and register the regmap before the
pinctrl driver retries.

Would adding "syscon" to the syscon_apbc node's compatible string, or
explicitly handling -EPROBE_DEFER in the pinctrl driver, resolve this issue
and prevent the spurious warning?

>  		};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260518-07-dts-pinctrl-io-power-v1-1-abe19c14a726@kernel.org?part=1

  reply	other threads:[~2026-05-18 21:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 20:58 [PATCH] dts: riscv: spacemit: k3: Fix I/O power settings Yixun Lan
2026-05-18 20:58 ` Yixun Lan
2026-05-18 21:15 ` sashiko-bot [this message]
2026-05-18 23:33   ` Yixun Lan
2026-06-03 20:17 ` E Shattow
2026-06-03 20:17   ` E Shattow
2026-06-05  8:58   ` Yixun Lan
2026-06-05  8:58     ` Yixun Lan
2026-06-05 10:12     ` E Shattow
2026-06-05 10:12       ` E Shattow

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=20260518211546.A52A3C2BCB7@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@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 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.