OSDN Git Service

ANDROID: arm64: Add Energy Model to dtb for Juno-r0 and Juno-r2
authorChris Redpath <chris.redpath@arm.com>
Wed, 25 Oct 2017 15:13:54 +0000 (16:13 +0100)
committerChris Redpath <chris.redpath@arm.com>
Tue, 19 Dec 2017 16:36:50 +0000 (16:36 +0000)
Change-Id: I0f67de02aec186c700184af60c355fac3158e2d6
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
arch/arm64/boot/dts/arm/juno-r2.dts
arch/arm64/boot/dts/arm/juno-sched-energy.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/arm/juno.dts

index b39b6d6..d2467e4 100644 (file)
@@ -98,6 +98,7 @@
                        next-level-cache = <&A72_L2>;
                        clocks = <&scpi_dvfs 0>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A72 &CLUSTER_COST_A72>;
                        capacity-dmips-mhz = <1024>;
                };
 
                        next-level-cache = <&A72_L2>;
                        clocks = <&scpi_dvfs 0>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A72 &CLUSTER_COST_A72>;
                        capacity-dmips-mhz = <1024>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53R2 &CLUSTER_COST_A53R2>;
                        capacity-dmips-mhz = <485>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53R2 &CLUSTER_COST_A53R2>;
                        capacity-dmips-mhz = <485>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53R2 &CLUSTER_COST_A53R2>;
                        capacity-dmips-mhz = <485>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53R2 &CLUSTER_COST_A53R2>;
                        capacity-dmips-mhz = <485>;
                };
 
                        cache-line-size = <64>;
                        cache-sets = <1024>;
                };
+               /include/ "juno-sched-energy.dtsi"
        };
 
        pmu_a72 {
diff --git a/arch/arm64/boot/dts/arm/juno-sched-energy.dtsi b/arch/arm64/boot/dts/arm/juno-sched-energy.dtsi
new file mode 100644 (file)
index 0000000..7ffb255
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * ARM JUNO specific energy cost model data. There are no unit requirements for
+ * the data. Data can be normalized to any reference point, but the
+ * normalization must be consistent. That is, one bogo-joule/watt must be the
+ * same quantity for all data, but we don't care what it is.
+ */
+
+energy-costs {
+       /* Juno r0 Energy */
+       CPU_COST_A57: core-cost0 {
+               busy-cost-data = <
+                       417   168
+                       579   251
+                       744   359
+                       883   479
+                       1024   616
+               >;
+               idle-cost-data = <
+                       15
+                       15
+                        0
+                        0
+               >;
+       };
+       CPU_COST_A53: core-cost1 {
+               busy-cost-data = <
+                       235    33
+                       302    46
+                       368    61
+                       406    76
+                       447    93
+               >;
+               idle-cost-data = <
+                     6
+                     6
+                     0
+                     0
+               >;
+       };
+       CLUSTER_COST_A57: cluster-cost0 {
+               busy-cost-data = <
+                       417    24
+                       579    32
+                       744    43
+                       883    49
+                       1024    64
+               >;
+               idle-cost-data = <
+                        65
+                        65
+                        65
+                        24
+               >;
+       };
+       CLUSTER_COST_A53: cluster-cost1 {
+               busy-cost-data = <
+                       235    26
+                       303    30
+                       368    39
+                       406    47
+                       447    57
+               >;
+               idle-cost-data = <
+                       56
+                       56
+                       56
+                       17
+               >;
+       };
+       /* Juno r2 Energy */
+       CPU_COST_A72: core-cost2 {
+               busy-cost-data = <
+                       501   174
+                       849   344
+                       1024   526
+               >;
+               idle-cost-data = <
+                     48
+                     48
+                      0
+                      0
+               >;
+       };
+       CPU_COST_A53R2: core-cost3 {
+               busy-cost-data = <
+                       276    37
+                       501    59
+                       593   117
+               >;
+               idle-cost-data = <
+                     33
+                     33
+                     0
+                     0
+               >;
+       };
+       CLUSTER_COST_A72: cluster-cost2 {
+               busy-cost-data = <
+                       501    48
+                       849    73
+                       1024   107
+               >;
+               idle-cost-data = <
+                        48
+                        48
+                        48
+                        18
+               >;
+       };
+       CLUSTER_COST_A53R2: cluster-cost3 {
+               busy-cost-data = <
+                       276    41
+                       501    86
+                       593   107
+               >;
+               idle-cost-data = <
+                       41
+                       41
+                       41
+                       14
+               >;
+       };
+};
index c9236c4..ae5306a 100644 (file)
@@ -97,6 +97,7 @@
                        next-level-cache = <&A57_L2>;
                        clocks = <&scpi_dvfs 0>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A57 &CLUSTER_COST_A57>;
                        capacity-dmips-mhz = <1024>;
                };
 
                        next-level-cache = <&A57_L2>;
                        clocks = <&scpi_dvfs 0>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A57 &CLUSTER_COST_A57>;
                        capacity-dmips-mhz = <1024>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53 &CLUSTER_COST_A53>;
                        capacity-dmips-mhz = <578>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53 &CLUSTER_COST_A53>;
                        capacity-dmips-mhz = <578>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53 &CLUSTER_COST_A53>;
                        capacity-dmips-mhz = <578>;
                };
 
                        next-level-cache = <&A53_L2>;
                        clocks = <&scpi_dvfs 1>;
                        cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
+                       sched-energy-costs = <&CPU_COST_A53 &CLUSTER_COST_A53>;
                        capacity-dmips-mhz = <578>;
                };
 
                        cache-line-size = <64>;
                        cache-sets = <1024>;
                };
+               /include/ "juno-sched-energy.dtsi"
        };
 
        pmu_a57 {