diff mbox

[RFC,v2,12/12] ARM64: dts: Define CPU power domain for MSM8916

Message ID 1455310238-8963-13-git-send-email-lina.iyer@linaro.org (mailing list archive)
State RFC
Headers show

Commit Message

Lina Iyer Feb. 12, 2016, 8:50 p.m. UTC
Define power domain and the power states for the domain as defined by
the PSCI firmware. The 8916 firmware supports OS initiated method of
powering off the CPU clusters.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
Changes since RFC v1 -
- no cpu-map topology node

 arch/arm64/boot/dts/qcom/msm8916.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Stephen Boyd Feb. 26, 2016, 7:50 p.m. UTC | #1
On 02/12, Lina Iyer wrote:
> @@ -101,6 +105,27 @@
>  		};
>  	};
>  
> +	CPU_PD: cpu-pd@0 {
> +		#power-domain-cells = <0>;
> +		power-states = <&CLUSTER_RET>, <&CLUSTER_PWR_DWN>;

Why isn't this part of the psci node? PSCI is the node that's
providing the code/logic for the power domain.

> +	};
> +
> +	pd-power-states {
> +		CLUSTER_RET: power-state@1 {
> +			state-param = <0x1000010>;
> +			entry-latency-us = <500>;
> +			exit-latency-us = <500>;
> +			residency-us = <2000>;
> +		 };
> +
> +		CLUSTER_PWR_DWN: power-state@2 {
> +			state-param = <0x1000030>;
> +			entry-latency-us = <2000>;
> +			exit-latency-us = <2000>;
> +			residency-us = <6000>;
> +		};
> +	};
> +

And I would expect these to be put somewhere inside the power
domain provider as well? Is this documented somewhere?

>  	psci {
>  		compatible = "arm,psci-1.0";
>  		method = "smc";
Lina Iyer March 1, 2016, 7:41 p.m. UTC | #2
On Fri, Feb 26 2016 at 12:50 -0700, Stephen Boyd wrote:
>On 02/12, Lina Iyer wrote:
>> @@ -101,6 +105,27 @@
>>  		};
>>  	};
>>
>> +	CPU_PD: cpu-pd@0 {
>> +		#power-domain-cells = <0>;
>> +		power-states = <&CLUSTER_RET>, <&CLUSTER_PWR_DWN>;
>
>Why isn't this part of the psci node? PSCI is the node that's
>providing the code/logic for the power domain.
>
I like that idea too. 
Lorenzo, what do you think?

>> +	};
>> +
>> +	pd-power-states {
>> +		CLUSTER_RET: power-state@1 {
>> +			state-param = <0x1000010>;
>> +			entry-latency-us = <500>;
>> +			exit-latency-us = <500>;
>> +			residency-us = <2000>;
>> +		 };
>> +
>> +		CLUSTER_PWR_DWN: power-state@2 {
>> +			state-param = <0x1000030>;
>> +			entry-latency-us = <2000>;
>> +			exit-latency-us = <2000>;
>> +			residency-us = <6000>;
>> +		};
>> +	};
>> +
>
>And I would expect these to be put somewhere inside the power
>domain provider as well? Is this documented somewhere?
>
Not yet, they will be, when it is submitted. This the glue patch that I
use on top of Axel's series to read domain states from DT, instead of
defining with the driver.

I have to discuss with Ulf, as to who is submitting that patch.

Thanks,
Lina

>>  	psci {
>>  		compatible = "arm,psci-1.0";
>>  		method = "smc";
>
>-- 
>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index b7839a8..62dade8 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -63,6 +63,7 @@ 
 			reg = <0x0>;
 			enable-method = "psci";
 			cpu-idle-states = <&CPU_SPC>;
+			power-domains = <&CPU_PD>;
 		};
 
 		CPU1: cpu@1 {
@@ -71,6 +72,7 @@ 
 			reg = <0x1>;
 			enable-method = "psci";
 			cpu-idle-states = <&CPU_SPC>;
+			power-domains = <&CPU_PD>;
 		};
 
 		CPU2: cpu@2 {
@@ -79,6 +81,7 @@ 
 			reg = <0x2>;
 			enable-method = "psci";
 			cpu-idle-states = <&CPU_SPC>;
+			power-domains = <&CPU_PD>;
 		};
 
 		CPU3: cpu@3 {
@@ -87,6 +90,7 @@ 
 			reg = <0x3>;
 			enable-method = "psci";
 			cpu-idle-states = <&CPU_SPC>;
+			power-domains = <&CPU_PD>;
 		};
 
 		idle-states {
@@ -101,6 +105,27 @@ 
 		};
 	};
 
+	CPU_PD: cpu-pd@0 {
+		#power-domain-cells = <0>;
+		power-states = <&CLUSTER_RET>, <&CLUSTER_PWR_DWN>;
+	};
+
+	pd-power-states {
+		CLUSTER_RET: power-state@1 {
+			state-param = <0x1000010>;
+			entry-latency-us = <500>;
+			exit-latency-us = <500>;
+			residency-us = <2000>;
+		 };
+
+		CLUSTER_PWR_DWN: power-state@2 {
+			state-param = <0x1000030>;
+			entry-latency-us = <2000>;
+			exit-latency-us = <2000>;
+			residency-us = <6000>;
+		};
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";