rk3288 android6.0 dvfs

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/michaelcao1980/article/details/79975437
Platform: Rockchip
OS: Android 6.0

Kernel: 3.10.92

ddr,gpu以及arm的clock都受dvfs模块管控, 所以只要执行:

root@rk3288:/ # cat /sys/dvfs/dvfs_tree 

[78603.186480] -------------DVFS TREE-----------
[78603.186548] DVFS TREE:
[78603.186569] |- voltage domain:vd_gpu
[78603.186598] |- current voltage:950000
[78603.186617] |- current regu_mode:UNKNOWN
[78603.186640] |  |- power domain:pd_gpu, status = OFF, current volt = 950000, current regu_mode = UNKNOWN
[78603.186677] |  |  |-
clock: clk_gpu current: rate 198000, volt = 950000, enable_dvfs = ENABLE
[78603.186714] |  |  |- clk limit(enable):[198000000, 480000000]; last set rate = 198000
[78603.186737] |  |  |  |- freq = 198000, volt = 950000
[78603.186756] |  |  |  |- freq = 297000, volt = 950000
[78603.186776] |  |  |  |- freq = 417000, volt = 1100000
[78603.186795] |  |  |  |- freq = 480000, volt = 1150000
[78603.186818] |  |  |- clock: clk_gpu current: rate 198000, regu_mode = UNKNOWN, regu_mode_en = 0
[78603.186840] |
[78603.186840] |- voltage domain:vd_logic
[78603.186867] |- current voltage:1150000
[78603.186885] |- current regu_mode:UNKNOWN
[78603.186906] |  |- power domain:pd_vio, status = OFF, current volt = 1150000, current regu_mode = UNKNOWN
[78603.186943] |  |  |- clock: aclk_vio1 current: rate 325000, volt = 1150000, enable_dvfs = ENABLE
[78603.186979] |  |  |- clk limit(enable):[82000000, 325000000]; last set rate = 325000
[78603.187001] |  |  |  |- freq = 82000, volt = 1150000
[78603.187021] |  |  |  |- freq = 325000, volt = 1150000
[78603.187044] |  |  |- clock: aclk_vio1 current: rate 325000, regu_mode = UNKNOWN, regu_mode_en = 0
[78603.187070] |  |- power domain:pd_ddr, status = OFF, current volt = 1150000, current regu_mode = UNKNOWN
[78603.187106] |  |  |- clock: clk_ddr current: rate 396000, volt = 1150000, enable_dvfs = ENABLE
[78603.187141] |  |  |- clk limit(enable):[200000000, 528000000]; last set rate = 396000
[78603.187163] |  |  |  |- freq = 200000, volt = 1150000
[78603.187182] |  |  |  |- freq = 300000, volt = 1150000
[78603.187202] |  |  |  |- freq = 396000, volt = 1150000
[78603.187221] |  |  |  |- freq = 528000, volt = 1150000
[78603.187243] |  |  |- clock: clk_ddr current: rate 396000, regu_mode = UNKNOWN, regu_mode_en = 0
[78603.187265] |
[78603.187265] |- voltage domain:vd_arm
[78603.187292] |- current voltage:900000
[78603.187310] |- current regu_mode:UNKNOWN
[78603.187331] |  |- power domain:pd_core, status = OFF, current volt = 900000, current regu_mode = UNKNOWN
[78603.187367] |  |  |- clock: clk_core current: rate 408000, volt = 900000, enable_dvfs = ENABLE
[78603.187402] |  |  |- clk limit(enable):[408000000, 1608000000]; last set rate = 408000
[78603.187424] |  |  |  |- freq = 408000, volt = 900000
[78603.187443] |  |  |  |- freq = 600000, volt = 950000
[78603.187462] |  |  |  |- freq = 816000, volt = 1000000
[78603.187482] |  |  |  |- freq = 1008000, volt = 1050000
[78603.187501] |  |  |  |- freq = 1200000, volt = 1100000
[78603.187521] |  |  |  |- freq = 1416000, volt = 1200000
[78603.187540] |  |  |  |- freq = 1608000, volt = 1350000
[78603.187563] |  |  |- clock: clk_core current: rate 408000, regu_mode = UNKNOWN, regu_mode_en = 0

[78603.187585] -------------DVFS TREE END------------

在rk3288.dtsi中,有:

temp-limit-enable = <1>;
target-temp = <80>;
min_temp_limit = <312000>;normal-temp-limit = <
    /* delta-temp delta-freq */
    3	96000
    6	144000
    9	192000
    15	384000
>;第一列为降低每一级阀值,第二列为降低频率,默认温控开始温度是80°. 
例如当前温度是82°,那么不作用,当达到83°时, 温控降频开始有效,假设系统当前要设置1008000KHz,
那么经过温控系统之后会减去96000KHz. 如果温度很高,就会一直这样减下去,减到不能低于min_temp_limit为止. root@rk3288:/ # cat /sys/bus/cpu/devices/cpu0/cpufreq/cpuinfo_cur_freq 408000 root@rk3288:/ # cat /sys/devices/ff280000.tsadc/temp1_input 41 governor: root@rk3288:/ # ls -l /sys/bus/cpu/devices/cpu0/cpufreq/ -r--r--r-- root     root         4096 2018-04-16 17:08 affected_cpus -r-------- root     root         4096 2018-04-16 17:08 cpuinfo_cur_freq -r--r--r-- root     root         4096 2018-04-16 17:08 cpuinfo_max_freq -r--r--r-- root     root         4096 2018-04-16 17:08 cpuinfo_min_freq -r--r--r-- root     root         4096 2018-04-16 17:08 cpuinfo_transition_latency -r--r--r-- root     root         4096 2018-04-16 17:08 related_cpus -r--r--r-- root     root         4096 2018-04-16 17:08 scaling_available_frequencies -r--r--r-- root     root         4096 2018-04-16 17:08 scaling_available_governors -r--r--r-- root     root         4096 2018-04-16 17:08 scaling_cur_freq -r--r--r-- root     root         4096 2018-04-16 17:08 scaling_driver -rw-rw-r-- system   system       4096 2018-04-16 17:08 scaling_governor -rw-rw---- system   system       4096 2018-04-16 17:08 scaling_max_freq -rw-rw---- system   system       4096 2018-04-16 17:08 scaling_min_freq -rw-rw-r-- system   system       4096 2018-04-16 17:08 scaling_setspeed drwxr-xr-x root     root              2018-04-16 17:08 stats GPU的DVFS不是在dts而是在驱动中直接控制并且默认打开的 root@rk3288:/ # echo on > /sys/devices/ffa30000.gpu/dvfs root@rk3288:/ # echo off > /sys/devices/ffa30000.gpu/dvfs

猜你喜欢

转载自blog.csdn.net/michaelcao1980/article/details/79975437