devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: exynos: Fix reboot/poweroff issues on Exynos7
@ 2020-10-28 21:08 Paweł Chmiel
  2020-10-29 17:50 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Paweł Chmiel @ 2020-10-28 21:08 UTC (permalink / raw)
  To: kgene, krzk, alim.akhtar
  Cc: robh+dt, a.kesavan, naveenkrishna.ch, thomas.ab, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Paweł Chmiel

In vendor sources for Exynos 7420, psci is not used to reboot or
poweroff device. Instead we should use syscon reboot/poweroff.
Previously it was not possible to poweroff (no syscon poweroff node) or
reboot (because it was handled by psci and this way is not working for
Exynos).

Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7")
Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7")
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index 959918f4ca45..47d54c369d03 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -117,8 +117,10 @@ cpu_atlas3: cpu@3 {
 	};
 
 	psci {
-		compatible = "arm,psci-0.2";
+		compatible = "arm,psci";
 		method = "smc";
+		cpu_off = <0x84000002>;
+		cpu_on = <0xC4000003>;
 	};
 
 	soc: soc@0 {
@@ -552,6 +554,13 @@ pmu_system_controller: system-controller@105c0000 {
 			compatible = "samsung,exynos7-pmu", "syscon";
 			reg = <0x105c0000 0x5000>;
 
+			poweroff: syscon-poweroff {
+				compatible = "syscon-poweroff";
+				regmap = <&pmu_system_controller>;
+				offset = <0x330C>; /* PS_HOLD_CONTROL */
+				mask = <0x5200>; /* reset value */
+			};
+
 			reboot: syscon-reboot {
 				compatible = "syscon-reboot";
 				regmap = <&pmu_system_controller>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: exynos: Fix reboot/poweroff issues on Exynos7
  2020-10-28 21:08 [PATCH] arm64: dts: exynos: Fix reboot/poweroff issues on Exynos7 Paweł Chmiel
@ 2020-10-29 17:50 ` Krzysztof Kozlowski
  2020-11-04 21:14   ` Paweł Chmiel
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2020-10-29 17:50 UTC (permalink / raw)
  To: Paweł Chmiel
  Cc: kgene, alim.akhtar, robh+dt, a.kesavan, naveenkrishna.ch,
	thomas.ab, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On Wed, Oct 28, 2020 at 10:08:13PM +0100, Paweł Chmiel wrote:
> In vendor sources for Exynos 7420, psci is not used to reboot or
> poweroff device. Instead we should use syscon reboot/poweroff.
> Previously it was not possible to poweroff (no syscon poweroff node) or
> reboot (because it was handled by psci and this way is not working for
> Exynos).

Do you want to say that PSCI cannot be used to power off or reboot?

> 
> Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7")
> Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7")
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
>  arch/arm64/boot/dts/exynos/exynos7.dtsi | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> index 959918f4ca45..47d54c369d03 100644
> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
> @@ -117,8 +117,10 @@ cpu_atlas3: cpu@3 {
>  	};
>  
>  	psci {
> -		compatible = "arm,psci-0.2";
> +		compatible = "arm,psci";

Please explain how is it related to this issue? You onle mentioned
a problem of lacking syscon-reboot node.

>  		method = "smc";
> +		cpu_off = <0x84000002>;
> +		cpu_on = <0xC4000003>;

The same question.

>  	};
>  
>  	soc: soc@0 {
> @@ -552,6 +554,13 @@ pmu_system_controller: system-controller@105c0000 {
>  			compatible = "samsung,exynos7-pmu", "syscon";
>  			reg = <0x105c0000 0x5000>;
>  
> +			poweroff: syscon-poweroff {
> +				compatible = "syscon-poweroff";
> +				regmap = <&pmu_system_controller>;
> +				offset = <0x330C>; /* PS_HOLD_CONTROL */
> +				mask = <0x5200>; /* reset value */
> +			};
> +

Instead, please include arm/exynos-syscon-restart.dtsi.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: exynos: Fix reboot/poweroff issues on Exynos7
  2020-10-29 17:50 ` Krzysztof Kozlowski
@ 2020-11-04 21:14   ` Paweł Chmiel
  0 siblings, 0 replies; 3+ messages in thread
From: Paweł Chmiel @ 2020-11-04 21:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: kgene, alim.akhtar, robh+dt, a.kesavan, naveenkrishna.ch,
	thomas.ab, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

Hi

On 29.10.2020 18:50, Krzysztof Kozlowski wrote:
> On Wed, Oct 28, 2020 at 10:08:13PM +0100, Paweł Chmiel wrote:
>> In vendor sources for Exynos 7420, psci is not used to reboot or
>> poweroff device. Instead we should use syscon reboot/poweroff.
>> Previously it was not possible to poweroff (no syscon poweroff node) or
>> reboot (because it was handled by psci and this way is not working for
>> Exynos).
> 
> Do you want to say that PSCI cannot be used to power off or reboot?
Yes
> 
>>
>> Fixes: fb026cb65247 ("arm64: dts: Add reboot node for exynos7")
>> Fixes: b9024cbc937d ("arm64: dts: Add initial device tree support for exynos7")
>> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
>> ---
>>  arch/arm64/boot/dts/exynos/exynos7.dtsi | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
>> index 959918f4ca45..47d54c369d03 100644
>> --- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
>> +++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
>> @@ -117,8 +117,10 @@ cpu_atlas3: cpu@3 {
>>  	};
>>  
>>  	psci {
>> -		compatible = "arm,psci-0.2";
>> +		compatible = "arm,psci";
> 
> Please explain how is it related to this issue? You onle mentioned
> a problem of lacking syscon-reboot node.
> 
>>  		method = "smc";
>> +		cpu_off = <0x84000002>;
>> +		cpu_on = <0xC4000003>;
> 
> The same question.
Thanks for feedback. I'll split this patch into two - one for inclusion
of exynos-syscon-restart.dtsi and second one fixing psci compatible (so
syscon-poweroff/restart will be working).
> 
>>  	};
>>  
>>  	soc: soc@0 {
>> @@ -552,6 +554,13 @@ pmu_system_controller: system-controller@105c0000 {
>>  			compatible = "samsung,exynos7-pmu", "syscon";
>>  			reg = <0x105c0000 0x5000>;
>>  
>> +			poweroff: syscon-poweroff {
>> +				compatible = "syscon-poweroff";
>> +				regmap = <&pmu_system_controller>;
>> +				offset = <0x330C>; /* PS_HOLD_CONTROL */
>> +				mask = <0x5200>; /* reset value */
>> +			};
>> +
> 
> Instead, please include arm/exynos-syscon-restart.dtsi.
Will do this.
> 
> Best regards,
> Krzysztof
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-04 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 21:08 [PATCH] arm64: dts: exynos: Fix reboot/poweroff issues on Exynos7 Paweł Chmiel
2020-10-29 17:50 ` Krzysztof Kozlowski
2020-11-04 21:14   ` Paweł Chmiel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).