lkml.org 
[lkml]   [2022]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board
On Fri, May 13, 2022 at 03:48:50PM +0800, qianfan wrote:
>
>
> 在 2022/5/13 15:38, Maxime Ripard 写道:
> > Hi,
> >
> > On Thu, May 12, 2022 at 03:18:58PM +0800, qianfanguijin@163.com wrote:
> > > From: qianfan Zhao <qianfanguijin@163.com>
> > >
> > > sun8i-r40 actived cpufreq feature now, let's add "cpu-supply" node on
> > > board.
> > >
> > > Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
> > > ---
> > > arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 4 ++++
> > > arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 4 ++++
> > > arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 4 ++++
> > > arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 4 ++++
> > > 4 files changed, 16 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> > > index a6a1087a0c9b..4f30018ec4a2 100644
> > > --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> > > +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
> > > @@ -113,6 +113,10 @@ &ahci {
> > > status = "okay";
> > > };
> > > +&cpu0 {
> > > + cpu-supply = <&reg_dcdc2>;
> > > +};
> > > +
> > This will break bisection on those boards. Indeed, you added the OPPs on
> > the first patch, and if you only apply that patch, the boards in the
> > second patch will be missing their CPU regulator. The kernel will then
> > ramp up the frequency to the highest OPP, but will not change the
> > voltage, resulting in a crash.
>
> This is a good point and I will merge those two patch.

That's not what I meant to say. Those two patches are great separated.
You can invert them though.

> > There's a similar issue for all the boards that don't have a regulator
> > in the first place.
> >
> > The way we worked around this for the other SoCs is to have a DTSI with
> > the OPPs with a frequency higher than what U-Boot boots with (1008MHz?),
> > and only include that DTSI on boards that have a CPU regulator hooked in.
>
> Is this really necessary? It seems like every board based on sun8i-r40
> have a cpu regulator.

This probably won't be the case whenever someone starts a new design,
and then they'll face random crashes for no apparent reason, and waste a
lot of time in the process.

Whereas the alternative is that you would be missing some OPPs,
something that is fairly easy to figure out.

Maxime
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-05-13 10:18    [W:0.198 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site