[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zmcdvm7XbtU1JlQr@finisterre.sirena.org.uk>
Date: Mon, 10 Jun 2024 16:37:34 +0100
From: Mark Brown <broonie@...nel.org>
To: George Stark <gnstark@...utedevices.com>
Cc: lgirdwood@...il.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel@...utedevices.com
Subject: Re: [PATCH 0/1] pwm-regulator with voltage table problem
On Mon, Jun 10, 2024 at 03:00:24PM +0300, George Stark wrote:
> The situation: bootloader sets mean cpu power and mean cpu clock.
> but that cpu power is not found in the voltage table (value is between table items)
> due to different versions of bootloader and kernel and the regulator core sets
> the minimal power but cpu clock stays the same. CPU hangs somewhere during boot.
Why not just add this OPP to the table the kernel knows about? Clearly
it's something the vendor set and presumably thinks the device can
actually operate at. As far as I can tell you're only having problems
here because you've got a software defined regulator but haven't given
the software information about this configuration so it's got no idea
what's going on when bootstrapping.
> The core problem as I see it is if regulator is bound to CPU (or some other
> complex consumer) it can't be changed except by the consumer at any stage. So
> the regulator driver (core part) should wait for the own consumer to init
> it properly but regulator can't be in unknown state after probing.
If the regulator is configured outside the constraints configured for it
in the binding then the core will bring the regulator within those
constraints, some systems with regulator configurations fixed in
silicon rely on this for correct performance. Regulators with
unreadable hardware are very much an edge case when it comes to this,
what works for one system will be broken for another one so we just have
to pick a behaviour that will hopefully work more often than it breaks.
We can't rely on consumers setting a voltage since consumers are only
expected to set a voltage if they are actively managing it at runtime,
other consumers should rely on system configuration.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists