Although Loongson Zhongke's LoongArch architecture processors have supported Linux from the beginning, Loongson engineers are still working hard to solve some missing/lag issues in order to better provide upstream support. One area that is being developed recently is to provide a proper CPUFreq driver for Loongson3 series processors for adjusting the CPU frequency for better performance and power management.

The patch submitted for review last month implements the basic Longson3CPUFreq driver for Dynamic Voltage and Frequency Scaling (DVFS).

Scaling of frequency and voltage is handled by the CPU's system management controller and requires appropriate microcode support. But not all Loongson3 CPU models support this dynamic feature, and some models can only run at a statically set frequency/single performance state.

The initial driver does not yet handle automatic frequency scaling, but this is a feature that will be added in the future. But at least now it's possible to interact with the SMC to manually set the target frequency and other basic functions.