idle: power: tl1 need support CPU idle [1/1]
authorYan Wang <yan.wang@amlogic.com>
Mon, 24 Dec 2018 06:51:28 +0000 (14:51 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 30 Jul 2019 11:01:58 +0000 (07:01 -0400)
PD#SWPL-3525

Problem:
tl1 need support cpu idle.

Solution:
tl1 enable cpu idle.

Verify:
T962x2 x301

Change-Id: I14179975bbc1856418abbf32bccbfbf8d8462e4f
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
arch/arm/boot/dts/amlogic/mesontl1.dtsi
arch/arm64/boot/dts/amlogic/mesontl1.dtsi

index ee98d4f..3a76a4c 100644 (file)
@@ -53,6 +53,7 @@
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
@@ -76,6 +77,7 @@
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                };
+
+               idle-states {
+                       entry-method = "arm,psci";
+                       CPU_SLEEP_0: cpu-sleep-0 {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x0010000>;
+                               local-timer-stop;
+                               entry-latency-us = <4000>;
+                               exit-latency-us = <4000>;
+                               min-residency-us = <9000>;
+                       };
+                       SYSTEM_SLEEP_0: system-sleep-0 {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x0020000>;
+                               local-timer-stop;
+                               entry-latency-us = <0x3fffffff>;
+                               exit-latency-us = <0x40000000>;
+                               min-residency-us = <0xffffffff>;
+                       };
+               };
        };
 
        timer {
index 87422e0..eb006f2 100644 (file)
@@ -53,6 +53,7 @@
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
@@ -76,6 +77,7 @@
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                                "dsu_pre_parent";
                        operating-points-v2 = <&cpu_opp_table0>;
                        cpu-supply = <&vddcpu0>;
+                       cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;
                        //cpu-idle-states = <&SYSTEM_SLEEP_0>;
                        voltage-tolerance = <0>;
                        clock-latency = <50000>;
                };
+
+               idle-states {
+                       entry-method = "arm,psci";
+                       CPU_SLEEP_0: cpu-sleep-0 {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x0010000>;
+                               local-timer-stop;
+                               entry-latency-us = <4000>;
+                               exit-latency-us = <4000>;
+                               min-residency-us = <9000>;
+                       };
+                       SYSTEM_SLEEP_0: system-sleep-0 {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x0020000>;
+                               local-timer-stop;
+                               entry-latency-us = <0x3fffffff>;
+                               exit-latency-us = <0x40000000>;
+                               min-residency-us = <0xffffffff>;
+                       };
+               };
        };
 
        timer {