Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@kernel.org>
To: sashiko-reviews@lists.linux.dev, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Shuwei Wu <shuwei.wu@mailbox.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"open list:RISC-V SPACEMIT SoC Support"
	<linux-riscv@lists.infradead.org>,
	"open list:RISC-V SPACEMIT SoC Support"
	<spacemit@lists.linux.dev>
Subject: Re: [PATCH 1/3] riscv: dts: spacemit: Add cpu scaling for Milk-V Jupiter
Date: Wed, 29 Jul 2026 09:54:29 +0000	[thread overview]
Message-ID: <20260729095429-GKH76518@kernel.org> (raw)
In-Reply-To: <amnJsOiWSfuBR1ps@aurel32.net>

Hi Aurelien,

On 11:36 Wed 29 Jul     , Aurelien Jarno wrote:
> Hi,
> 
> On 2026-07-28 21:19, sashiko-bot@kernel.org wrote:
> > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> > 
> > Pre-existing issues:
> > - [High] This problem wasn't introduced by this patch, but wiring it up to cpufreq makes it a serious hardware safety risk: the CPU supply regulator (`buck1_0v9`) has an overly permissive maximum voltage constraint of 3.45V, which could physically damage the CPU.
> > --
> > 
> > --- Patch [1]: [PATCH 1/3] riscv: dts: spacemit: Add cpu scaling for Milk-V Jupiter ---
> > commit 4e25fb96470d1ad37415e03a27de699ef1f0da26
> > Author: Aurelien Jarno <aurelien@aurel32.net>
> > 
> > riscv: dts: spacemit: Add cpu scaling for Milk-V Jupiter
> > 
> > This commit enables CPU DVFS on the Milk-V Jupiter board by including the OPP
> > tables and wiring the CPU nodes to the CPU regulator supply.
> > 
> > > diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> > > index b61f5995ec771..3c16d0c20050e 100644
> > > --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> > > +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> > [ ... ]
> > > @@ -107,6 +108,38 @@ &combo_phy {
> > >  	status = "okay";
> > >  };
> > >  
> > > +&cpu_0 {
> > > +	cpu-supply = <&buck1_0v9>;
> > > +};
> > [ ... ]
> > > @@ -209,7 +242,7 @@ pmic@41 {
> > >  		dldoin2-supply = <&buck5>;
> > >  
> > >  		regulators {
> > > -			buck1 {
> > > +			buck1_0v9: buck1 {
> > >  				regulator-min-microvolt = <500000>;
> > >  				regulator-max-microvolt = <3450000>;
> > 
> > [Severity: High]
> > This is a pre-existing issue, but by wiring up the CPU supply for cpufreq in 
> > this patch, does it introduce a severe hardware safety risk?
> > 
> > The buck1_0v9 regulator retains a very permissive maximum voltage constraint 
> > of 3.45V. Because the safe physical limit for the CPU is 1.05V (as defined in 
> > k1-opp.dtsi), could this permanently damage the hardware if a kernel bug, opp 
> > misconfiguration, or privileged userspace requests a higher voltage up to the 
> > board-defined maximum?
> > 
> > Should the board-level constraint be clamped to the safe physical limits of 
> > the CPU (e.g., 1050000 microvolts) to prevent the regulator from supplying a 
> > destructive voltage?
> 
> This looks like a valid point. Yixun, I believe the commit a5d7000e1a17 
> ("riscv: dts: spacemit: Add cpu scaling for K1 SoC") should be drop from 
> your tree until this is fixed, or at least it should not be pushed to 
> v7.3 if the regulator issue is not fixed.
> 
Instead of dropping this patch, I'd like to get it fixed in tree, I don't want
to hold on this patch, it's generally tested

> I'll try to submit a patchset fixing that.
> 
Yes, please, I think we still have time to get it in for v7.3

-- 
Yixun Lan (dlan)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-07-29  9:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 21:05 [PATCH 0/3] riscv: dts: spacemit: Add cpu scaling for Milk-V Jupiter Aurelien Jarno
2026-07-28 21:05 ` [PATCH 1/3] " Aurelien Jarno
     [not found]   ` <20260728211959.4174F1F000E9@smtp.kernel.org>
2026-07-29  9:36     ` Aurelien Jarno
2026-07-29  9:54       ` Yixun Lan [this message]
2026-07-28 21:05 ` [PATCH 2/3] riscv: dts: spacemit: Add a common board dtsi for Milk-V Jupiter boards Aurelien Jarno
     [not found]   ` <20260728212345.A0CFE1F000E9@smtp.kernel.org>
2026-07-29  9:37     ` Aurelien Jarno
2026-07-28 21:05 ` [PATCH 3/3] riscv: dts: spacemit: Add Milk-V Jupiter board (M1) Aurelien Jarno
     [not found]   ` <20260728212841.4C3E41F000E9@smtp.kernel.org>
2026-07-29  9:40     ` Aurelien Jarno
2026-07-29  1:32 ` [PATCH 0/3] riscv: dts: spacemit: Add cpu scaling for Milk-V Jupiter Yixun Lan
2026-07-29  9:34   ` Aurelien Jarno
2026-07-29  9:43     ` Yixun Lan
2026-07-29 15:16       ` Aurelien Jarno

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=20260729095429-GKH76518@kernel.org \
    --to=dlan@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shuwei.wu@mailbox.org \
    --cc=spacemit@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