diff mbox series

arm64: dts: qcom: sc7180: Add cpuidle low power states

Message ID 1572408318-28681-2-git-send-email-mkshah@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series arm64: dts: qcom: sc7180: Add cpuidle low power states | expand

Commit Message

Maulik Shah Oct. 30, 2019, 4:05 a.m. UTC
Add device bindings for cpuidle states for cpu devices.

Cc: devicetree@vger.kernel.org
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 78 ++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

Comments

Sudeep Holla Oct. 30, 2019, 6:56 a.m. UTC | #1
On Wed, Oct 30, 2019 at 09:35:18AM +0530, Maulik Shah wrote:
> Add device bindings for cpuidle states for cpu devices.
> 

You are not adding bindings, but you are using the existing bindings I
believe. Anyways good to see a platform using PC mode for cpuidle/suspend.
What platforms does this sc7180 cover ? 

--
Regards,
Sudeep
Maulik Shah Nov. 1, 2019, 5:20 a.m. UTC | #2
On 10/30/2019 12:26 PM, Sudeep Holla wrote:
> On Wed, Oct 30, 2019 at 09:35:18AM +0530, Maulik Shah wrote:
>> Add device bindings for cpuidle states for cpu devices.
>>
> You are not adding bindings, but you are using the existing bindings I
> believe. Anyways good to see a platform using PC mode for cpuidle/suspend.
> What platforms does this sc7180 cover ?
>
> --
> Regards,
> Sudeep

Hi Sudeep,

sc7180 supports IDP platform.

Thanks,
Maulik
Stephen Boyd Nov. 4, 2019, 9:47 p.m. UTC | #3
Quoting Maulik Shah (2019-10-29 21:05:18)
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index fceac50..69d5e2c 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -157,12 +178,69 @@
[...]
> +                       CLUSTER_SLEEP_0: cluster-sleep-0 {
> +                               compatible = "arm,idle-state";
> +                               idle-state-name = "cluster-power-down";
> +                               arm,psci-suspend-param = <0x400000F4>;

Nitpick: Lowercase hex please.

> +                               entry-latency-us = <3263>;
> +                               exit-latency-us = <6562>;
> +                               min-residency-us = <9987>;
> +                               local-timer-stop;
> +                       };
> +               };
Matthias Kaehlcke Jan. 21, 2020, 11:44 p.m. UTC | #4
Hi Maulik,

what is the state of this patch? Sudeep and Stephen had comments requesting
minor changes, do you plan to send a v2 soon?

Thanks

Matthias

On Wed, Oct 30, 2019 at 09:35:18AM +0530, Maulik Shah wrote:
> Add device bindings for cpuidle states for cpu devices.
> 
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/sc7180.dtsi | 78 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 78 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index fceac50..69d5e2c 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -70,6 +70,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x0>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_0>;
>  			L2_0: l2-cache {
>  				compatible = "cache";
> @@ -85,6 +88,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x100>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_100>;
>  			L2_100: l2-cache {
>  				compatible = "cache";
> @@ -97,6 +103,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x200>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_200>;
>  			L2_200: l2-cache {
>  				compatible = "cache";
> @@ -109,6 +118,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x300>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_300>;
>  			L2_300: l2-cache {
>  				compatible = "cache";
> @@ -121,6 +133,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x400>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_400>;
>  			L2_400: l2-cache {
>  				compatible = "cache";
> @@ -133,6 +148,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x500>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
> +					   &LITTLE_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_500>;
>  			L2_500: l2-cache {
>  				compatible = "cache";
> @@ -145,6 +163,9 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x600>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&BIG_CPU_SLEEP_0
> +					   &BIG_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_600>;
>  			L2_600: l2-cache {
>  				compatible = "cache";
> @@ -157,12 +178,69 @@
>  			compatible = "arm,armv8";
>  			reg = <0x0 0x700>;
>  			enable-method = "psci";
> +			cpu-idle-states = <&BIG_CPU_SLEEP_0
> +					   &BIG_CPU_SLEEP_1
> +					   &CLUSTER_SLEEP_0>;
>  			next-level-cache = <&L2_700>;
>  			L2_700: l2-cache {
>  				compatible = "cache";
>  				next-level-cache = <&L3_0>;
>  			};
>  		};
> +
> +		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 = <350>;
> +				exit-latency-us = <461>;
> +				min-residency-us = <1890>;
> +				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 = <360>;
> +				exit-latency-us = <531>;
> +				min-residency-us = <3934>;
> +				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 = <264>;
> +				exit-latency-us = <621>;
> +				min-residency-us = <952>;
> +				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 = <702>;
> +				exit-latency-us = <1061>;
> +				min-residency-us = <4488>;
> +				local-timer-stop;
> +			};
> +
> +			CLUSTER_SLEEP_0: cluster-sleep-0 {
> +				compatible = "arm,idle-state";
> +				idle-state-name = "cluster-power-down";
> +				arm,psci-suspend-param = <0x400000F4>;
> +				entry-latency-us = <3263>;
> +				exit-latency-us = <6562>;
> +				min-residency-us = <9987>;
> +				local-timer-stop;
> +			};
> +		};
>  	};
>  
>  	memory@80000000 {
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
Maulik Shah Jan. 25, 2020, 3:39 p.m. UTC | #5
Hi Matthias,

Yes, i will post new version very soon.

Thanks,

Maulik


On 1/22/2020 5:14 AM, Matthias Kaehlcke wrote:
> Hi Maulik,
>
> what is the state of this patch? Sudeep and Stephen had comments requesting
> minor changes, do you plan to send a v2 soon?
>
> Thanks
>
> Matthias
>
> On Wed, Oct 30, 2019 at 09:35:18AM +0530, Maulik Shah wrote:
>> Add device bindings for cpuidle states for cpu devices.
>>
>> Cc: devicetree@vger.kernel.org
>> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
>> ---
>>   arch/arm64/boot/dts/qcom/sc7180.dtsi | 78 ++++++++++++++++++++++++++++++++++++
>>   1 file changed, 78 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> index fceac50..69d5e2c 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
>> @@ -70,6 +70,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x0>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_0>;
>>   			L2_0: l2-cache {
>>   				compatible = "cache";
>> @@ -85,6 +88,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x100>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_100>;
>>   			L2_100: l2-cache {
>>   				compatible = "cache";
>> @@ -97,6 +103,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x200>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_200>;
>>   			L2_200: l2-cache {
>>   				compatible = "cache";
>> @@ -109,6 +118,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x300>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_300>;
>>   			L2_300: l2-cache {
>>   				compatible = "cache";
>> @@ -121,6 +133,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x400>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_400>;
>>   			L2_400: l2-cache {
>>   				compatible = "cache";
>> @@ -133,6 +148,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x500>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
>> +					   &LITTLE_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_500>;
>>   			L2_500: l2-cache {
>>   				compatible = "cache";
>> @@ -145,6 +163,9 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x600>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&BIG_CPU_SLEEP_0
>> +					   &BIG_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_600>;
>>   			L2_600: l2-cache {
>>   				compatible = "cache";
>> @@ -157,12 +178,69 @@
>>   			compatible = "arm,armv8";
>>   			reg = <0x0 0x700>;
>>   			enable-method = "psci";
>> +			cpu-idle-states = <&BIG_CPU_SLEEP_0
>> +					   &BIG_CPU_SLEEP_1
>> +					   &CLUSTER_SLEEP_0>;
>>   			next-level-cache = <&L2_700>;
>>   			L2_700: l2-cache {
>>   				compatible = "cache";
>>   				next-level-cache = <&L3_0>;
>>   			};
>>   		};
>> +
>> +		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 = <350>;
>> +				exit-latency-us = <461>;
>> +				min-residency-us = <1890>;
>> +				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 = <360>;
>> +				exit-latency-us = <531>;
>> +				min-residency-us = <3934>;
>> +				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 = <264>;
>> +				exit-latency-us = <621>;
>> +				min-residency-us = <952>;
>> +				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 = <702>;
>> +				exit-latency-us = <1061>;
>> +				min-residency-us = <4488>;
>> +				local-timer-stop;
>> +			};
>> +
>> +			CLUSTER_SLEEP_0: cluster-sleep-0 {
>> +				compatible = "arm,idle-state";
>> +				idle-state-name = "cluster-power-down";
>> +				arm,psci-suspend-param = <0x400000F4>;
>> +				entry-latency-us = <3263>;
>> +				exit-latency-us = <6562>;
>> +				min-residency-us = <9987>;
>> +				local-timer-stop;
>> +			};
>> +		};
>>   	};
>>   
>>   	memory@80000000 {
>> -- 
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
>> of Code Aurora Forum, hosted by The Linux Foundation
>>
Maulik Shah Feb. 4, 2020, 5:48 a.m. UTC | #6
Hi Matthias,

this change is part of series @ 
https://patchwork.kernel.org/cover/11362717/

Thanks,

Maulik


On 1/25/2020 9:09 PM, Maulik Shah wrote:
> Hi Matthias,
>
> Yes, i will post new version very soon.
>
> Thanks,
>
> Maulik
>
>
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index fceac50..69d5e2c 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -70,6 +70,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x0>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_0>;
 			L2_0: l2-cache {
 				compatible = "cache";
@@ -85,6 +88,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x100>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_100>;
 			L2_100: l2-cache {
 				compatible = "cache";
@@ -97,6 +103,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x200>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_200>;
 			L2_200: l2-cache {
 				compatible = "cache";
@@ -109,6 +118,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x300>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_300>;
 			L2_300: l2-cache {
 				compatible = "cache";
@@ -121,6 +133,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x400>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_400>;
 			L2_400: l2-cache {
 				compatible = "cache";
@@ -133,6 +148,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x500>;
 			enable-method = "psci";
+			cpu-idle-states = <&LITTLE_CPU_SLEEP_0
+					   &LITTLE_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_500>;
 			L2_500: l2-cache {
 				compatible = "cache";
@@ -145,6 +163,9 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x600>;
 			enable-method = "psci";
+			cpu-idle-states = <&BIG_CPU_SLEEP_0
+					   &BIG_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_600>;
 			L2_600: l2-cache {
 				compatible = "cache";
@@ -157,12 +178,69 @@ 
 			compatible = "arm,armv8";
 			reg = <0x0 0x700>;
 			enable-method = "psci";
+			cpu-idle-states = <&BIG_CPU_SLEEP_0
+					   &BIG_CPU_SLEEP_1
+					   &CLUSTER_SLEEP_0>;
 			next-level-cache = <&L2_700>;
 			L2_700: l2-cache {
 				compatible = "cache";
 				next-level-cache = <&L3_0>;
 			};
 		};
+
+		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 = <350>;
+				exit-latency-us = <461>;
+				min-residency-us = <1890>;
+				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 = <360>;
+				exit-latency-us = <531>;
+				min-residency-us = <3934>;
+				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 = <264>;
+				exit-latency-us = <621>;
+				min-residency-us = <952>;
+				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 = <702>;
+				exit-latency-us = <1061>;
+				min-residency-us = <4488>;
+				local-timer-stop;
+			};
+
+			CLUSTER_SLEEP_0: cluster-sleep-0 {
+				compatible = "arm,idle-state";
+				idle-state-name = "cluster-power-down";
+				arm,psci-suspend-param = <0x400000F4>;
+				entry-latency-us = <3263>;
+				exit-latency-us = <6562>;
+				min-residency-us = <9987>;
+				local-timer-stop;
+			};
+		};
 	};
 
 	memory@80000000 {