mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/1] pwm-regulator with voltage table problem
@ 2024-06-10 12:00 George Stark
  2024-06-10 12:00 ` [PATCH 1/1] regulator: core: add warning for not-recoverable state George Stark
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: George Stark @ 2024-06-10 12:00 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: linux-arm-kernel, linux-kernel, kernel, George Stark

Here is the situation we've met on an ARM SoC:

We have an ARM SoC with dedicated power input for CPU core and supports different
CPU clocks. CPU core power is supplied by external regulator, it's controlled by
PWM channel from the SoC. DTS has node for pwm-regulator with voltage table
(voltage table is used instead of range apparently to use only fine-tuned
duty-cycle values) and with boot-on and always-on properties. This regulator is
bound to cpu node. The pwm-regulator is inited at very early stage before bootloader
in vendor closed-source code.

When a pwm-regulator is probed in the kernel it gets pwm current state and search
voltage table by dutycycle to figure out the current voltage. If that search failed
then the regulator goes to notrecoverbale state and the core sets the minimal power
for the regulator.

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.

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.

What you think? The least should be done is to report about the situation.

George Stark (1):
  regulator: core: add warning for not-recoverable state

 drivers/regulator/core.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-10 21:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10 12:00 [PATCH 0/1] pwm-regulator with voltage table problem George Stark
2024-06-10 12:00 ` [PATCH 1/1] regulator: core: add warning for not-recoverable state George Stark
2024-06-10 15:47   ` Mark Brown
2024-06-10 14:36 ` [PATCH 0/1] pwm-regulator with voltage table problem Mark Brown
2024-06-10 15:37 ` Mark Brown
2024-06-10 21:33   ` George Stark
2024-06-10 21:55     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®