Setting Frequency for RK3588 CPU GPU NPU DDR

Some things can only be done alone. Some barriers can only be crossed alone. Some paths can only be walked alone.

During hardware power testing, when the module has frequency and voltage adjustment functions (voltage must be adjusted before frequency), it is necessary to test the voltage values corresponding to the operating frequencies of each module to ensure stability (the higher the frequency,

the higher the voltage value).

During hardware reliability testing, the frequencies of each module need to be set to the highest value for testing under high load.

The frequency voltage table for RK3588 CPU GPU DDR NPU (OPP: Operating Performance Points, describes the frequency and voltage of the device under different operating states)

has the following strategies:

  • interactive: dynamically adjusts frequency and voltage based on CPU load;

  • conservative: a conservative strategy that adjusts frequency and voltage step by step;

  • ondemand: dynamically adjusts frequency and voltage based on CPU load, slower to respond than the interactive strategy;

  • userspace: users set voltage and frequency themselves, the system does not adjust automatically;

  • powersave: prioritizes power consumption, always setting frequency to the lowest value;

  • performance: prioritizes performance, always setting frequency to the highest value;

Command: cat /sys/kernel/debug/opp/opp_summary

(Some DTS configurations have CPU nodes as CPU0, CPU2, CPU4, and opp_summary contains corresponding voltage values for frequencies)

CPU Fixed Frequency

CPU fixed frequency

RK3588’s CPU consists of 4 A55 + 4 A76, divided into 3 groups for separate management, with nodes being: policy0, policy2, policy4

located under /sys/devices/system/cpu/cpufreq directory.

The following operations are examples using policy0.

Get the current supported frequencies of the CPU

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies

Get the CPU operating modes

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors

Set manual fixed frequency mode: userspace

echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

Set frequency to 1608000

echo 1608000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed

Confirm if the setting was successful

cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq

The other two CPU groups are set in a similar manner, just operate on the corresponding nodes.

GPU Fixed Frequency

Get the supported frequencies of the GPU

cat /sys/class/devfreq/fb000000.gpu/available_frequencies

Get the operating modes of the GPU

cat /sys/class/devfreq/fb000000.gpu/available_governors

Set to userspace

echo userspace > /sys/class/devfreq/fb000000.gpu/governor

Set frequency to 900000000

echo 900000000 > /sys/class/devfreq/fb000000.gpu/userspace/set_freq

Check if the setting was successful

cat /sys/class/devfreq/fb000000.gpu/cur_freq

NPU Fixed Frequency

Get the supported frequencies of the NPU

cat /sys/class/devfreq/fdab0000.npu/available_frequencies

Get the operating modes of the NPU

cat /sys/class/devfreq/fdab0000.npu/available_governors

Set to userspace

echo userspace > /sys/class/devfreq/fdab0000.npu/governor

Set frequency to 900000000

echo 900000000 > /sys/class/devfreq/fdab0000.npu/userspace/set_freq

Check if the setting was successful

cat /sys/class/devfreq/fdab0000.npu/cur_freq

DDR Fixed Frequency

Get the supported frequencies of the DDR

cat /sys/class/devfreq/dmc/available_frequencies

Get the operating modes of the DDR

cat /sys/class/devfreq/dmc/available_governors

Set to userspace

echo userspace > /sys/class/devfreq/dmc/governor

Set frequency to 2112000000

echo 2112000000 > /sys/class/devfreq/dmc/userspace/set_freq

Check if the setting was successful

cat /sys/class/devfreq/dmc/cur_freq

END

—————————–

In the jungle society, tears are never believed; no amount of complaints will help, no one will pity you;

Long press to follow

More attitude

关尔硬件

Setting Frequency for RK3588 CPU GPU NPU DDR

Leave a Comment

Your email address will not be published. Required fields are marked *