AnsweredAssumed Answered

Latest Frequency driver implementation

Question asked by Arun KV on Jul 30, 2019
Latest reply on Jan 23, 2020 by Marius-lucian Andrei

Its really a great architecture and design which is introduced as a part of IMX 8 series,I just went through the CPUREq driver code in the 4.14.98 kernel version, And observed that an new file name cpufreq_imx8 has been introduced, which consist of a driver implementation for the  cpu frequency scaling, previously for the sabra like boards, generic driver has been working for the same. And understood that during the set target function callback for the latest driver, we just write the cpu frequency using smc call and retrieve the same frequency to the cpu related structure for giving the changes back to the userspace.

 

And i wonder how come the Voltage regulator thing is managed for this ! , Previous generic device driver was setting the regulator voltage during the set callback. Finally i reached to an another point that the new architecture contains an secure firmware which is running in one of the arm core. And which includes the pmic pf8100 driver which mainly do the voltage set and get, And Linux kernel driver interacts with the secure firmware using an inter processor communication mechanism.  

 

So i expected some code in the latest cpu freq driver code, which will communicate with the SCFW firmware and ask to set the voltage. But i did not see that, I might be wrong and the same will handled in another and better way too, But just for a curiosity i would like to ask this, How come the corresponding voltage (read from the opp) is set to the pmic during the frequency change. ? And all device driver from the kernel should be go through the secure channel only ? 

Outcomes