Question about DVFS and Cpu regulator

Hi,

I just bought a Hikey960 and I wish to load one of my module for controlling the voltage of the cpu. The module use the classic regulator API of Kernel, however it can’t find the regulator “VDD_CPU_L” or “VDD_CPU_B”.
Is there a way to access those two regulator without modifying the kernel?

Thanks

The hikey960 uses a co-processor to shift between CPU operating points.

https://android-review.googlesource.com/c/kernel/hikey-linaro/+/756188

Thank you for reply. However shifting between opp implies changing the frenquency and voltage. Is there a way to modify voltage without changing the frequency or adding new opp?

You can review the patch and see if the trim applies instantly but I suspect it won’t. Of course you can change the trim for the current OPP and then jump to a different freq and then back again.

Hmm, I’ll try and see how it turn. Is there a way to check the current voltage? I saw in the patch that the trim is only used to set voltage and not read it

Not really. Changes in OPP are communicated to a seperate controller.
The kernel doesn’t have direct visibility or control.

Hi,
do you know if it is possible for debian changing the voltage levels?

I think it would be possible to port but code like that would be difficult to deliver upstream so I doubt it is available in the snapshots. @Mani?

Yeah, we only include features in snapshots which are either upstreamed or in the process. But for a misc driver like this, we can’t just include it as it is. So a proper way would be to convert it to a regulator driver to source the cpu-supply so that it can work with OPP.