1 ==========================================
2 ARM CPUs capacity bindings
3 ==========================================
5 ==========================================
7 ==========================================
9 ARM systems may be configured to have cpus with different power/performance
10 characteristics within the same chip. In this case, additional information has
11 to be made available to the kernel for it to be aware of such differences and
12 take decisions accordingly.
14 ==========================================
15 2 - CPU capacity definition
16 ==========================================
18 CPU capacity is a number that provides the scheduler information about CPUs
19 heterogeneity. Such heterogeneity can come from micro-architectural differences
20 (e.g., ARM big.LITTLE systems) or maximum frequency at which CPUs can run
21 (e.g., SMP systems with multiple frequency domains). Heterogeneity in this
22 context is about differing performance characteristics; this binding tries to
23 capture a first-order approximation of the relative performance of CPUs.
25 CPU capacities are obtained by running a suitable benchmark. This binding makes
26 no guarantees on the validity or suitability of any particular benchmark, the
27 final capacity should, however, be:
29 * A "single-threaded" or CPU affine benchmark
30 * Divided by the running frequency of the CPU executing the benchmark
31 * Not subject to dynamic frequency scaling of the CPU
33 For the time being we however advise usage of the Dhrystone benchmark. What
36 CPU capacities are obtained by running the Dhrystone benchmark on each CPU at
37 max frequency (with caches enabled). The obtained DMIPS score is then divided
38 by the frequency (in MHz) at which the benchmark has been run, so that
39 DMIPS/MHz are obtained. Such values are then normalized w.r.t. the highest
40 score obtained in the system.
42 ==========================================
43 3 - capacity-dmips-mhz
44 ==========================================
46 capacity-dmips-mhz is an optional cpu node [1] property: u32 value
47 representing CPU capacity expressed in normalized DMIPS/MHz. At boot time, the
48 maximum frequency available to the cpu is then used to calculate the capacity
49 value internally used by the kernel.
51 capacity-dmips-mhz property is all-or-nothing: if it is specified for a cpu
52 node, it has to be specified for every other cpu nodes, or the system will
53 fall back to the default capacity value for every CPU. If cpufreq is not
54 available, final capacities are calculated by directly using capacity-dmips-
55 mhz values (normalized w.r.t. the highest value found while parsing the DT).
57 ===========================================
59 ===========================================
61 Example 1 (ARM 64-bit, 6-cpu system, two clusters):
62 capacities-dmips-mhz are scaled w.r.t. 1024 (cpu@0 and cpu@1)
63 supposing cluster0@max-freq=1100 and custer1@max-freq=850,
64 final capacities are 1024 for cluster0 and 446 for cluster1
97 entry-method = "arm,psci";
99 CPU_SLEEP_0: cpu-sleep-0 {
100 compatible = "arm,idle-state";
101 arm,psci-suspend-param = <0x0010000>;
103 entry-latency-us = <100>;
104 exit-latency-us = <250>;
105 min-residency-us = <150>;
108 CLUSTER_SLEEP_0: cluster-sleep-0 {
109 compatible = "arm,idle-state";
110 arm,psci-suspend-param = <0x1010000>;
112 entry-latency-us = <800>;
113 exit-latency-us = <700>;
114 min-residency-us = <2500>;
119 compatible = "arm,cortex-a57","arm,armv8";
122 enable-method = "psci";
123 next-level-cache = <&A57_L2>;
124 clocks = <&scpi_dvfs 0>;
125 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
126 capacity-dmips-mhz = <1024>;
130 compatible = "arm,cortex-a57","arm,armv8";
133 enable-method = "psci";
134 next-level-cache = <&A57_L2>;
135 clocks = <&scpi_dvfs 0>;
136 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
137 capacity-dmips-mhz = <1024>;
141 compatible = "arm,cortex-a53","arm,armv8";
144 enable-method = "psci";
145 next-level-cache = <&A53_L2>;
146 clocks = <&scpi_dvfs 1>;
147 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
148 capacity-dmips-mhz = <578>;
152 compatible = "arm,cortex-a53","arm,armv8";
155 enable-method = "psci";
156 next-level-cache = <&A53_L2>;
157 clocks = <&scpi_dvfs 1>;
158 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
159 capacity-dmips-mhz = <578>;
163 compatible = "arm,cortex-a53","arm,armv8";
166 enable-method = "psci";
167 next-level-cache = <&A53_L2>;
168 clocks = <&scpi_dvfs 1>;
169 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
170 capacity-dmips-mhz = <578>;
174 compatible = "arm,cortex-a53","arm,armv8";
177 enable-method = "psci";
178 next-level-cache = <&A53_L2>;
179 clocks = <&scpi_dvfs 1>;
180 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
181 capacity-dmips-mhz = <578>;
185 compatible = "cache";
189 compatible = "cache";
193 Example 2 (ARM 32-bit, 4-cpu system, two clusters,
194 cpus 0,1@1GHz, cpus 2,3@500MHz):
195 capacities-dmips-mhz are scaled w.r.t. 2 (cpu@0 and cpu@1), this means that first
196 cpu@0 and cpu@1 are twice fast than cpu@2 and cpu@3 (at the same frequency)
199 #address-cells = <1>;
204 compatible = "arm,cortex-a15";
206 capacity-dmips-mhz = <2>;
211 compatible = "arm,cortex-a15";
213 capacity-dmips-mhz = <2>;
218 compatible = "arm,cortex-a15";
220 capacity-dmips-mhz = <1>;
225 compatible = "arm,cortex-a15";
227 capacity-dmips-mhz = <1>;
231 ===========================================
233 ===========================================
235 [1] ARM Linux Kernel documentation - CPUs bindings
236 Documentation/devicetree/bindings/arm/cpus.txt