RK3399功耗分析与优化

Voltage domain(VD) and power domain(PD)

  • VD_CORE_B: including two big cores Contex-A72, the power consumption is relatively large, so separate a voltage domain.
  • VD_CORE_L: including four little cores Contex-A53, the power consumption is relatively large, so separate a voltage domain.
  • VD_LOGIC: including some peripherals’ controller and system bus, such as USB, EMMC, GMAC, SPI, I2C, EDP, VOP, AXI, AHB, APB, and so on.
  • VD_CENTER: including vdpu, vepu, iep, rga and DDR controller.
  • VD_GPU: including GPU, the power consumption is relatively large, so separate a voltage domain.
  • VD_PMU: including PMU, SRAM, GPIO, PVTM and other modules relating to suspend and resume process.

EVB Power consumption

Type power-supply Voltage(V) current(mA) Theoretical current on battery-3.8V(mA) Remark
DC/DC VDD_ARM 0.96 10.20 3.23 With 80% efficiency, conversion formula: V * I / efficiency / voltage of the battery
DC/DC VDD_LOG 0.96 89.30 28.20 eg: Theoretical current of VDD_LOG on battery(3.8V) = 0.96 * 89.3 / 0.8 / 3.8 = 28.2
DC/DC VCC_DDR 1.26 38.50 15.91
DC/DC VCC_IO 2.99 4.50 4.43
LDO VCC_1V8 1.81 28.80 28.80 Output current of LDO is equal to input current
LDO VDD_1V0 1.00 10.90 10.90
LDO VCC3V0_PMU 3.01 1.20 1.20
battery VBAT 3.81 94.60 92.67 Theoretical value is similar to actually measured value

Data analysis for each path

1. VDD_CORE/VDD_CPU/VDD_ARM

  • Confirm if the frequency voltage table (opp-table) is normal or not, if the actually measured voltage is consistent with the set voltage or not.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
 /* Acquire the frequency voltage table, target column means the voltage required by some 
frequency */
# cat /sys/kernel/debug/opp/opp_summary
device rate(Hz) target(uV) min(uV) max(uV)
-------------------------------------------------------------------
platform-dmc
328000000 900000 900000 900000
416000000 900000 900000 900000
666000000 900000 900000 900000
856000000 900000 900000 900000
platform-ff9a0000.gpu
200000000 825000 825000 825000
300000000 825000 825000 825000
400000000 825000 825000 825000
600000000 925000 925000 925000
800000000 1075000 1075000 1075000
cpu4
408000000 825000 825000 1250000
600000000 825000 825000 1250000
816000000 825000 825000 1250000
1008000000 850000 850000 1250000
1200000000 925000 925000 1250000
1416000000 1000000 1000000 1250000
1608000000 1075000 1075000 1250000
1800000000 1175000 1175000 1250000
cpu0
408000000 825000 825000 1250000
600000000 825000 825000 1250000
816000000 850000 850000 1250000
1008000000 925000 925000 1250000
1200000000 1000000 1000000 1250000
1416000000 1125000 1125000 1250000

/* Check the frequency scaling strategy currently used by cpufreq, cpu frequency scaling
is enabled with the default interactive strategy */
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
interactive

/* Set userspace strategy to fix the frequency of cpu, then set different frequencies,
compare the set voltage with the measured voltage */
# echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
userspace

/* Check the frequency point supported by cpufreq */
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
408000 600000 816000 1008000 1200000 1248000 129600

/* Set the fixed frequency */
# echo 408000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

/* Confirm current frequency*/
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
408000

/* Confirm current voltage, and compare with measured value, vdd_arm represents the name
of regulator, which is differnt for differnt projects*/
# cat /sys/kernel/debug/regulator/vdd_arm/voltage
950000

/* Acquire current voltages of all regulators*/
# cat /sys/kernel/debug/regulator/regulator_summary
regulator use open bypass voltage current min max
-------------------------------------------------------------------------------
regulator-dummy 0 4 0 0mV 0mA 0mV 0mV
ff100000.saradc 0mV 0mV
backlight 0mV 0mV
deviceless 0mV 0mV
vdd_log 0 1 0 810mV 0mA 810mV 1400mV
deviceless 0mV 0mV
vcc3v3_sys 0 17 0 3300mV 0mA 3300mV 3300mV
deviceless 0mV 0mV
vdd_cpu_b 0 2 0 825mV 0mA 712mV 1500mV
cpu4 825mV 1250mV
deviceless 0mV 0mV
vdd_gpu 0 2 0 825mV 0mA 712mV 1500mV
ff9a0000.gpu 825mV 1500mV
deviceless 0mV 0mV
vdd_center 0 2 0 900mV 0mA 750mV 1350mV
dmc 900mV 1350mV
deviceless 0mV 0mV
vdd_cpu_l 0 2 0 825mV 0mA 750mV 1350mV
cpu0 825mV 1250mV
deviceless 0mV 0mV
vcc_ddr 0 1 0 3300mV 0mA 0mV 0mV
deviceless 0mV 0mV
vcc_1v8 0 1 0 1800mV 0mA 1800mV 1800mV
deviceless 0mV 0mV
vcc1v8_dvp 0 2 0 1800mV 0mA 1800mV 1800mV
ff770000.syscon:io-domains 0mV 0mV
deviceless 0mV 0mV
vcc3v0_tp 0 1 0 3000mV 0mA 3000mV 3000mV
deviceless 0mV 0mV
vcc1v8_pmu 0 1 0 1800mV 0mA 1800mV 1800mV
deviceless 0mV 0mV
vccio_sd 0 3 0 3000mV 0mA 1800mV 3000mV
fe320000.dwmmc 3000mV 3000mV
ff770000.syscon:io-domains 0mV 0mV
deviceless 0mV 0mV
vcca3v0_codec 0 1 0 3000mV 0mA 3000mV 3000mV
deviceless 0mV 0mV
vcc_1v5 0 1 0 1500mV 0mA 1500mV 1500mV
deviceless 0mV 0mV
vcca1v8_codec 0 2 0 1800mV 0mA 1800mV 1800mV
ff770000.syscon:io-domains 0mV 0mV
deviceless 0mV 0mV
vcc_3v0 0 3 0 3000mV 0mA 3000mV 3000mV
ff770000.syscon:io-domains 0mV 0mV
ff320000.syscon:io-domains 0mV 0mV
deviceless 0mV 0mV
vcc3v3_s3 0 1 0 3300mV 0mA 0mV 0mV
deviceless 0mV 0mV
vcc3v3_s0 0 1 0 3300mV 0mA 0mV 0mV
deviceless 0mV 0mV
vcc5v0_host 0 3 0 5000mV 0mA 5000mV 5000mV
phy-ff770000.syscon:usb2-phy@e450.9 0mV 0mV
phy-ff770000.syscon:usb2-phy@e460.1 0mV 0mV
deviceless 0mV 0mV
vcc5v0_sys 0 2 0 5000mV 0mA 5000mV 5000mV
deviceless 0mV 0mV
vcc_lcd 0 2 0 3300mV 0mA 3300mV 3300mV
edp-panel 0mV 0mV
deviceless 0mV 0mV
vcc_sd 0 2 0 3000mV 0mA 3000mV 3000mV
fe320000.dwmmc 3000mV 3100mV
deviceless 0mV 0mV
vcc_phy 0 2 0 0mV 0mA 0mV 0mV
fe300000.ethernet 0mV 0mV
deviceless 0mV 0mV
  • Check cpu loading, analyze if there is abnormal task or interrupt.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Use top command to check the task loading, the output of top with different versions 
will have difference, this version of top supports to check the thread and the running
cpu of the thread */
# top -m 5
Tasks: 219 total, 1 running, 218 sleeping, 0 stopped, 0 zombie
Mem: 3.7G total, 1.5G used, 2.2G free, 13M buffers
Swap: 1.5G total, 0 used, 1.5G free, 877M cached
600%cpu 3%user 0%nice 5%sys 590%idle 0%iow 1%irq 1%sirq 0%host

/* PR column represents currently running cpu of the thread, the sum of all cpu loading
percentage is equal to 100%, so the highest loading percentage of each cpu is
100%/NR_CPU, the highest loading percentage of each CPU of SoC with 4 cores is 25% */
PID USER PR NI VIRT RES SHR S[%CPU] %MEM TIME+ ARGS
12834 root 20 0 35M 3.9M 3.1M R 1.6 0.1 0:00.11 top -m 5
10275 root 20 0 0 0 0 I 0.3 0.0 0:00.05 [kworker/u12:1-devfreq_wq]
318 radio 20 0 79M 7.6M 6.6M S 0.3 0.1 0:08.34 rild
290 root 20 0 34M 3.8M 3.2M S 0.3 0.0 0:17.53 sh /vendor/bin/pwm_fan.sh
1 root 20 0 54M 8.7M 6.4M S 0.3 0.2 0:05.12 init second_stage

/* Use cpustats to observe the frequency change of cpu */
# cpustats
Total: User 600 + Nice 0 + Sys 3 + Idle 591 + IOW 0 + IRQ 0 + SIRQ 0 = 1194
 408000kHz 0 +
 600000kHz 0 +
 816000kHz 0 +
 1008000kHz 0 +
 1200000kHz 0 +
 1248000kHz 0 +
 1296000kHz 0 +
 1416000kHz 0 +
 1512000kHz 1200 = 1200 /* within the statistic time, there are 1200 system jiffies in
total, 1512M running for 1200 jiffies */
/* from below, we can see the loading status of each cpu, including user mode, kernel
mode, interrupt and idle time */
cpu0: User 0 + Nice 0 + Sys 1 + Idle 294 + IOW 0 + IRQ 0 + SIRQ 0 = 295
cpu1: User 299 + Nice 0 + Sys 1 + Idle 0 + IOW 0 + IRQ 0 + SIRQ 0 = 300
cpu2: User 1 + Nice 0 + Sys 1 + Idle 296 + IOW 0 + IRQ 0 + SIRQ 0 = 298
cpu3: User 300 + Nice 0 + Sys 1 + Idle 0 + IOW 0 + IRQ 0 + SIRQ 0 = 301

/* check the ratio of running time for each frequency through cpufreq node, time unit:
jiffies */
# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
408000 718186
600000 548
816000 368
1008000 1578
1200000 1104
1248000 84
1296000 101
1416000 678
1512000 47495

/* check the inturrupt quantity of all peripherals */
# cat /proc/interrupts
          CPU0       CPU1       CPU2       CPU3
 1:          0          0          0          0     GICv2  29 Edge      arch_timer
 2:     181898     165057     636772     839244     GICv2  30 Edge      arch_timer
 5:     180743      39000      28905      65189     GICv2  62 Level     rk_timer
13:     260634          0          0          0     GICv2  39 Level     ff180000.i2c
14:     354805          0          0          0     GICv2  40 Level     ff190000.i2c
15:          0          0          0          0     GICv2  41 Level     ff1a0000.i2c

2. VDD_GPU

The power consumption of VDD_GPU mainly confirms if the the frequency voltage table is normal or not, if
the measured voltage is consistent with the set voltage or not, using devfreq node.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* acquire the frequency voltage table */
# cat /sys/kernel/debug/opp/opp_summary
device                rate(Hz)    target(uV)    min(uV)    max(uV)
-------------------------------------------------------------------...
platform-ff9a0000.gpu
200000000 825000 825000 825000
300000000 825000 825000 825000
400000000 825000 825000 825000
600000000 925000 925000 925000
800000000 1075000 1075000 1075000
...

/* check the frequency scaling strategy currently used by gpu devfreq, gpu frequency
scaling is enabled with the default simple_ondemand strategy */
# cat /sys/class/devfreq/ff9a0000.gpu/governor
simple_ondemand
Note: ff9a0000 of ff9a0000.gpu is the address of gpu register, so the name will be
different for differnt chips.

/* Set userspace strategy to fix the frequency of gpu, then set different frequencies,
compare the set voltage with measured voltage */
# echo userspace > /sys/class/devfreq/ff9a0000.gpu/governor
# cat /sys/class/devfreq/ff9a0000.gpu/governor
userspace

/* check the frequency points supported by gpu devfreq */
# cat /sys/class/devfreq/ff9a0000.gpu/available_frequencies
520000000 480000000 400000000 300000000 200000000

/* set the fixed frequency */
# echo 200000000 > /sys/class/devfreq/ff9a0000.gpu/userspace/set_freq

/* confirm current frequency */
# cat /sys/class/devfreq/ff9a0000.gpu/cur_freq
200000000

/* confirm current voltage, and compare with measued value */
# cat /sys/kernel/debug/regulator/vdd_gpu/voltage
950000

/* check gpu loading */
# cat /sys/class/devfreq/ff9a0000.gpu/load
0@200000000Hz

3. VDD_LOGIC

Generally VDD_LOGIC will contain many modules, in order to manage the power consumption conveniently,
it will be divided into many PD internally. The power consumption can be analyzed mainly from the
following aspects:

  • Confirm the running frequency and switch status of each module.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# cat /sys/kernel/debug/clk/clk_summary

enable prepare protect duty
clock count count count rate accuracy phase cycle
---------------------------------------------------------------------------------------------
rk808-clkout2 2 2 0 32768 0 0 50000
rk808-clkout1 0 0 0 32768 0 0 50000
xin32k 0 0 0 32768 0 0 50000
CLK_CAMERA_27MHZ 1 1 0 27000000 0 0 50000
clkin_gmac 1 1 0 125000000 0 0 50000
clk_rmii_src 4 4 0 125000000 0 0 50000
clk_rmii_tx 2 2 0 125000000 0 0 50000
clk_rmii_rx 1 1 0 125000000 0 0 50000
clk_mac_ref 1 1 0 125000000 0 0 50000
clk_mac_refout 1 1 0 125000000 0 0 50000
......
  • Confirm the switch status of each PD.
1
2
3
4
5
6
7
8
9
10
11
12
# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
pd_vopl on
/devices/platform/ff8f3f00.iommu suspended
/devices/platform/ff8f0000.vop suspended
pd_vopb off-0
/devices/platform/ff903f00.iommu suspended
/devices/platform/ff900000.vop suspended
pd_vo on pd_vopb, pd_vopl
......
  • Generally DDR module is put in VDD_LOGIC, and the power consumption of DDR module is relatively
    large, use the same devfreq strategy as GPU to optimize the power consumption, so need to confirm
    the frequency voltage table and measured voltage. DDR also has some configurations with low power
    consumption, such as pd_idle, sr_idle, odt switch and some other timing configurations. The debugging
    process is relatively complex. Need to refer to the detailed DDR document.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# cat /sys/kernel/debug/opp/opp_summary
device                rate(Hz)    target(uV)    min(uV)    max(uV)
------------------------------------------------------------------- platform-dmc
                     194000000       950000      950000      950000
                     328000000       950000      950000      950000
                     450000000       950000      950000      950000
                     528000000       975000      975000      975000
                     666000000      1000000     1000000     1000000
...

/* ddr uses dmc_ondemand frequency scaling strategy by default */
cat /sys/class/devfreq/dmc/governor
dmc_ondemand

Other commands to set the frequency and voltage are the same as GPU devfreq.

4. VCC_DDR

VCC_DDR supplies power mainly for DDR component and DDR-IO part of SoC. The parameters affecting the
power consumption of VCC_DDR include: DDR frequency, DDR loading, DDR low power consumption
configuration, DDR component type and so on. Under the same condition, the power consumption of DDR
components from different vendors may have big difference.

5. VCC_IO

VCC_IO supplies power mainly for IO Pad of SoC and some peripherals. The power consumption can be
analyzed from the following aspects:

  • Check the working status of peripheral module, if there is leakage.
  • Check if IO pin status of SoC matches with the peripheral or not, for example, IO output is high, but the connected peripheral pin is low level.

Common scenario analysis

1. Static desktop

It is mainly the display module which is working, CPU, GPU, DDR should be reduced to the lowest frequency,
and enter low power consumption mode. Adjust VDD_CPU,VDD_GPU,VDD_LOGIC to the lowest voltage of
opp-table, confirm the status of clk_summary and pm_genpd_summary, confirm the peripheral modules
(WIFI, BT, etc.) are all closed. The static desktop generally is used as the basic power consumption of other
scenarios, so need to firstly optimize its power consumption to the best.

2. Video playback

It is mainly the video decoder (VPU/RKVDEC) which is working, GPU generally is closed. Especially confirm if
the running frequency of DDR and voltage of VDD_LOGIC are normal or not.

3. Game

It is mainly CPU and GPU which are working. Especially analyze the loading of CPU and GPU, frequency
change, the voltages of VDD_CPU and VDD_GPU are normal or not.

4. Deepsleep

Generally VDD_CPU and VDD_GPU will turn off the power supply, VDD_LOG only reserves the power supply
for some resume module, so need to focus on the power consumption analysis of IO, DDR components and
some peripherals.

Power consumption optimization strategy

1. CPU optimization

  • Adjust cpufreq parameter.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* the default frequency scaling strategy used is interactive, relative parameters are 
as follows: */
ls -l /sys/devices/system/cpu/cpu0/cpufreq/interactive
go_hispeed_load    /* when the loading is larger than go_hispeed_load and the frequency
is smaller than hispeed_freq, directly jump to hispeed_freq */

hispeed_freq        /* when jumping from low frequency to high frequency, need to jump
to hispedd_freq first */
above_hispeed_delay /* when the frequency is larger than hispeed_freq, the time duration
before each frequency increase */
min_sample_time    /* after each frequency increase, if it is to reduce the frequency
next time , the time duration before frequency reduce */

target_loads        /* the target loading of the frequency scaling */
timer_rate          /* the loading sampling time,unit:us */
timer_slack         /* the loading sampling time after cpu entering idle */
boost               /* when the frequency is smaller than hispeed_freq, keep boost to
hispeed_freq */
boostpulse          /* when the frequency is smaller than hispeed_freq, boost to
hispeed_freq, keep a while */
boostpulse_duration /* time duration of boostpulse, unit:us */
io_is_busy          /* whether to compute io wait to cpu loading */

We mainly adjust three parameters: hispeed_freq,target_loads,timer_rate:

1. hispeed_freq: select an appropriate transition frequency, to make cpu stable in the
medium frequency, with the best power consumption, too large or too small will cause cpu
jump to high frequency easily and increase the power consumption.
2. target_loads:easier to run with low frequency after this value is increased, both the
power consumption and the performance will be reduced.
3. timer_rate: easier to run with low frequency after this value is increased, both the
power consumption and the performance will be reduced.
  • Close some cpu, limit the highest frequency of cpu.
1
2
3
4
5
6
/* close cpu2,cpu3 */
echo 0 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu3/online

/* set the max frequency of cpu0 to 1200MHz */
echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

2. DDR optimization

  • Frequency scaling with scenario: configure different DDR frequencies for different scenarios, such as
    4K video, video recording, dual display and so on.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* scenario definition */
kernel/include/dt-bindings/soc/rockchip-system-status.h
#define SYS_STATUS_NORMAL (1 << 0)
#define SYS_STATUS_SUSPEND (1 << 1)
#define SYS_STATUS_IDLE (1 << 2)
#define SYS_STATUS_REBOOT (1 << 3)
#define SYS_STATUS_VIDEO_4K (1 << 4)
#define SYS_STATUS_VIDEO_1080P (1 << 5)
#define SYS_STATUS_GPU (1 << 6)
#define SYS_STATUS_RGA (1 << 7)
#define SYS_STATUS_CIF0 (1 << 8)
#define SYS_STATUS_CIF1 (1 << 9)
#define SYS_STATUS_LCDC0 (1 << 10)
#define SYS_STATUS_LCDC1 (1 << 11)
#define SYS_STATUS_BOOST (1 << 12)
#define SYS_STATUS_PERFORMANCE (1 << 13)
#define SYS_STATUS_ISP (1 << 14)
#define SYS_STATUS_HDMI (1 << 15)
#define SYS_STATUS_VIDEO_4K_10B (1 << 16)
#define SYS_STATUS_LOW_POWER (1 << 17)

#define SYS_STATUS_VIDEO (SYS_STATUS_VIDEO_4K | \
SYS_STATUS_VIDEO_1080P | \
SYS_STATUS_VIDEO_4K_10B)
#define SYS_STATUS_DUALVIEW (SYS_STATUS_LCDC0 | SYS_STATUS_LCDC1)

...

/* configure the frequencies for different scenarios in dts */
arch/arm64/boot/dts/rockchip/rk3399-ax2170.dtsi
&dmc {
status = "okay";
center-supply = <&vdd_center>;
upthreshold = <40>;
downdifferential = <20>;
system-status-freq = <
/*system status freq(KHz)*/
SYS_STATUS_NORMAL 856000
SYS_STATUS_REBOOT 856000
SYS_STATUS_SUSPEND 328000
SYS_STATUS_VIDEO_1080P 666000
SYS_STATUS_VIDEO_4K 856000
SYS_STATUS_VIDEO_4K_10B 856000
SYS_STATUS_PERFORMANCE 856000
SYS_STATUS_BOOST 856000
SYS_STATUS_DUALVIEW 856000
SYS_STATUS_ISP 856000
>;
vop-bw-dmc-freq = <
/* min_bw(MB/s) max_bw(MB/s) freq(KHz) */
0 762 416000
763 3012 666000
3013 99999 856000
>;

vop-pn-msch-readlatency = <
0 0x20
4 0x20
>;

auto-min-freq = <328000>;
auto-freq-en = <0>;
};

/* acquire the current scenario */
cat /sys/class/devfreq/dmc/system_status
0x401
  • Frequency scaling with loading: monitor the loading, automatically adjust DDR frequency, frequency
    scaling with loading may cause the reduction of the performance, you can fix DDR frequency in some
    scenario considering the frequency scaling with scenario.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* configure the parameter of frequency scaling with loading in dts, need to open dfi 
node to monitor DDR utility ratio */
dmc: dmc {
compatible = "rockchip,px30-dmc";
...

/* use dfi to monitor the utility ratio of DDR */
devfreq-events = <&dfi>;
/*
* the threshold of frequency scaling:
* when the utility ratio is over 40%, adjust to the highest frequency.
* when the loading is less than 40% and larger than 40%-20%, maintain current
frequency.

* when the loading is less than 40%-20%, it will adjust the frequency to a certain
value to make the loading to be around 40%-2%/2.

*/
upthreshold = <40>;
downdifferential = <20>;

/* check the DDR loading of current system */
cat /sys/class/devfreq/dmc/load
33@528000000Hz
  • For more detailed configuration and optimization of DDR DEVFREQ, please refer to the document
    《Rockchip-Developer-Guide-Linux4.4-Devfreq》.

3. Thermal control optimization

When the temperature is increasing to certain degree, the power consumption will increase dramatically,
especially in the case with high voltage.

  • Improve the heat dissipation of hardware.
  • Optimize the software thermal control strategy to avoid the big temperature fluctuation.
  • Avoid the high voltage occurring in the case with high temperature through software limitation.
1
2
3
4
5
6
7
8
&cpu0_opp_table {
/* when the temperature is over 85 degree, limit the max voltage of cpu to 1.1V */
rockchip,high-temp = <85000>;
rockchip,high-temp-max-volt = <1100000>;

/* or directly limit the max frequency to avoid the high voltage */
rockchip,high-temp-max-freq = <1008000>;
}

4. Power optimization

  • In voltage conversion circuit, when the voltage reduction and current are relatively large, it is
    recommended to use DCDC to improve the efficiency and reduce the power consumption.

For example:
Input 3.3V, output 1.0V-50mA
|Power Type | Input Current | Power Consumption |
| — | — | — |
| LDO | 50mA | 165mW |
| DCDC(with 80% efficiency) | 18.9mA | 62.4mW |