arm64: dts: qcom: sc7180: Add cpuidle low power states
authorMaulik Shah <mkshah@codeaurora.org>
Sun, 12 Apr 2020 14:49:59 +0000 (20:19 +0530)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 14 Apr 2020 05:05:31 +0000 (22:05 -0700)
Add device bindings for cpuidle states for cpu devices.

Cc: devicetree@vger.kernel.orgi
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Srinivas Rao L <lsrao@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1586703004-13674-2-git-send-email-mkshah@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sc7180.dtsi

index 25a1790..2dba155 100644 (file)
@@ -95,6 +95,9 @@
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_0>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_100>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x200>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_200>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x300>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_300>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x400>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_400>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x500>;
                        enable-method = "psci";
+                       cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+                                          &LITTLE_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1024>;
                        dynamic-power-coefficient = <100>;
                        next-level-cache = <&L2_500>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x600>;
                        enable-method = "psci";
+                       cpu-idle-states = <&BIG_CPU_SLEEP_0
+                                          &BIG_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1740>;
                        dynamic-power-coefficient = <405>;
                        next-level-cache = <&L2_600>;
                        compatible = "qcom,kryo468";
                        reg = <0x0 0x700>;
                        enable-method = "psci";
+                       cpu-idle-states = <&BIG_CPU_SLEEP_0
+                                          &BIG_CPU_SLEEP_1
+                                          &CLUSTER_SLEEP_0>;
                        capacity-dmips-mhz = <1740>;
                        dynamic-power-coefficient = <405>;
                        next-level-cache = <&L2_700>;
                                };
                        };
                };
+
+               idle-states {
+                       entry-method = "psci";
+
+                       LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
+                               compatible = "arm,idle-state";
+                               idle-state-name = "little-power-down";
+                               arm,psci-suspend-param = <0x40000003>;
+                               entry-latency-us = <549>;
+                               exit-latency-us = <901>;
+                               min-residency-us = <1774>;
+                               local-timer-stop;
+                       };
+
+                       LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
+                               compatible = "arm,idle-state";
+                               idle-state-name = "little-rail-power-down";
+                               arm,psci-suspend-param = <0x40000004>;
+                               entry-latency-us = <702>;
+                               exit-latency-us = <915>;
+                               min-residency-us = <4001>;
+                               local-timer-stop;
+                       };
+
+                       BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
+                               compatible = "arm,idle-state";
+                               idle-state-name = "big-power-down";
+                               arm,psci-suspend-param = <0x40000003>;
+                               entry-latency-us = <523>;
+                               exit-latency-us = <1244>;
+                               min-residency-us = <2207>;
+                               local-timer-stop;
+                       };
+
+                       BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
+                               compatible = "arm,idle-state";
+                               idle-state-name = "big-rail-power-down";
+                               arm,psci-suspend-param = <0x40000004>;
+                               entry-latency-us = <526>;
+                               exit-latency-us = <1854>;
+                               min-residency-us = <5555>;
+                               local-timer-stop;
+                       };
+
+                       CLUSTER_SLEEP_0: cluster-sleep-0 {
+                               compatible = "arm,idle-state";
+                               idle-state-name = "cluster-power-down";
+                               arm,psci-suspend-param = <0x40003444>;
+                               entry-latency-us = <3263>;
+                               exit-latency-us = <6562>;
+                               min-residency-us = <9926>;
+                               local-timer-stop;
+                       };
+               };
        };
 
        memory@80000000 {