arm64: dts: qcom: sm8150: Add CPU opp tables
authorThara Gopinath <thara.gopinath@linaro.org>
Wed, 14 Jul 2021 18:26:10 +0000 (14:26 -0400)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 19 Jul 2021 19:54:00 +0000 (14:54 -0500)
Add OPP tables to scale DDR and L3 with CPUs for SM8150 SoCs.
This gives a significant performance boost for cpu-ddr loads.
Below is the results for mbw benchmark with and without the opp tables.

/mbw 1500
Without l3/ddr scaling With l3 ddr/scaling
MEMCPY(MiB/s) 3574 10448
DUMB(MiB/s) 3500 11721
MCBLOCK(MiB/s) 8976 23595

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Link: https://lore.kernel.org/r/20210714182610.92972-1-thara.gopinath@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sm8150.dtsi

index 612dda0fef43852623240b2d8598b274efbe9f51..96567048983060441eb4c157e93443a693c6bd9f 100644 (file)
@@ -13,6 +13,7 @@
 #include <dt-bindings/clock/qcom,gcc-sm8150.h>
 #include <dt-bindings/clock/qcom,gpucc-sm8150.h>
 #include <dt-bindings/interconnect/qcom,osm-l3.h>
+#include <dt-bindings/interconnect/qcom,sm8150.h>
 #include <dt-bindings/thermal/thermal.h>
 
 / {
@@ -52,6 +53,9 @@
                        dynamic-power-coefficient = <232>;
                        next-level-cache = <&L2_0>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD0>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
@@ -73,6 +77,9 @@
                        dynamic-power-coefficient = <232>;
                        next-level-cache = <&L2_100>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD1>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
@@ -92,6 +99,9 @@
                        dynamic-power-coefficient = <232>;
                        next-level-cache = <&L2_200>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD2>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                        dynamic-power-coefficient = <232>;
                        next-level-cache = <&L2_300>;
                        qcom,freq-domain = <&cpufreq_hw 0>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD3>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                        dynamic-power-coefficient = <369>;
                        next-level-cache = <&L2_400>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       operating-points-v2 = <&cpu4_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD4>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                        dynamic-power-coefficient = <369>;
                        next-level-cache = <&L2_500>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       operating-points-v2 = <&cpu4_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD5>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                        dynamic-power-coefficient = <369>;
                        next-level-cache = <&L2_600>;
                        qcom,freq-domain = <&cpufreq_hw 1>;
+                       operating-points-v2 = <&cpu4_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD6>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                        dynamic-power-coefficient = <421>;
                        next-level-cache = <&L2_700>;
                        qcom,freq-domain = <&cpufreq_hw 2>;
+                       operating-points-v2 = <&cpu7_opp_table>;
+                       interconnects = <&gem_noc MASTER_AMPSS_M0 &mc_virt SLAVE_EBI_CH0>,
+                                       <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
                        power-domains = <&CPU_PD7>;
                        power-domain-names = "psci";
                        #cooling-cells = <2>;
                };
        };
 
+       cpu0_opp_table: cpu0_opp_table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               cpu0_opp1: opp-300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-peak-kBps = <800000 9600000>;
+               };
+
+               cpu0_opp2: opp-403200000 {
+                       opp-hz = /bits/ 64 <403200000>;
+                       opp-peak-kBps = <800000 9600000>;
+               };
+
+               cpu0_opp3: opp-499200000 {
+                       opp-hz = /bits/ 64 <499200000>;
+                       opp-peak-kBps = <800000 12902400>;
+               };
+
+               cpu0_opp4: opp-576000000 {
+                       opp-hz = /bits/ 64 <576000000>;
+                       opp-peak-kBps = <800000 12902400>;
+               };
+
+               cpu0_opp5: opp-672000000 {
+                       opp-hz = /bits/ 64 <672000000>;
+                       opp-peak-kBps = <800000 15974400>;
+               };
+
+               cpu0_opp6: opp-768000000 {
+                       opp-hz = /bits/ 64 <576000000>;
+                       opp-peak-kBps = <1804000 19660800>;
+               };
+
+               cpu0_opp7: opp-844800000 {
+                       opp-hz = /bits/ 64 <844800000>;
+                       opp-peak-kBps = <1804000 19660800>;
+               };
+
+               cpu0_opp8: opp-940800000 {
+                       opp-hz = /bits/ 64 <940800000>;
+                       opp-peak-kBps = <1804000 22732800>;
+               };
+
+               cpu0_opp9: opp-1036800000 {
+                       opp-hz = /bits/ 64 <1036800000>;
+                       opp-peak-kBps = <1804000 22732800>;
+               };
+
+               cpu0_opp10: opp-1113600000 {
+                       opp-hz = /bits/ 64 <1113600000>;
+                       opp-peak-kBps = <2188000 25804800>;
+               };
+
+               cpu0_opp11: opp-1209600000 {
+                       opp-hz = /bits/ 64 <1209600000>;
+                       opp-peak-kBps = <2188000 31948800>;
+               };
+
+               cpu0_opp12: opp-1305600000 {
+                       opp-hz = /bits/ 64 <1305600000>;
+                       opp-peak-kBps = <3072000 31948800>;
+               };
+
+               cpu0_opp13: opp-1382400000 {
+                       opp-hz = /bits/ 64 <1382400000>;
+                       opp-peak-kBps = <3072000 31948800>;
+               };
+
+               cpu0_opp14: opp-1478400000 {
+                       opp-hz = /bits/ 64 <1478400000>;
+                       opp-peak-kBps = <3072000 31948800>;
+               };
+
+               cpu0_opp15: opp-1555200000 {
+                       opp-hz = /bits/ 64 <1555200000>;
+                       opp-peak-kBps = <3072000 40550400>;
+               };
+
+               cpu0_opp16: opp-1632000000 {
+                       opp-hz = /bits/ 64 <1632000000>;
+                       opp-peak-kBps = <3072000 40550400>;
+               };
+
+               cpu0_opp17: opp-1708800000 {
+                       opp-hz = /bits/ 64 <1708800000>;
+                       opp-peak-kBps = <3072000 43008000>;
+               };
+
+               cpu0_opp18: opp-1785600000 {
+                       opp-hz = /bits/ 64 <1785600000>;
+                       opp-peak-kBps = <3072000 43008000>;
+               };
+       };
+
+       cpu4_opp_table: cpu4_opp_table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               cpu4_opp1: opp-710400000 {
+                       opp-hz = /bits/ 64 <710400000>;
+                       opp-peak-kBps = <1804000 15974400>;
+               };
+
+               cpu4_opp2: opp-825600000 {
+                       opp-hz = /bits/ 64 <825600000>;
+                       opp-peak-kBps = <2188000 19660800>;
+               };
+
+               cpu4_opp3: opp-940800000 {
+                       opp-hz = /bits/ 64 <940800000>;
+                       opp-peak-kBps = <2188000 22732800>;
+               };
+
+               cpu4_opp4: opp-1056000000 {
+                       opp-hz = /bits/ 64 <1056000000>;
+                       opp-peak-kBps = <3072000 25804800>;
+               };
+
+               cpu4_opp5: opp-1171200000 {
+                       opp-hz = /bits/ 64 <1171200000>;
+                       opp-peak-kBps = <3072000 31948800>;
+               };
+
+               cpu4_opp6: opp-1286400000 {
+                       opp-hz = /bits/ 64 <1286400000>;
+                       opp-peak-kBps = <4068000 31948800>;
+               };
+
+               cpu4_opp7: opp-1401600000 {
+                       opp-hz = /bits/ 64 <1401600000>;
+                       opp-peak-kBps = <4068000 31948800>;
+               };
+
+               cpu4_opp8: opp-1497600000 {
+                       opp-hz = /bits/ 64 <1497600000>;
+                       opp-peak-kBps = <4068000 40550400>;
+               };
+
+               cpu4_opp9: opp-1612800000 {
+                       opp-hz = /bits/ 64 <1612800000>;
+                       opp-peak-kBps = <4068000 40550400>;
+               };
+
+               cpu4_opp10: opp-1708800000 {
+                       opp-hz = /bits/ 64 <1708800000>;
+                       opp-peak-kBps = <4068000 43008000>;
+               };
+
+               cpu4_opp11: opp-1804800000 {
+                       opp-hz = /bits/ 64 <1804800000>;
+                       opp-peak-kBps = <6220000 43008000>;
+               };
+
+               cpu4_opp12: opp-1920000000 {
+                       opp-hz = /bits/ 64 <1920000000>;
+                       opp-peak-kBps = <6220000 49152000>;
+               };
+
+               cpu4_opp13: opp-2016000000 {
+                       opp-hz = /bits/ 64 <2016000000>;
+                       opp-peak-kBps = <7216000 49152000>;
+               };
+
+               cpu4_opp14: opp-2131200000 {
+                       opp-hz = /bits/ 64 <2131200000>;
+                       opp-peak-kBps = <8368000 49152000>;
+               };
+
+               cpu4_opp15: opp-2227200000 {
+                       opp-hz = /bits/ 64 <2227200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu4_opp16: opp-2323200000 {
+                       opp-hz = /bits/ 64 <2323200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu4_opp17: opp-2419200000 {
+                       opp-hz = /bits/ 64 <2419200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+       };
+
+       cpu7_opp_table: cpu7_opp_table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               cpu7_opp1: opp-825600000 {
+                       opp-hz = /bits/ 64 <825600000>;
+                       opp-peak-kBps = <2188000 19660800>;
+               };
+
+               cpu7_opp2: opp-940800000 {
+                       opp-hz = /bits/ 64 <940800000>;
+                       opp-peak-kBps = <2188000 22732800>;
+               };
+
+               cpu7_opp3: opp-1056000000 {
+                       opp-hz = /bits/ 64 <1056000000>;
+                       opp-peak-kBps = <3072000 25804800>;
+               };
+
+               cpu7_opp4: opp-1171200000 {
+                       opp-hz = /bits/ 64 <1171200000>;
+                       opp-peak-kBps = <3072000 31948800>;
+               };
+
+               cpu7_opp5: opp-1286400000 {
+                       opp-hz = /bits/ 64 <1286400000>;
+                       opp-peak-kBps = <4068000 31948800>;
+               };
+
+               cpu7_opp6: opp-1401600000 {
+                       opp-hz = /bits/ 64 <1401600000>;
+                       opp-peak-kBps = <4068000 31948800>;
+               };
+
+               cpu7_opp7: opp-1497600000 {
+                       opp-hz = /bits/ 64 <1497600000>;
+                       opp-peak-kBps = <4068000 40550400>;
+               };
+
+               cpu7_opp8: opp-1612800000 {
+                       opp-hz = /bits/ 64 <1612800000>;
+                       opp-peak-kBps = <4068000 40550400>;
+               };
+
+               cpu7_opp9: opp-1708800000 {
+                       opp-hz = /bits/ 64 <1708800000>;
+                       opp-peak-kBps = <4068000 43008000>;
+               };
+
+               cpu7_opp10: opp-1804800000 {
+                       opp-hz = /bits/ 64 <1804800000>;
+                       opp-peak-kBps = <6220000 43008000>;
+               };
+
+               cpu7_opp11: opp-1920000000 {
+                       opp-hz = /bits/ 64 <1920000000>;
+                       opp-peak-kBps = <6220000 49152000>;
+               };
+
+               cpu7_opp12: opp-2016000000 {
+                       opp-hz = /bits/ 64 <2016000000>;
+                       opp-peak-kBps = <7216000 49152000>;
+               };
+
+               cpu7_opp13: opp-2131200000 {
+                       opp-hz = /bits/ 64 <2131200000>;
+                       opp-peak-kBps = <8368000 49152000>;
+               };
+
+               cpu7_opp14: opp-2227200000 {
+                       opp-hz = /bits/ 64 <2227200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp15: opp-2323200000 {
+                       opp-hz = /bits/ 64 <2323200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp16: opp-2419200000 {
+                       opp-hz = /bits/ 64 <2419200000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp17: opp-2534400000 {
+                       opp-hz = /bits/ 64 <2534400000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp18: opp-2649600000 {
+                       opp-hz = /bits/ 64 <2649600000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp19: opp-2745600000 {
+                       opp-hz = /bits/ 64 <2745600000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+
+               cpu7_opp20: opp-2841600000 {
+                       opp-hz = /bits/ 64 <2841600000>;
+                       opp-peak-kBps = <8368000 51609600>;
+               };
+       };
+
        firmware {
                scm: scm {
                        compatible = "qcom,scm-sm8150", "qcom,scm";