All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support
@ 2018-02-08 10:34 Geert Uytterhoeven
  2018-02-08 10:34 ` [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock Geert Uytterhoeven
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

	Hi all,

This patch series enables the builtin watchdog timer on R-Car Gen2 SoCs
on all supported boards, and builds on top of Fabrizio's "[RFC v4 00/26]
Fix watchdog on Renesas R-Car Gen2 and RZ/G1".  It is marked RFC as it
is known not to work on all SoCs and SoC revisions.

Based on my experiments, there are 3 success/failure modes:

  1. It works!

     This is the case on R-Car M2-N ES1.0 and E2 ES1.0 (tested on gose
     and alt).

  2. The system hangs on watchdog timeout, unless only the first CPU
     core is in use.
     This can be achieved by booting with "maxcpus=1", or by manually
     offlining all secondary CPU cores first:

         for i in /sys/*/*/cpu/cpu[1-9]*; do echo 0 > $i/online; done

     This is the case on R-Car H2 ES1.0 and M2-W ES1.0 (tested on lager
     and koelsch).

  3. The system hangs on watchdog timeout, unless the kernel was built
     with CONFIG_SMP disabled.

     This is the case on R-Car V2H ES1.1 (tested on blanche).
     Presumably the restart part in the new shmobile_boot_vector_gen2 is
     not compatible with R-Car V2H in some way (CPU off/onlining does
     work).

Once we know on which SoCs and revisions it does work, we can add the
proper checks. Right now I'm thinking of adding something like:

    if (IS_ENABLED(CONFIG_SMP) && maxcpus > 1 &&
	soc_device_match(rcar_gen2_wdt_needs_up))
	    return -ENODEV;

to the watchdog's probe function (assumed we can fix
shmobile_boot_vector_gen2 for R-Car V2H, else we need more checks).

For your convenience, Fabrizio's and my series are available in the
topic/rcar-gen2-wdt-v4 resp. topic/rcar-gen2-wdt-v4+ branches of my
renesas-drivers git repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.

shmobile_defconfig should enable all support needed for testing.

Test procedure:

    cat > /dev/watchdog0 & for i in $(seq 100); do echo $i; sleep 1; done

If everything goes well, the board should reboot after 60 seconds.

Note that on several boards there are multiple watchdogs (RWDT and
DA9063 PMIC):

    # ls -l /dev/watchdog*
    crw------- 1 root root  10, 130 Jan  1  2000 /dev/watchdog
    crw------- 1 root root 247,   0 Jan  1  2000 /dev/watchdog0
    crw------- 1 root root 247,   1 Jan  1  2000 /dev/watchdog1

/dev/watchdog always corresponds to /dev/watchdog0.
The first one is usually the RWDT. If you want to be 100% sure, look in
sysfs for devices with the (dynamic!) major matching the /dev/watchdog*
files:

    # find /sys/devices/ -name dev | xargs grep 247:
    /sys/devices/platform/soc/e6020000.watchdog/watchdog/watchdog0/dev:247:0
    /sys/devices/platform/soc/e60b0000.i2c/i2c-6/6-0058/da9063-watchdog/watchdog/watchdog1/dev:247:1

Thanks for testing, especially on newer revisions of R-Car H2, M2-W, and
V2H, and on other boards!

Geert Uytterhoeven (11):
  clk: renesas: r8a7792: Add rwdt clock
  ARM: dts: r8a7792: Add RWDT node
  ARM: dts: r8a7793: Add RWDT node
  ARM: dts: lager: Enable watchdog support
  ARM: dts: koelsch: Enable watchdog support
  ARM: dts: porter: Enable watchdog support
  ARM: dts: blanche: Enable watchdog support
  ARM: dts: wheat: Enable watchdog support
  ARM: dts: gose: Enable watchdog support
  ARM: dts: alt: Enable watchdog support
  ARM: dts: silk: Enable watchdog support

 arch/arm/boot/dts/r8a7790-lager.dts    |  5 +++++
 arch/arm/boot/dts/r8a7791-koelsch.dts  |  5 +++++
 arch/arm/boot/dts/r8a7791-porter.dts   |  5 +++++
 arch/arm/boot/dts/r8a7792-blanche.dts  |  5 +++++
 arch/arm/boot/dts/r8a7792-wheat.dts    |  5 +++++
 arch/arm/boot/dts/r8a7792.dtsi         | 10 ++++++++++
 arch/arm/boot/dts/r8a7793-gose.dts     |  5 +++++
 arch/arm/boot/dts/r8a7793.dtsi         | 10 ++++++++++
 arch/arm/boot/dts/r8a7794-alt.dts      |  5 +++++
 arch/arm/boot/dts/r8a7794-silk.dts     |  5 +++++
 drivers/clk/renesas/r8a7792-cpg-mssr.c |  2 ++
 11 files changed, 62 insertions(+)

-- 
2.7.4

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:50   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node Geert Uytterhoeven
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Add "rwdt" clock to r8a7792_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7792-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7792-cpg-mssr.c b/drivers/clk/renesas/r8a7792-cpg-mssr.c
index 7f85bbf20bf782b7..609a540804965c40 100644
--- a/drivers/clk/renesas/r8a7792-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7792-cpg-mssr.c
@@ -98,6 +98,7 @@ static const struct mssr_mod_clk r8a7792_mod_clks[] __initconst = {
 	DEF_MOD("tpu0",			 304,	R8A7792_CLK_CP),
 	DEF_MOD("sdhi0",		 314,	R8A7792_CLK_SD),
 	DEF_MOD("cmt1",			 329,	R8A7792_CLK_R),
+	DEF_MOD("rwdt",			 402,	R8A7792_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7792_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7792_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7792_CLK_HP),
@@ -154,6 +155,7 @@ static const struct mssr_mod_clk r8a7792_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7792_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
  2018-02-08 10:34 ` [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:51   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 03/11] ARM: dts: r8a7793: " Geert Uytterhoeven
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Add a device node for the Watchdog Timer (WDT) controller on the Renesas
R-Car V2H (r8a7792) SoC.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7792.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index bea0f12f03d36195..d2cf8dd2d9b03624 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -101,6 +101,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7792-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7792",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [PATCH/RFC 03/11] ARM: dts: r8a7793: Add RWDT node
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
  2018-02-08 10:34 ` [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock Geert Uytterhoeven
  2018-02-08 10:34 ` [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:52   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support Geert Uytterhoeven
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Add a device node for the Watchdog Timer (WDT) controller on the Renesas
R-Car M2-N (r8a7793) SoC.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7793.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index f0e0415682f89440..5a06ad1788b27ff1 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -126,6 +126,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7793-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7793_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7793",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 03/11] ARM: dts: r8a7793: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:52   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 05/11] ARM: dts: koelsch: " Geert Uytterhoeven
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7790-lager.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 7892b113ecaa14c6..4d8fb09fdbb816a5 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -860,6 +860,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &ssi1 {
 	shared-pin;
 };
-- 
2.7.4

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

* [PATCH/RFC 05/11] ARM: dts: koelsch: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:52   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 06/11] ARM: dts: porter: " Geert Uytterhoeven
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index a50924d12b6f37d5..c90462dbcd36c836 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -499,6 +499,11 @@
 	status = "okay";
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sata0 {
 	status = "okay";
 };
-- 
2.7.4

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

* [PATCH/RFC 06/11] ARM: dts: porter: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 05/11] ARM: dts: koelsch: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:53   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 07/11] ARM: dts: blanche: " Geert Uytterhoeven
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7791-porter.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts
index 9a02d03b23c2b7e9..7d06fb24bcdf2fee 100644
--- a/arch/arm/boot/dts/r8a7791-porter.dts
+++ b/arch/arm/boot/dts/r8a7791-porter.dts
@@ -449,6 +449,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &ssi1 {
 	shared-pin;
 };
-- 
2.7.4

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

* [PATCH/RFC 07/11] ARM: dts: blanche: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 06/11] ARM: dts: porter: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:53   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 08/11] ARM: dts: wheat: " Geert Uytterhoeven
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7792-blanche.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7792-blanche.dts b/arch/arm/boot/dts/r8a7792-blanche.dts
index 9b67dca6c9ef550d..04fb70931b3b0772 100644
--- a/arch/arm/boot/dts/r8a7792-blanche.dts
+++ b/arch/arm/boot/dts/r8a7792-blanche.dts
@@ -239,6 +239,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &scif0 {
 	pinctrl-0 = <&scif0_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [PATCH/RFC 08/11] ARM: dts: wheat: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 07/11] ARM: dts: blanche: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:54   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 09/11] ARM: dts: gose: " Geert Uytterhoeven
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7792-wheat.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7792-wheat.dts b/arch/arm/boot/dts/r8a7792-wheat.dts
index b9471b67b72829de..293b9e3b3e70d7b8 100644
--- a/arch/arm/boot/dts/r8a7792-wheat.dts
+++ b/arch/arm/boot/dts/r8a7792-wheat.dts
@@ -168,6 +168,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &scif0 {
 	pinctrl-0 = <&scif0_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [PATCH/RFC 09/11] ARM: dts: gose: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 08/11] ARM: dts: wheat: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:54   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 10/11] ARM: dts: alt: " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7793-gose.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index 51b3ffac8efaad1d..1c8b4f1b5257216c 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -446,6 +446,11 @@
 	status = "okay";
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &scif0 {
 	pinctrl-0 = <&scif0_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [PATCH/RFC 10/11] ARM: dts: alt: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (8 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 09/11] ARM: dts: gose: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:55   ` Fabrizio Castro
  2018-02-08 10:34 ` [PATCH/RFC 11/11] ARM: dts: silk: " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7794-alt.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index 60c6515c499660eb..fdc4a311648dc30d 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -295,6 +295,11 @@
 	status = "okay";
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-1 = <&sdhi0_pins_uhs>;
-- 
2.7.4

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

* [PATCH/RFC 11/11] ARM: dts: silk: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (9 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 10/11] ARM: dts: alt: " Geert Uytterhoeven
@ 2018-02-08 10:34 ` Geert Uytterhoeven
  2018-02-12 17:55   ` Fabrizio Castro
  2018-02-09 10:11 ` [PATCH/RFC 00/11] ARM: dts: rcar-gen2: " Geert Uytterhoeven
  2018-02-13  8:26 ` Simon Horman
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-08 10:34 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Fabrizio Castro
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc, Geert Uytterhoeven

Enable the watchdog, so the board can be restarted by a watchdog
timeout.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7794-silk.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index edfad0e5ac53a0c1..993f83c70dedbb30 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -457,6 +457,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &ssi1 {
 	shared-pin;
 };
-- 
2.7.4

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

* Re: [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (10 preceding siblings ...)
  2018-02-08 10:34 ` [PATCH/RFC 11/11] ARM: dts: silk: " Geert Uytterhoeven
@ 2018-02-09 10:11 ` Geert Uytterhoeven
  2018-02-14 15:42   ` Geert Uytterhoeven
  2018-02-13  8:26 ` Simon Horman
  12 siblings, 1 reply; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-09 10:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Fabrizio Castro, Wolfram Sang,
	Chris Paterson, Biju Das, Ramesh Shanmugasundaram, Linux-Renesas

On Thu, Feb 8, 2018 at 11:34 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> This patch series enables the builtin watchdog timer on R-Car Gen2 SoCs
> on all supported boards, and builds on top of Fabrizio's "[RFC v4 00/26]
> Fix watchdog on Renesas R-Car Gen2 and RZ/G1".  It is marked RFC as it
> is known not to work on all SoCs and SoC revisions.
>
> Based on my experiments, there are 3 success/failure modes:
>
>   1. It works!
>
>      This is the case on R-Car M2-N ES1.0 and E2 ES1.0 (tested on gose
>      and alt).

It also succeeds on R-Car M2-W ES3.0 (tested on porter).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* RE: [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock
  2018-02-08 10:34 ` [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock Geert Uytterhoeven
@ 2018-02-12 17:50   ` Fabrizio Castro
  2018-02-20 12:52     ` Geert Uytterhoeven
  0 siblings, 1 reply; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:50 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock
>
> Add "rwdt" clock to r8a7792_mod_clks. Also, since we may need to access
> the watchdog registers at any time, declare the clock as critical.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  drivers/clk/renesas/r8a7792-cpg-mssr.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/renesas/r8a7792-cpg-mssr.c b/drivers/clk/renesas/r8a7792-cpg-mssr.c
> index 7f85bbf20bf782b7..609a540804965c40 100644
> --- a/drivers/clk/renesas/r8a7792-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7792-cpg-mssr.c
> @@ -98,6 +98,7 @@ static const struct mssr_mod_clk r8a7792_mod_clks[] __initconst = {
>  DEF_MOD("tpu0", 304,R8A7792_CLK_CP),
>  DEF_MOD("sdhi0", 314,R8A7792_CLK_SD),
>  DEF_MOD("cmt1", 329,R8A7792_CLK_R),
> +DEF_MOD("rwdt", 402,R8A7792_CLK_R),
>  DEF_MOD("irqc", 407,R8A7792_CLK_CP),
>  DEF_MOD("intc-sys", 408,R8A7792_CLK_ZS),
>  DEF_MOD("audio-dmac0", 502,R8A7792_CLK_HP),
> @@ -154,6 +155,7 @@ static const struct mssr_mod_clk r8a7792_mod_clks[] __initconst = {
>  };
>
>  static const unsigned int r8a7792_crit_mod_clks[] __initconst = {
> +MOD_CLK_ID(402),/* RWDT */
>  MOD_CLK_ID(408),/* INTC-SYS (GIC) */
>  };
>
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node
  2018-02-08 10:34 ` [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node Geert Uytterhoeven
@ 2018-02-12 17:51   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:51 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node
>
> Add a device node for the Watchdog Timer (WDT) controller on the Renesas
> R-Car V2H (r8a7792) SoC.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7792.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
> index bea0f12f03d36195..d2cf8dd2d9b03624 100644
> --- a/arch/arm/boot/dts/r8a7792.dtsi
> +++ b/arch/arm/boot/dts/r8a7792.dtsi
> @@ -101,6 +101,16 @@
>  #size-cells = <2>;
>  ranges;
>
> +rwdt: watchdog@e6020000 {
> +compatible = "renesas,r8a7792-wdt",
> +     "renesas,rcar-gen2-wdt";
> +reg = <0 0xe6020000 0 0x0c>;
> +clocks = <&cpg CPG_MOD 402>;
> +power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
> +resets = <&cpg 402>;
> +status = "disabled";
> +};
> +
>  gpio0: gpio@e6050000 {
>  compatible = "renesas,gpio-r8a7792",
>       "renesas,rcar-gen2-gpio";
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 03/11] ARM: dts: r8a7793: Add RWDT node
  2018-02-08 10:34 ` [PATCH/RFC 03/11] ARM: dts: r8a7793: " Geert Uytterhoeven
@ 2018-02-12 17:52   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:52 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 03/11] ARM: dts: r8a7793: Add RWDT node
>
> Add a device node for the Watchdog Timer (WDT) controller on the Renesas
> R-Car M2-N (r8a7793) SoC.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7793.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
> index f0e0415682f89440..5a06ad1788b27ff1 100644
> --- a/arch/arm/boot/dts/r8a7793.dtsi
> +++ b/arch/arm/boot/dts/r8a7793.dtsi
> @@ -126,6 +126,16 @@
>  #size-cells = <2>;
>  ranges;
>
> +rwdt: watchdog@e6020000 {
> +compatible = "renesas,r8a7793-wdt",
> +     "renesas,rcar-gen2-wdt";
> +reg = <0 0xe6020000 0 0x0c>;
> +clocks = <&cpg CPG_MOD 402>;
> +power-domains = <&sysc R8A7793_PD_ALWAYS_ON>;
> +resets = <&cpg 402>;
> +status = "disabled";
> +};
> +
>  gpio0: gpio@e6050000 {
>  compatible = "renesas,gpio-r8a7793",
>       "renesas,rcar-gen2-gpio";
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support Geert Uytterhoeven
@ 2018-02-12 17:52   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:52 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7790-lager.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 7892b113ecaa14c6..4d8fb09fdbb816a5 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -860,6 +860,11 @@
>  };
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &ssi1 {
>  shared-pin;
>  };
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 05/11] ARM: dts: koelsch: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 05/11] ARM: dts: koelsch: " Geert Uytterhoeven
@ 2018-02-12 17:52   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:52 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 05/11] ARM: dts: koelsch: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7791-koelsch.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index a50924d12b6f37d5..c90462dbcd36c836 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -499,6 +499,11 @@
>  status = "okay";
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &sata0 {
>  status = "okay";
>  };
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 06/11] ARM: dts: porter: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 06/11] ARM: dts: porter: " Geert Uytterhoeven
@ 2018-02-12 17:53   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:53 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 06/11] ARM: dts: porter: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7791-porter.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts
> index 9a02d03b23c2b7e9..7d06fb24bcdf2fee 100644
> --- a/arch/arm/boot/dts/r8a7791-porter.dts
> +++ b/arch/arm/boot/dts/r8a7791-porter.dts
> @@ -449,6 +449,11 @@
>  };
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &ssi1 {
>  shared-pin;
>  };
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 07/11] ARM: dts: blanche: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 07/11] ARM: dts: blanche: " Geert Uytterhoeven
@ 2018-02-12 17:53   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:53 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 07/11] ARM: dts: blanche: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7792-blanche.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7792-blanche.dts b/arch/arm/boot/dts/r8a7792-blanche.dts
> index 9b67dca6c9ef550d..04fb70931b3b0772 100644
> --- a/arch/arm/boot/dts/r8a7792-blanche.dts
> +++ b/arch/arm/boot/dts/r8a7792-blanche.dts
> @@ -239,6 +239,11 @@
>  };
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &scif0 {
>  pinctrl-0 = <&scif0_pins>;
>  pinctrl-names = "default";
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 08/11] ARM: dts: wheat: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 08/11] ARM: dts: wheat: " Geert Uytterhoeven
@ 2018-02-12 17:54   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:54 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 08/11] ARM: dts: wheat: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7792-wheat.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7792-wheat.dts b/arch/arm/boot/dts/r8a7792-wheat.dts
> index b9471b67b72829de..293b9e3b3e70d7b8 100644
> --- a/arch/arm/boot/dts/r8a7792-wheat.dts
> +++ b/arch/arm/boot/dts/r8a7792-wheat.dts
> @@ -168,6 +168,11 @@
>  };
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &scif0 {
>  pinctrl-0 = <&scif0_pins>;
>  pinctrl-names = "default";
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 09/11] ARM: dts: gose: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 09/11] ARM: dts: gose: " Geert Uytterhoeven
@ 2018-02-12 17:54   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:54 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 09/11] ARM: dts: gose: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7793-gose.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
> index 51b3ffac8efaad1d..1c8b4f1b5257216c 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -446,6 +446,11 @@
>  status = "okay";
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &scif0 {
>  pinctrl-0 = <&scif0_pins>;
>  pinctrl-names = "default";
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 10/11] ARM: dts: alt: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 10/11] ARM: dts: alt: " Geert Uytterhoeven
@ 2018-02-12 17:55   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:55 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 10/11] ARM: dts: alt: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7794-alt.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
> index 60c6515c499660eb..fdc4a311648dc30d 100644
> --- a/arch/arm/boot/dts/r8a7794-alt.dts
> +++ b/arch/arm/boot/dts/r8a7794-alt.dts
> @@ -295,6 +295,11 @@
>  status = "okay";
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &sdhi0 {
>  pinctrl-0 = <&sdhi0_pins>;
>  pinctrl-1 = <&sdhi0_pins_uhs>;
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [PATCH/RFC 11/11] ARM: dts: silk: Enable watchdog support
  2018-02-08 10:34 ` [PATCH/RFC 11/11] ARM: dts: silk: " Geert Uytterhoeven
@ 2018-02-12 17:55   ` Fabrizio Castro
  0 siblings, 0 replies; 27+ messages in thread
From: Fabrizio Castro @ 2018-02-12 17:55 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm
  Cc: Wolfram Sang, Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

> Subject: [PATCH/RFC 11/11] ARM: dts: silk: Enable watchdog support
>
> Enable the watchdog, so the board can be restarted by a watchdog
> timeout.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
>  arch/arm/boot/dts/r8a7794-silk.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
> index edfad0e5ac53a0c1..993f83c70dedbb30 100644
> --- a/arch/arm/boot/dts/r8a7794-silk.dts
> +++ b/arch/arm/boot/dts/r8a7794-silk.dts
> @@ -457,6 +457,11 @@
>  };
>  };
>
> +&rwdt {
> +timeout-sec = <60>;
> +status = "okay";
> +};
> +
>  &ssi1 {
>  shared-pin;
>  };
> --
> 2.7.4




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* Re: [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support
  2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
                   ` (11 preceding siblings ...)
  2018-02-09 10:11 ` [PATCH/RFC 00/11] ARM: dts: rcar-gen2: " Geert Uytterhoeven
@ 2018-02-13  8:26 ` Simon Horman
  12 siblings, 0 replies; 27+ messages in thread
From: Simon Horman @ 2018-02-13  8:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, Fabrizio Castro, Wolfram Sang, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram, linux-renesas-soc

On Thu, Feb 08, 2018 at 11:34:06AM +0100, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> This patch series enables the builtin watchdog timer on R-Car Gen2 SoCs
> on all supported boards, and builds on top of Fabrizio's "[RFC v4 00/26]
> Fix watchdog on Renesas R-Car Gen2 and RZ/G1".  It is marked RFC as it
> is known not to work on all SoCs and SoC revisions.
> 
> Based on my experiments, there are 3 success/failure modes:
> 
>   1. It works!
> 
>      This is the case on R-Car M2-N ES1.0 and E2 ES1.0 (tested on gose
>      and alt).
> 
>   2. The system hangs on watchdog timeout, unless only the first CPU
>      core is in use.
>      This can be achieved by booting with "maxcpus=1", or by manually
>      offlining all secondary CPU cores first:
> 
>          for i in /sys/*/*/cpu/cpu[1-9]*; do echo 0 > $i/online; done
> 
>      This is the case on R-Car H2 ES1.0 and M2-W ES1.0 (tested on lager
>      and koelsch).
> 
>   3. The system hangs on watchdog timeout, unless the kernel was built
>      with CONFIG_SMP disabled.
> 
>      This is the case on R-Car V2H ES1.1 (tested on blanche).
>      Presumably the restart part in the new shmobile_boot_vector_gen2 is
>      not compatible with R-Car V2H in some way (CPU off/onlining does
>      work).
> 
> Once we know on which SoCs and revisions it does work, we can add the
> proper checks. Right now I'm thinking of adding something like:
> 
>     if (IS_ENABLED(CONFIG_SMP) && maxcpus > 1 &&
> 	soc_device_match(rcar_gen2_wdt_needs_up))
> 	    return -ENODEV;
> 
> to the watchdog's probe function (assumed we can fix
> shmobile_boot_vector_gen2 for R-Car V2H, else we need more checks).
> 
> For your convenience, Fabrizio's and my series are available in the
> topic/rcar-gen2-wdt-v4 resp. topic/rcar-gen2-wdt-v4+ branches of my
> renesas-drivers git repository at
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.
> 
> shmobile_defconfig should enable all support needed for testing.
> 
> Test procedure:
> 
>     cat > /dev/watchdog0 & for i in $(seq 100); do echo $i; sleep 1; done
> 
> If everything goes well, the board should reboot after 60 seconds.
> 
> Note that on several boards there are multiple watchdogs (RWDT and
> DA9063 PMIC):
> 
>     # ls -l /dev/watchdog*
>     crw------- 1 root root  10, 130 Jan  1  2000 /dev/watchdog
>     crw------- 1 root root 247,   0 Jan  1  2000 /dev/watchdog0
>     crw------- 1 root root 247,   1 Jan  1  2000 /dev/watchdog1
> 
> /dev/watchdog always corresponds to /dev/watchdog0.
> The first one is usually the RWDT. If you want to be 100% sure, look in
> sysfs for devices with the (dynamic!) major matching the /dev/watchdog*
> files:
> 
>     # find /sys/devices/ -name dev | xargs grep 247:
>     /sys/devices/platform/soc/e6020000.watchdog/watchdog/watchdog0/dev:247:0
>     /sys/devices/platform/soc/e60b0000.i2c/i2c-6/6-0058/da9063-watchdog/watchdog/watchdog1/dev:247:1
> 
> Thanks for testing, especially on newer revisions of R-Car H2, M2-W, and
> V2H, and on other boards!
> 
> Geert Uytterhoeven (11):
>   clk: renesas: r8a7792: Add rwdt clock
>   ARM: dts: r8a7792: Add RWDT node
>   ARM: dts: r8a7793: Add RWDT node
>   ARM: dts: lager: Enable watchdog support
>   ARM: dts: koelsch: Enable watchdog support
>   ARM: dts: porter: Enable watchdog support
>   ARM: dts: blanche: Enable watchdog support
>   ARM: dts: wheat: Enable watchdog support
>   ARM: dts: gose: Enable watchdog support
>   ARM: dts: alt: Enable watchdog support
>   ARM: dts: silk: Enable watchdog support

Thanks, "dts" patches applied for v4.17.

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

* Re: [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support
  2018-02-09 10:11 ` [PATCH/RFC 00/11] ARM: dts: rcar-gen2: " Geert Uytterhoeven
@ 2018-02-14 15:42   ` Geert Uytterhoeven
  0 siblings, 0 replies; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-14 15:42 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Fabrizio Castro, Wolfram Sang,
	Chris Paterson, Biju Das, Ramesh Shanmugasundaram, Linux-Renesas

On Fri, Feb 9, 2018 at 11:11 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Thu, Feb 8, 2018 at 11:34 AM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>> This patch series enables the builtin watchdog timer on R-Car Gen2 SoCs
>> on all supported boards, and builds on top of Fabrizio's "[RFC v4 00/26]
>> Fix watchdog on Renesas R-Car Gen2 and RZ/G1".  It is marked RFC as it
>> is known not to work on all SoCs and SoC revisions.
>>
>> Based on my experiments, there are 3 success/failure modes:
>>
>>   1. It works!
>>
>>      This is the case on R-Car M2-N ES1.0 and E2 ES1.0 (tested on gose
>>      and alt).
>
> It also succeeds on R-Car M2-W ES3.0 (tested on porter).

I have received a success report for R-Car H2 ES2.0 on lager, too.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock
  2018-02-12 17:50   ` Fabrizio Castro
@ 2018-02-20 12:52     ` Geert Uytterhoeven
  0 siblings, 0 replies; 27+ messages in thread
From: Geert Uytterhoeven @ 2018-02-20 12:52 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Wolfram Sang,
	Chris Paterson, Biju Das, Ramesh Shanmugasundaram,
	linux-renesas-soc

On Mon, Feb 12, 2018 at 6:50 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
>> Subject: [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock
>>
>> Add "rwdt" clock to r8a7792_mod_clks. Also, since we may need to access
>> the watchdog registers at any time, declare the clock as critical.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Acked-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

Thanks, queued in clk-renesas-for-v4.17.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2018-02-20 12:52 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 10:34 [PATCH/RFC 00/11] ARM: dts: rcar-gen2: Enable watchdog support Geert Uytterhoeven
2018-02-08 10:34 ` [PATCH/RFC 01/11] clk: renesas: r8a7792: Add rwdt clock Geert Uytterhoeven
2018-02-12 17:50   ` Fabrizio Castro
2018-02-20 12:52     ` Geert Uytterhoeven
2018-02-08 10:34 ` [PATCH/RFC 02/11] ARM: dts: r8a7792: Add RWDT node Geert Uytterhoeven
2018-02-12 17:51   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 03/11] ARM: dts: r8a7793: " Geert Uytterhoeven
2018-02-12 17:52   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 04/11] ARM: dts: lager: Enable watchdog support Geert Uytterhoeven
2018-02-12 17:52   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 05/11] ARM: dts: koelsch: " Geert Uytterhoeven
2018-02-12 17:52   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 06/11] ARM: dts: porter: " Geert Uytterhoeven
2018-02-12 17:53   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 07/11] ARM: dts: blanche: " Geert Uytterhoeven
2018-02-12 17:53   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 08/11] ARM: dts: wheat: " Geert Uytterhoeven
2018-02-12 17:54   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 09/11] ARM: dts: gose: " Geert Uytterhoeven
2018-02-12 17:54   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 10/11] ARM: dts: alt: " Geert Uytterhoeven
2018-02-12 17:55   ` Fabrizio Castro
2018-02-08 10:34 ` [PATCH/RFC 11/11] ARM: dts: silk: " Geert Uytterhoeven
2018-02-12 17:55   ` Fabrizio Castro
2018-02-09 10:11 ` [PATCH/RFC 00/11] ARM: dts: rcar-gen2: " Geert Uytterhoeven
2018-02-14 15:42   ` Geert Uytterhoeven
2018-02-13  8:26 ` Simon Horman

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.