chengshan / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
e336be
From f888da16628c150e23a80e9c24ed76d1cf8a94d2 Mon Sep 17 00:00:00 2001
e336be
From: Tony Xie <tony.xie@rock-chips.com>
e336be
Date: Fri, 24 Aug 2018 18:03:00 +0800
e336be
Subject: arm64: dts: rockchip: Add idle-states to device tree for rk3399
e336be
e336be
Add idle-states for cpu and cluster sleep states.
e336be
e336be
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
e336be
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
e336be
---
e336be
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 28 ++++++++++++++++++++++++++++
e336be
 1 file changed, 28 insertions(+)
e336be
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
e336be
index c88e603396f6..b426902189c0 100644
e336be
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
e336be
@@ -74,6 +74,7 @@
e336be
 			clocks = <&cru ARMCLKL>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <100>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
 		};
e336be
 
e336be
 		cpu_l1: cpu@1 {
e336be
@@ -84,6 +85,7 @@
e336be
 			clocks = <&cru ARMCLKL>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <100>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
 		};
e336be
 
e336be
 		cpu_l2: cpu@2 {
e336be
@@ -94,6 +96,7 @@
e336be
 			clocks = <&cru ARMCLKL>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <100>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
 		};
e336be
 
e336be
 		cpu_l3: cpu@3 {
e336be
@@ -104,6 +107,7 @@
e336be
 			clocks = <&cru ARMCLKL>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <100>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
 		};
e336be
 
e336be
 		cpu_b0: cpu@100 {
e336be
@@ -114,6 +118,7 @@
e336be
 			clocks = <&cru ARMCLKB>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <436>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
 		};
e336be
 
e336be
 		cpu_b1: cpu@101 {
e336be
@@ -124,6 +129,29 @@
e336be
 			clocks = <&cru ARMCLKB>;
e336be
 			#cooling-cells = <2>; /* min followed by max */
e336be
 			dynamic-power-coefficient = <436>;
e336be
+			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
e336be
+		};
e336be
+
e336be
+		idle-states {
e336be
+			entry-method = "psci";
e336be
+
e336be
+			CPU_SLEEP: cpu-sleep {
e336be
+				compatible = "arm,idle-state";
e336be
+				local-timer-stop;
e336be
+				arm,psci-suspend-param = <0x0010000>;
e336be
+				entry-latency-us = <120>;
e336be
+				exit-latency-us = <250>;
e336be
+				min-residency-us = <900>;
e336be
+			};
e336be
+
e336be
+			CLUSTER_SLEEP: cluster-sleep {
e336be
+				compatible = "arm,idle-state";
e336be
+				local-timer-stop;
e336be
+				arm,psci-suspend-param = <0x1010000>;
e336be
+				entry-latency-us = <400>;
e336be
+				exit-latency-us = <500>;
e336be
+				min-residency-us = <2000>;
e336be
+			};
e336be
 		};
e336be
 	};
e336be
 
e336be
-- 
e336be
cgit 1.2-0.3.lf.el7