Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: dts: vexpress-v2p-ca15_a7: Add cpu dynamic-power-coefficient information

A CPUfreq driver, like the ARM big.LITTLE driver used on the TC2 board,
which provide the Energy Model with power cost information via the
PM_OPP of_dev_pm_opp_get_cpu_power() function, do need the
dynamic-power-coefficient (C) in the device tree.

Method used to obtain the C value:

C is computed by measuring energy (E) consumption of a frequency domain
(FD) over a 10s runtime (t) sysbench workload running at each Operating
Performance Point (OPP) affine to 1 or 2 CPUs of that FD while the other
CPUs of the system are hotplugged out.

By definition all CPUs of a FD have the the same micro-architecture. An
OPP is characterized by a certain frequency (f) and voltage (V) value.
The corresponding power values (P) are calculated by dividing the delta
of the E values between the runs with 2 and 1 CPUs by t.

With n data tuples (P, f, V), n equal to number of OPPs for this
frequency domain, we can solve C by:

P = Pstat + Pdyn

P = Pstat + CV²f

Cx = (Px - P1)/(Vx²fx - V1²f1) with x = {2, ..., n}

The C value is the arithmetic mean out of {C2, ..., Cn}.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

authored by

Dietmar Eggemann and committed by
Sudeep Holla
cc0dbf43 01980aa7

+5
+5
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
··· 42 42 cci-control-port = <&cci_control1>; 43 43 cpu-idle-states = <&CLUSTER_SLEEP_BIG>; 44 44 capacity-dmips-mhz = <1024>; 45 + dynamic-power-coefficient = <990>; 45 46 }; 46 47 47 48 cpu1: cpu@1 { ··· 52 51 cci-control-port = <&cci_control1>; 53 52 cpu-idle-states = <&CLUSTER_SLEEP_BIG>; 54 53 capacity-dmips-mhz = <1024>; 54 + dynamic-power-coefficient = <990>; 55 55 }; 56 56 57 57 cpu2: cpu@2 { ··· 62 60 cci-control-port = <&cci_control2>; 63 61 cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>; 64 62 capacity-dmips-mhz = <516>; 63 + dynamic-power-coefficient = <133>; 65 64 }; 66 65 67 66 cpu3: cpu@3 { ··· 72 69 cci-control-port = <&cci_control2>; 73 70 cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>; 74 71 capacity-dmips-mhz = <516>; 72 + dynamic-power-coefficient = <133>; 75 73 }; 76 74 77 75 cpu4: cpu@4 { ··· 82 78 cci-control-port = <&cci_control2>; 83 79 cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>; 84 80 capacity-dmips-mhz = <516>; 81 + dynamic-power-coefficient = <133>; 85 82 }; 86 83 87 84 idle-states {