devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7
@ 2020-11-07 13:39 Paweł Chmiel
  2020-11-07 13:39 ` [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7 Paweł Chmiel
  2020-11-08 19:00 ` [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Paweł Chmiel @ 2020-11-07 13:39 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

Exynos7 uses the same syscon reboot and poweroff nodes as other Exynos
SoCs, so instead of duplicating code we can just include common dtsi
file, which already contains definitions of them. After this change,
poweroff node will be also available, previously this dts file did
contain only reboot node.

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>
---
Changes from v1:
  - Split into two separate patches.
  - Include existing exynos-syscon-restart.dtsi to avoid code
    duplication.
---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index 7a2cba4220d9..723f5d5fcf00 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -624,13 +624,6 @@ hsi2c_11: hsi2c@136a0000 {
 		pmu_system_controller: system-controller@105c0000 {
 			compatible = "samsung,exynos7-pmu", "syscon";
 			reg = <0x105c0000 0x5000>;
-
-			reboot: syscon-reboot {
-				compatible = "syscon-reboot";
-				regmap = <&pmu_system_controller>;
-				offset = <0x0400>;
-				mask = <0x1>;
-			};
 		};
 
 		rtc: rtc@10590000 {
@@ -818,3 +811,5 @@ atlas_thermal: cluster0-thermal {
 };
 
 #include "exynos7-pinctrl.dtsi"
+#include "arm/exynos-syscon-restart.dtsi"
+
-- 
2.27.0


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

* [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7
  2020-11-07 13:39 [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Paweł Chmiel
@ 2020-11-07 13:39 ` Paweł Chmiel
  2020-11-08 19:01   ` Krzysztof Kozlowski
  2020-11-08 19:00 ` [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Paweł Chmiel @ 2020-11-07 13:39 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

It's not possible to reboot or poweroff Exynos7420 using PSCI. Instead
we need to use syscon reboot/poweroff drivers, like it's done for other
Exynos SoCs. This was confirmed by checking vendor source and testing it
on Samsung Galaxy S6 device based on this SoC.

To be able to use custom restart/poweroff handlers instead of PSCI
functions, we need to correct psci compatible. This also requires us to
provide function ids for CPU_ON and CPU_OFF.

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>
---
Changes from v1:
  - Split into two separate patches.
---
 arch/arm64/boot/dts/exynos/exynos7.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index 723f5d5fcf00..fff383206545 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 {
-- 
2.27.0


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

* Re: [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7
  2020-11-07 13:39 [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Paweł Chmiel
  2020-11-07 13:39 ` [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7 Paweł Chmiel
@ 2020-11-08 19:00 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-08 19:00 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 Sat, Nov 07, 2020 at 02:39:25PM +0100, Paweł Chmiel wrote:
> Exynos7 uses the same syscon reboot and poweroff nodes as other Exynos
> SoCs, so instead of duplicating code we can just include common dtsi
> file, which already contains definitions of them. After this change,
> poweroff node will be also available, previously this dts file did
> contain only reboot node.
> 
> 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>
> ---
> Changes from v1:
>   - Split into two separate patches.
>   - Include existing exynos-syscon-restart.dtsi to avoid code
>     duplication.
> ---
>  arch/arm64/boot/dts/exynos/exynos7.dtsi | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 

Thanks, applied.

Best regards,
Krzysztof


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

* Re: [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7
  2020-11-07 13:39 ` [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7 Paweł Chmiel
@ 2020-11-08 19:01   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-08 19:01 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 Sat, Nov 07, 2020 at 02:39:26PM +0100, Paweł Chmiel wrote:
> It's not possible to reboot or poweroff Exynos7420 using PSCI. Instead
> we need to use syscon reboot/poweroff drivers, like it's done for other
> Exynos SoCs. This was confirmed by checking vendor source and testing it
> on Samsung Galaxy S6 device based on this SoC.
> 
> To be able to use custom restart/poweroff handlers instead of PSCI
> functions, we need to correct psci compatible. This also requires us to
> provide function ids for CPU_ON and CPU_OFF.
> 
> 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>
> ---
> Changes from v1:
>   - Split into two separate patches.
> ---
>  arch/arm64/boot/dts/exynos/exynos7.dtsi | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof


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

end of thread, other threads:[~2020-11-08 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 13:39 [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Paweł Chmiel
2020-11-07 13:39 ` [PATCH v2 2/2] arm64: dts: exynos: Correct psci compatible used on Exynos7 Paweł Chmiel
2020-11-08 19:01   ` Krzysztof Kozlowski
2020-11-08 19:00 ` [PATCH v2 1/2] arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7 Krzysztof Kozlowski

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).