All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-09 18:30 ` Javier Martinez Canillas
  0 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-09 18:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: devicetree, linux-samsung-soc, Krzysztof Kozlowski, Andi Shyti,
	Alim Akhtar, Kukjin Kim, linux-arm-kernel,
	Javier Martinez Canillas

All Exynos SoCs have the same syscon reboot and poweroff device nodes so
there is no need to duplicate the same on each SoC dtsi and can be moved
to a common dtsi that can be included by all the SoCs dtsi files.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---
Hello,

The patch was tested on an Exynos5800 Peach Pi Chromebook and an
Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.

But testing on Exynos3 and Exynos4 will be highly appreciated.

Best regards,
Javier

 arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
 arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
 arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
 arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
 arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
 5 files changed, 27 insertions(+), 56 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi

diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
new file mode 100644
index 000000000000..2b8acf554881
--- /dev/null
+++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
@@ -0,0 +1,23 @@
+/*
+ * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/ {
+	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>;
+		offset = <0x0400>; /* SWRESET */
+		mask = <0x1>;
+	};
+};
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 18e3deffbf48..d9c221517935 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -19,6 +19,7 @@
 
 #include "skeleton.dtsi"
 #include "exynos4-cpu-thermal.dtsi"
+#include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos3250.h>
 
 / {
@@ -152,20 +153,6 @@
 			interrupt-parent = <&gic>;
 		};
 
-		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>;
-			offset = <0x0400>; /* SWRESET */
-			mask = <0x1>;
-		};
-
 		mipi_phy: video-phy@10020710 {
 			compatible = "samsung,s5pv210-mipi-video-phy";
 			#phy-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index ca621a92319e..e6f6939ccdfa 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -21,6 +21,7 @@
 
 #include <dt-bindings/clock/exynos4.h>
 #include <dt-bindings/clock/exynos-audss-clk.h>
+#include "exynos-syscon-restart.dtsi"
 #include "skeleton.dtsi"
 
 / {
@@ -163,20 +164,6 @@
 		interrupt-parent = <&gic>;
 	};
 
-	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>;
-		offset = <0x0400>; /* SWRESET */
-		mask = <0x1>;
-	};
-
 	dsi_0: dsi@11C80000 {
 		compatible = "samsung,exynos4210-mipi-dsi";
 		reg = <0x11C80000 0x10000>;
diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index b61d1f637510..92313cac035e 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -14,6 +14,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "exynos-syscon-restart.dtsi"
 
 / {
 	interrupt-parent = <&gic>;
@@ -93,20 +94,6 @@
 		status = "disabled";
 	};
 
-	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>;
-		offset = <0x0400>; /* SWRESET */
-		mask = <0x1>;
-	};
-
 	fimd: fimd@14400000 {
 		compatible = "samsung,exynos5250-fimd";
 		interrupt-parent = <&combiner>;
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
index f3490f567344..fa558674ac76 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -14,6 +14,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos5410.h>
 
 / {
@@ -117,20 +118,6 @@
 			reg = <0x10040000 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>;
-			offset = <0x0400>; /* SWRESET */
-			mask = <0x1>;
-		};
-
 		mct: mct@101C0000 {
 			compatible = "samsung,exynos4210-mct";
 			reg = <0x101C0000 0xB00>;
-- 
2.5.0

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-09 18:30 ` Javier Martinez Canillas
  0 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-09 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

All Exynos SoCs have the same syscon reboot and poweroff device nodes so
there is no need to duplicate the same on each SoC dtsi and can be moved
to a common dtsi that can be included by all the SoCs dtsi files.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---
Hello,

The patch was tested on an Exynos5800 Peach Pi Chromebook and an
Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.

But testing on Exynos3 and Exynos4 will be highly appreciated.

Best regards,
Javier

 arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
 arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
 arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
 arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
 arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
 5 files changed, 27 insertions(+), 56 deletions(-)
 create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi

diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
new file mode 100644
index 000000000000..2b8acf554881
--- /dev/null
+++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
@@ -0,0 +1,23 @@
+/*
+ * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/ {
+	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>;
+		offset = <0x0400>; /* SWRESET */
+		mask = <0x1>;
+	};
+};
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 18e3deffbf48..d9c221517935 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -19,6 +19,7 @@
 
 #include "skeleton.dtsi"
 #include "exynos4-cpu-thermal.dtsi"
+#include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos3250.h>
 
 / {
@@ -152,20 +153,6 @@
 			interrupt-parent = <&gic>;
 		};
 
-		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>;
-			offset = <0x0400>; /* SWRESET */
-			mask = <0x1>;
-		};
-
 		mipi_phy: video-phy at 10020710 {
 			compatible = "samsung,s5pv210-mipi-video-phy";
 			#phy-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index ca621a92319e..e6f6939ccdfa 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -21,6 +21,7 @@
 
 #include <dt-bindings/clock/exynos4.h>
 #include <dt-bindings/clock/exynos-audss-clk.h>
+#include "exynos-syscon-restart.dtsi"
 #include "skeleton.dtsi"
 
 / {
@@ -163,20 +164,6 @@
 		interrupt-parent = <&gic>;
 	};
 
-	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>;
-		offset = <0x0400>; /* SWRESET */
-		mask = <0x1>;
-	};
-
 	dsi_0: dsi at 11C80000 {
 		compatible = "samsung,exynos4210-mipi-dsi";
 		reg = <0x11C80000 0x10000>;
diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index b61d1f637510..92313cac035e 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -14,6 +14,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "exynos-syscon-restart.dtsi"
 
 / {
 	interrupt-parent = <&gic>;
@@ -93,20 +94,6 @@
 		status = "disabled";
 	};
 
-	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>;
-		offset = <0x0400>; /* SWRESET */
-		mask = <0x1>;
-	};
-
 	fimd: fimd at 14400000 {
 		compatible = "samsung,exynos5250-fimd";
 		interrupt-parent = <&combiner>;
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
index f3490f567344..fa558674ac76 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -14,6 +14,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "exynos-syscon-restart.dtsi"
 #include <dt-bindings/clock/exynos5410.h>
 
 / {
@@ -117,20 +118,6 @@
 			reg = <0x10040000 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>;
-			offset = <0x0400>; /* SWRESET */
-			mask = <0x1>;
-		};
-
 		mct: mct at 101C0000 {
 			compatible = "samsung,exynos4210-mct";
 			reg = <0x101C0000 0xB00>;
-- 
2.5.0

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
  2016-02-09 18:30 ` Javier Martinez Canillas
  (?)
@ 2016-02-10 14:53   ` Alim Akhtar
  -1 siblings, 0 replies; 13+ messages in thread
From: Alim Akhtar @ 2016-02-10 14:53 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, devicetree, Krzysztof Kozlowski, linux-samsung-soc,
	Andi Shyti, Kukjin Kim, Alim Akhtar, linux-arm-kernel

Hi Javier,

On Wed, Feb 10, 2016 at 12:00 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
> there is no need to duplicate the same on each SoC dtsi and can be moved
> to a common dtsi that can be included by all the SoCs dtsi files.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Looks good to me.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung,com>
> ---
> Hello,
>
> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
>
> But testing on Exynos3 and Exynos4 will be highly appreciated.
>
> Best regards,
> Javier
>
>  arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>  arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>  5 files changed, 27 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
>
> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> new file mode 100644
> index 000000000000..2b8acf554881
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> @@ -0,0 +1,23 @@
> +/*
> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/ {
> +       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>;
> +               offset = <0x0400>; /* SWRESET */
> +               mask = <0x1>;
> +       };
> +};
> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
> index 18e3deffbf48..d9c221517935 100644
> --- a/arch/arm/boot/dts/exynos3250.dtsi
> +++ b/arch/arm/boot/dts/exynos3250.dtsi
> @@ -19,6 +19,7 @@
>
>  #include "skeleton.dtsi"
>  #include "exynos4-cpu-thermal.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos3250.h>
>
>  / {
> @@ -152,20 +153,6 @@
>                         interrupt-parent = <&gic>;
>                 };
>
> -               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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mipi_phy: video-phy@10020710 {
>                         compatible = "samsung,s5pv210-mipi-video-phy";
>                         #phy-cells = <1>;
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index ca621a92319e..e6f6939ccdfa 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -21,6 +21,7 @@
>
>  #include <dt-bindings/clock/exynos4.h>
>  #include <dt-bindings/clock/exynos-audss-clk.h>
> +#include "exynos-syscon-restart.dtsi"
>  #include "skeleton.dtsi"
>
>  / {
> @@ -163,20 +164,6 @@
>                 interrupt-parent = <&gic>;
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         dsi_0: dsi@11C80000 {
>                 compatible = "samsung,exynos4210-mipi-dsi";
>                 reg = <0x11C80000 0x10000>;
> diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
> index b61d1f637510..92313cac035e 100644
> --- a/arch/arm/boot/dts/exynos5.dtsi
> +++ b/arch/arm/boot/dts/exynos5.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>
>  / {
>         interrupt-parent = <&gic>;
> @@ -93,20 +94,6 @@
>                 status = "disabled";
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         fimd: fimd@14400000 {
>                 compatible = "samsung,exynos5250-fimd";
>                 interrupt-parent = <&combiner>;
> diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
> index f3490f567344..fa558674ac76 100644
> --- a/arch/arm/boot/dts/exynos5410.dtsi
> +++ b/arch/arm/boot/dts/exynos5410.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos5410.h>
>
>  / {
> @@ -117,20 +118,6 @@
>                         reg = <0x10040000 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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mct: mct@101C0000 {
>                         compatible = "samsung,exynos4210-mct";
>                         reg = <0x101C0000 0xB00>;
> --
> 2.5.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



-- 
Regards,
Alim

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-10 14:53   ` Alim Akhtar
  0 siblings, 0 replies; 13+ messages in thread
From: Alim Akhtar @ 2016-02-10 14:53 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, devicetree, Krzysztof Kozlowski, linux-samsung-soc,
	Andi Shyti, Kukjin Kim, Alim Akhtar, linux-arm-kernel

Hi Javier,

On Wed, Feb 10, 2016 at 12:00 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
> there is no need to duplicate the same on each SoC dtsi and can be moved
> to a common dtsi that can be included by all the SoCs dtsi files.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Looks good to me.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung,com>
> ---
> Hello,
>
> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
>
> But testing on Exynos3 and Exynos4 will be highly appreciated.
>
> Best regards,
> Javier
>
>  arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>  arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>  5 files changed, 27 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
>
> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> new file mode 100644
> index 000000000000..2b8acf554881
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> @@ -0,0 +1,23 @@
> +/*
> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/ {
> +       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>;
> +               offset = <0x0400>; /* SWRESET */
> +               mask = <0x1>;
> +       };
> +};
> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
> index 18e3deffbf48..d9c221517935 100644
> --- a/arch/arm/boot/dts/exynos3250.dtsi
> +++ b/arch/arm/boot/dts/exynos3250.dtsi
> @@ -19,6 +19,7 @@
>
>  #include "skeleton.dtsi"
>  #include "exynos4-cpu-thermal.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos3250.h>
>
>  / {
> @@ -152,20 +153,6 @@
>                         interrupt-parent = <&gic>;
>                 };
>
> -               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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mipi_phy: video-phy@10020710 {
>                         compatible = "samsung,s5pv210-mipi-video-phy";
>                         #phy-cells = <1>;
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index ca621a92319e..e6f6939ccdfa 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -21,6 +21,7 @@
>
>  #include <dt-bindings/clock/exynos4.h>
>  #include <dt-bindings/clock/exynos-audss-clk.h>
> +#include "exynos-syscon-restart.dtsi"
>  #include "skeleton.dtsi"
>
>  / {
> @@ -163,20 +164,6 @@
>                 interrupt-parent = <&gic>;
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         dsi_0: dsi@11C80000 {
>                 compatible = "samsung,exynos4210-mipi-dsi";
>                 reg = <0x11C80000 0x10000>;
> diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
> index b61d1f637510..92313cac035e 100644
> --- a/arch/arm/boot/dts/exynos5.dtsi
> +++ b/arch/arm/boot/dts/exynos5.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>
>  / {
>         interrupt-parent = <&gic>;
> @@ -93,20 +94,6 @@
>                 status = "disabled";
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         fimd: fimd@14400000 {
>                 compatible = "samsung,exynos5250-fimd";
>                 interrupt-parent = <&combiner>;
> diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
> index f3490f567344..fa558674ac76 100644
> --- a/arch/arm/boot/dts/exynos5410.dtsi
> +++ b/arch/arm/boot/dts/exynos5410.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos5410.h>
>
>  / {
> @@ -117,20 +118,6 @@
>                         reg = <0x10040000 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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mct: mct@101C0000 {
>                         compatible = "samsung,exynos4210-mct";
>                         reg = <0x101C0000 0xB00>;
> --
> 2.5.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



-- 
Regards,
Alim

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-10 14:53   ` Alim Akhtar
  0 siblings, 0 replies; 13+ messages in thread
From: Alim Akhtar @ 2016-02-10 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Javier,

On Wed, Feb 10, 2016 at 12:00 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
> there is no need to duplicate the same on each SoC dtsi and can be moved
> to a common dtsi that can be included by all the SoCs dtsi files.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Looks good to me.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung,com>
> ---
> Hello,
>
> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
>
> But testing on Exynos3 and Exynos4 will be highly appreciated.
>
> Best regards,
> Javier
>
>  arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>  arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>  5 files changed, 27 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
>
> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> new file mode 100644
> index 000000000000..2b8acf554881
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> @@ -0,0 +1,23 @@
> +/*
> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/ {
> +       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>;
> +               offset = <0x0400>; /* SWRESET */
> +               mask = <0x1>;
> +       };
> +};
> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
> index 18e3deffbf48..d9c221517935 100644
> --- a/arch/arm/boot/dts/exynos3250.dtsi
> +++ b/arch/arm/boot/dts/exynos3250.dtsi
> @@ -19,6 +19,7 @@
>
>  #include "skeleton.dtsi"
>  #include "exynos4-cpu-thermal.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos3250.h>
>
>  / {
> @@ -152,20 +153,6 @@
>                         interrupt-parent = <&gic>;
>                 };
>
> -               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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mipi_phy: video-phy at 10020710 {
>                         compatible = "samsung,s5pv210-mipi-video-phy";
>                         #phy-cells = <1>;
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index ca621a92319e..e6f6939ccdfa 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -21,6 +21,7 @@
>
>  #include <dt-bindings/clock/exynos4.h>
>  #include <dt-bindings/clock/exynos-audss-clk.h>
> +#include "exynos-syscon-restart.dtsi"
>  #include "skeleton.dtsi"
>
>  / {
> @@ -163,20 +164,6 @@
>                 interrupt-parent = <&gic>;
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         dsi_0: dsi at 11C80000 {
>                 compatible = "samsung,exynos4210-mipi-dsi";
>                 reg = <0x11C80000 0x10000>;
> diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
> index b61d1f637510..92313cac035e 100644
> --- a/arch/arm/boot/dts/exynos5.dtsi
> +++ b/arch/arm/boot/dts/exynos5.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>
>  / {
>         interrupt-parent = <&gic>;
> @@ -93,20 +94,6 @@
>                 status = "disabled";
>         };
>
> -       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>;
> -               offset = <0x0400>; /* SWRESET */
> -               mask = <0x1>;
> -       };
> -
>         fimd: fimd at 14400000 {
>                 compatible = "samsung,exynos5250-fimd";
>                 interrupt-parent = <&combiner>;
> diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
> index f3490f567344..fa558674ac76 100644
> --- a/arch/arm/boot/dts/exynos5410.dtsi
> +++ b/arch/arm/boot/dts/exynos5410.dtsi
> @@ -14,6 +14,7 @@
>   */
>
>  #include "skeleton.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos5410.h>
>
>  / {
> @@ -117,20 +118,6 @@
>                         reg = <0x10040000 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>;
> -                       offset = <0x0400>; /* SWRESET */
> -                       mask = <0x1>;
> -               };
> -
>                 mct: mct at 101C0000 {
>                         compatible = "samsung,exynos4210-mct";
>                         reg = <0x101C0000 0xB00>;
> --
> 2.5.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



-- 
Regards,
Alim

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
  2016-02-09 18:30 ` Javier Martinez Canillas
@ 2016-02-14  6:44   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-14  6:44 UTC (permalink / raw)
  To: Javier Martinez Canillas, linux-kernel
  Cc: k.kozlowski.k, devicetree, linux-samsung-soc, Andi Shyti,
	Alim Akhtar, Kukjin Kim, linux-arm-kernel

W dniu 10.02.2016 o 03:30, Javier Martinez Canillas pisze:
> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
> there is no need to duplicate the same on each SoC dtsi and can be moved
> to a common dtsi that can be included by all the SoCs dtsi files.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> Hello,
> 
> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
> 
> But testing on Exynos3 and Exynos4 will be highly appreciated.

Would you be so kind and add my suggested-by (since it comes from
https://wiki.tizen.org/wiki/Exynos_Mainline_Kernel_TODO :) )

I'll test it on Exynos4 at work and then apply... but few comments below:

> 
> Best regards,
> Javier
> 
>  arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>  arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>  5 files changed, 27 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
> 
> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> new file mode 100644
> index 000000000000..2b8acf554881
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> @@ -0,0 +1,23 @@
> +/*
> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/ {

In some of the DTSI this was under "soc" node, not at top-level.
Unfortunately we do not have consistency here - some DTSI have "soc",
some not. Anyway I think we should move to "soc" version.

> +	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>;
> +		offset = <0x0400>; /* SWRESET */
> +		mask = <0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
> index 18e3deffbf48..d9c221517935 100644
> --- a/arch/arm/boot/dts/exynos3250.dtsi
> +++ b/arch/arm/boot/dts/exynos3250.dtsi
> @@ -19,6 +19,7 @@
>  
>  #include "skeleton.dtsi"
>  #include "exynos4-cpu-thermal.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos3250.h>
>  
>  / {
> @@ -152,20 +153,6 @@
>  			interrupt-parent = <&gic>;
>  		};
>  
> -		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>;
> -			offset = <0x0400>; /* SWRESET */
> -			mask = <0x1>;
> -		};
> -
>  		mipi_phy: video-phy@10020710 {
>  			compatible = "samsung,s5pv210-mipi-video-phy";
>  			#phy-cells = <1>;
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index ca621a92319e..e6f6939ccdfa 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -21,6 +21,7 @@
>  
>  #include <dt-bindings/clock/exynos4.h>
>  #include <dt-bindings/clock/exynos-audss-clk.h>
> +#include "exynos-syscon-restart.dtsi"

Just to keep it consistent and logic - include after skeleton.

Best regards,
Krzysztof

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-14  6:44   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-14  6:44 UTC (permalink / raw)
  To: linux-arm-kernel

W dniu 10.02.2016 o 03:30, Javier Martinez Canillas pisze:
> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
> there is no need to duplicate the same on each SoC dtsi and can be moved
> to a common dtsi that can be included by all the SoCs dtsi files.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> Hello,
> 
> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
> 
> But testing on Exynos3 and Exynos4 will be highly appreciated.

Would you be so kind and add my suggested-by (since it comes from
https://wiki.tizen.org/wiki/Exynos_Mainline_Kernel_TODO :) )

I'll test it on Exynos4 at work and then apply... but few comments below:

> 
> Best regards,
> Javier
> 
>  arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>  arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>  arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>  5 files changed, 27 insertions(+), 56 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
> 
> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> new file mode 100644
> index 000000000000..2b8acf554881
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
> @@ -0,0 +1,23 @@
> +/*
> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +/ {

In some of the DTSI this was under "soc" node, not at top-level.
Unfortunately we do not have consistency here - some DTSI have "soc",
some not. Anyway I think we should move to "soc" version.

> +	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>;
> +		offset = <0x0400>; /* SWRESET */
> +		mask = <0x1>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
> index 18e3deffbf48..d9c221517935 100644
> --- a/arch/arm/boot/dts/exynos3250.dtsi
> +++ b/arch/arm/boot/dts/exynos3250.dtsi
> @@ -19,6 +19,7 @@
>  
>  #include "skeleton.dtsi"
>  #include "exynos4-cpu-thermal.dtsi"
> +#include "exynos-syscon-restart.dtsi"
>  #include <dt-bindings/clock/exynos3250.h>
>  
>  / {
> @@ -152,20 +153,6 @@
>  			interrupt-parent = <&gic>;
>  		};
>  
> -		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>;
> -			offset = <0x0400>; /* SWRESET */
> -			mask = <0x1>;
> -		};
> -
>  		mipi_phy: video-phy at 10020710 {
>  			compatible = "samsung,s5pv210-mipi-video-phy";
>  			#phy-cells = <1>;
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index ca621a92319e..e6f6939ccdfa 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -21,6 +21,7 @@
>  
>  #include <dt-bindings/clock/exynos4.h>
>  #include <dt-bindings/clock/exynos-audss-clk.h>
> +#include "exynos-syscon-restart.dtsi"

Just to keep it consistent and logic - include after skeleton.

Best regards,
Krzysztof

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
  2016-02-14  6:44   ` Krzysztof Kozlowski
@ 2016-02-15 13:38     ` Javier Martinez Canillas
  -1 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-15 13:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-kernel
  Cc: k.kozlowski.k, devicetree, linux-samsung-soc, Andi Shyti,
	Alim Akhtar, Kukjin Kim, linux-arm-kernel

Hello Krzysztof,

On 02/14/2016 03:44 AM, Krzysztof Kozlowski wrote:
> W dniu 10.02.2016 o 03:30, Javier Martinez Canillas pisze:
>> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
>> there is no need to duplicate the same on each SoC dtsi and can be moved
>> to a common dtsi that can be included by all the SoCs dtsi files.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>> Hello,
>>
>> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
>> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
>>
>> But testing on Exynos3 and Exynos4 will be highly appreciated.
>
> Would you be so kind and add my suggested-by (since it comes from
> https://wiki.tizen.org/wiki/Exynos_Mainline_Kernel_TODO :) )
>

Right, sorry for missing that.
  
> I'll test it on Exynos4 at work and then apply... but few comments below:
>
>>
>> Best regards,
>> Javier
>>
>>   arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>>   arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>>   arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>>   arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>>   arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>>   5 files changed, 27 insertions(+), 56 deletions(-)
>>   create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
>>
>> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
>> new file mode 100644
>> index 000000000000..2b8acf554881
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
>> @@ -0,0 +1,23 @@
>> +/*
>> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +/ {
>
> In some of the DTSI this was under "soc" node, not at top-level.
> Unfortunately we do not have consistency here - some DTSI have "soc",

Yes, I noticed this but as you said not all DTSI have a soc node
and that's why I made it top level in the DTSI.

> some not. Anyway I think we should move to "soc" version.
>

Not sure I'm following, did you mean to do it as a follow up or
to add a soc node for the missing DTSI as a part of this series?

>> +	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>;
>> +		offset = <0x0400>; /* SWRESET */
>> +		mask = <0x1>;
>> +	};
>> +};
>> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
>> index 18e3deffbf48..d9c221517935 100644
>> --- a/arch/arm/boot/dts/exynos3250.dtsi
>> +++ b/arch/arm/boot/dts/exynos3250.dtsi
>> @@ -19,6 +19,7 @@
>>
>>   #include "skeleton.dtsi"
>>   #include "exynos4-cpu-thermal.dtsi"
>> +#include "exynos-syscon-restart.dtsi"
>>   #include <dt-bindings/clock/exynos3250.h>
>>
>>   / {
>> @@ -152,20 +153,6 @@
>>   			interrupt-parent = <&gic>;
>>   		};
>>
>> -		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>;
>> -			offset = <0x0400>; /* SWRESET */
>> -			mask = <0x1>;
>> -		};
>> -
>>   		mipi_phy: video-phy@10020710 {
>>   			compatible = "samsung,s5pv210-mipi-video-phy";
>>   			#phy-cells = <1>;
>> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
>> index ca621a92319e..e6f6939ccdfa 100644
>> --- a/arch/arm/boot/dts/exynos4.dtsi
>> +++ b/arch/arm/boot/dts/exynos4.dtsi
>> @@ -21,6 +21,7 @@
>>
>>   #include <dt-bindings/clock/exynos4.h>
>>   #include <dt-bindings/clock/exynos-audss-clk.h>
>> +#include "exynos-syscon-restart.dtsi"
>
> Just to keep it consistent and logic - include after skeleton.
>

Ok, for include I usually try to keep alphabetically sorted but
I'll move it after skeleton if you prefer to keep it consistent.
  
> Best regards,
> Krzysztof
>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-15 13:38     ` Javier Martinez Canillas
  0 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-15 13:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Krzysztof,

On 02/14/2016 03:44 AM, Krzysztof Kozlowski wrote:
> W dniu 10.02.2016 o 03:30, Javier Martinez Canillas pisze:
>> All Exynos SoCs have the same syscon reboot and poweroff device nodes so
>> there is no need to duplicate the same on each SoC dtsi and can be moved
>> to a common dtsi that can be included by all the SoCs dtsi files.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>> Hello,
>>
>> The patch was tested on an Exynos5800 Peach Pi Chromebook and an
>> Exynos5422 Odroid XU4 board. Reboot and poweroff worked for both.
>>
>> But testing on Exynos3 and Exynos4 will be highly appreciated.
>
> Would you be so kind and add my suggested-by (since it comes from
> https://wiki.tizen.org/wiki/Exynos_Mainline_Kernel_TODO :) )
>

Right, sorry for missing that.
  
> I'll test it on Exynos4 at work and then apply... but few comments below:
>
>>
>> Best regards,
>> Javier
>>
>>   arch/arm/boot/dts/exynos-syscon-restart.dtsi | 23 +++++++++++++++++++++++
>>   arch/arm/boot/dts/exynos3250.dtsi            | 15 +--------------
>>   arch/arm/boot/dts/exynos4.dtsi               | 15 +--------------
>>   arch/arm/boot/dts/exynos5.dtsi               | 15 +--------------
>>   arch/arm/boot/dts/exynos5410.dtsi            | 15 +--------------
>>   5 files changed, 27 insertions(+), 56 deletions(-)
>>   create mode 100644 arch/arm/boot/dts/exynos-syscon-restart.dtsi
>>
>> diff --git a/arch/arm/boot/dts/exynos-syscon-restart.dtsi b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
>> new file mode 100644
>> index 000000000000..2b8acf554881
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/exynos-syscon-restart.dtsi
>> @@ -0,0 +1,23 @@
>> +/*
>> + * Samsung's Exynos SoC syscon reboot/poweroff nodes common definition.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +/ {
>
> In some of the DTSI this was under "soc" node, not at top-level.
> Unfortunately we do not have consistency here - some DTSI have "soc",

Yes, I noticed this but as you said not all DTSI have a soc node
and that's why I made it top level in the DTSI.

> some not. Anyway I think we should move to "soc" version.
>

Not sure I'm following, did you mean to do it as a follow up or
to add a soc node for the missing DTSI as a part of this series?

>> +	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>;
>> +		offset = <0x0400>; /* SWRESET */
>> +		mask = <0x1>;
>> +	};
>> +};
>> diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
>> index 18e3deffbf48..d9c221517935 100644
>> --- a/arch/arm/boot/dts/exynos3250.dtsi
>> +++ b/arch/arm/boot/dts/exynos3250.dtsi
>> @@ -19,6 +19,7 @@
>>
>>   #include "skeleton.dtsi"
>>   #include "exynos4-cpu-thermal.dtsi"
>> +#include "exynos-syscon-restart.dtsi"
>>   #include <dt-bindings/clock/exynos3250.h>
>>
>>   / {
>> @@ -152,20 +153,6 @@
>>   			interrupt-parent = <&gic>;
>>   		};
>>
>> -		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>;
>> -			offset = <0x0400>; /* SWRESET */
>> -			mask = <0x1>;
>> -		};
>> -
>>   		mipi_phy: video-phy at 10020710 {
>>   			compatible = "samsung,s5pv210-mipi-video-phy";
>>   			#phy-cells = <1>;
>> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
>> index ca621a92319e..e6f6939ccdfa 100644
>> --- a/arch/arm/boot/dts/exynos4.dtsi
>> +++ b/arch/arm/boot/dts/exynos4.dtsi
>> @@ -21,6 +21,7 @@
>>
>>   #include <dt-bindings/clock/exynos4.h>
>>   #include <dt-bindings/clock/exynos-audss-clk.h>
>> +#include "exynos-syscon-restart.dtsi"
>
> Just to keep it consistent and logic - include after skeleton.
>

Ok, for include I usually try to keep alphabetically sorted but
I'll move it after skeleton if you prefer to keep it consistent.
  
> Best regards,
> Krzysztof
>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
  2016-02-15 13:38     ` Javier Martinez Canillas
@ 2016-02-15 23:04       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-15 23:04 UTC (permalink / raw)
  To: Javier Martinez Canillas, linux-kernel
  Cc: k.kozlowski.k, devicetree, linux-samsung-soc, Andi Shyti,
	Alim Akhtar, Kukjin Kim, linux-arm-kernel

On 15.02.2016 22:38, Javier Martinez Canillas wrote:
>>
>> In some of the DTSI this was under "soc" node, not at top-level.
>> Unfortunately we do not have consistency here - some DTSI have "soc",
> 
> Yes, I noticed this but as you said not all DTSI have a soc node
> and that's why I made it top level in the DTSI.
> 
>> some not. Anyway I think we should move to "soc" version.
>>
> 
> Not sure I'm following, did you mean to do it as a follow up or
> to add a soc node for the missing DTSI as a part of this series?

I meant to send a v2 with this under "soc" node even though on some DTS
we do not have the "soc". Optional follow up would be to make DTS
consistent and move nodes under "soc"... but that would be also a lot of
churn.

Best regards,
Krzysztof

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-15 23:04       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-15 23:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 15.02.2016 22:38, Javier Martinez Canillas wrote:
>>
>> In some of the DTSI this was under "soc" node, not at top-level.
>> Unfortunately we do not have consistency here - some DTSI have "soc",
> 
> Yes, I noticed this but as you said not all DTSI have a soc node
> and that's why I made it top level in the DTSI.
> 
>> some not. Anyway I think we should move to "soc" version.
>>
> 
> Not sure I'm following, did you mean to do it as a follow up or
> to add a soc node for the missing DTSI as a part of this series?

I meant to send a v2 with this under "soc" node even though on some DTS
we do not have the "soc". Optional follow up would be to make DTS
consistent and move nodes under "soc"... but that would be also a lot of
churn.

Best regards,
Krzysztof

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

* Re: [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
  2016-02-15 23:04       ` Krzysztof Kozlowski
@ 2016-02-16 13:58         ` Javier Martinez Canillas
  -1 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-16 13:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-kernel
  Cc: k.kozlowski.k, devicetree, linux-samsung-soc, Andi Shyti,
	Alim Akhtar, Kukjin Kim, linux-arm-kernel

Hello Krzysztof,

On 02/15/2016 08:04 PM, Krzysztof Kozlowski wrote:
> On 15.02.2016 22:38, Javier Martinez Canillas wrote:
>>>
>>> In some of the DTSI this was under "soc" node, not at top-level.
>>> Unfortunately we do not have consistency here - some DTSI have "soc",
>>
>> Yes, I noticed this but as you said not all DTSI have a soc node
>> and that's why I made it top level in the DTSI.
>>
>>> some not. Anyway I think we should move to "soc" version.
>>>
>>
>> Not sure I'm following, did you mean to do it as a follow up or
>> to add a soc node for the missing DTSI as a part of this series?
>
> I meant to send a v2 with this under "soc" node even though on some DTS
> we do not have the "soc". Optional follow up would be to make DTS
> consistent and move nodes under "soc"... but that would be also a lot of
> churn.
>

Thanks for the clarification. I'll post a v2 then moving under a soc node.
  
> Best regards,
> Krzysztof

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

* [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos
@ 2016-02-16 13:58         ` Javier Martinez Canillas
  0 siblings, 0 replies; 13+ messages in thread
From: Javier Martinez Canillas @ 2016-02-16 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Krzysztof,

On 02/15/2016 08:04 PM, Krzysztof Kozlowski wrote:
> On 15.02.2016 22:38, Javier Martinez Canillas wrote:
>>>
>>> In some of the DTSI this was under "soc" node, not at top-level.
>>> Unfortunately we do not have consistency here - some DTSI have "soc",
>>
>> Yes, I noticed this but as you said not all DTSI have a soc node
>> and that's why I made it top level in the DTSI.
>>
>>> some not. Anyway I think we should move to "soc" version.
>>>
>>
>> Not sure I'm following, did you mean to do it as a follow up or
>> to add a soc node for the missing DTSI as a part of this series?
>
> I meant to send a v2 with this under "soc" node even though on some DTS
> we do not have the "soc". Optional follow up would be to make DTS
> consistent and move nodes under "soc"... but that would be also a lot of
> churn.
>

Thanks for the clarification. I'll post a v2 then moving under a soc node.
  
> Best regards,
> Krzysztof

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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

end of thread, other threads:[~2016-02-16 13:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 18:30 [PATCH] ARM: dts: Move syscon reboot/poweroff to common dtsi for Exynos Javier Martinez Canillas
2016-02-09 18:30 ` Javier Martinez Canillas
2016-02-10 14:53 ` Alim Akhtar
2016-02-10 14:53   ` Alim Akhtar
2016-02-10 14:53   ` Alim Akhtar
2016-02-14  6:44 ` Krzysztof Kozlowski
2016-02-14  6:44   ` Krzysztof Kozlowski
2016-02-15 13:38   ` Javier Martinez Canillas
2016-02-15 13:38     ` Javier Martinez Canillas
2016-02-15 23:04     ` Krzysztof Kozlowski
2016-02-15 23:04       ` Krzysztof Kozlowski
2016-02-16 13:58       ` Javier Martinez Canillas
2016-02-16 13:58         ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.