Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add the Exynos7885 watchdog
@ 2026-12-04 17:48 Paul Menzel
  2026-12-04 17:48 ` [PATCH 1/3] dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible Paul Menzel
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paul Menzel @ 2026-12-04 17:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Paul Menzel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Peter Griffin, Alim Akhtar, David Virag, Umer Uddin,
	linux-watchdog, devicetree, linux-arm-kernel, linux-samsung-soc

The Exynos7885 has the usual Samsung watchdog at 0x10060000, controlled
through the PMU like on Exynos7, but with bit 24 in DISABLE_WDT,
MASK_WDT_RESET and RST_STAT. Add the compatible, the driver variant and
the SoC node (disabled).

The values come from Samsung’s kernel source for the SM-T510 (Linux
4.4) [1]: the samsung,exynos8-wdt variant of s3c2410_wdt.c, which the
SoC uses, with mask and reset status bit 24 [2], and the watchdog node
of the SoC device tree [3].

Patches 1 and 2 are for the watchdog tree, patch 3 for the Samsung SoC
tree.

Tested on the Samsung Galaxy Tab A 10.1 (2019, Wi-Fi, SM-T510) with a
board device tree that enables the node (not upstream yet – it is meant
to share a dtsi with the SM-T515, exynos7885-gta3xllte): the timer runs
and is petted through /dev/watchdog, an unexpected close resets the SoC
after the 60 s margin, and RST_STAT bit 24 shows the watchdog reset in
the next boot. dt_binding_check, and dtbs_check of the Exynos7885
boards with the node enabled, report nothing.

I found no other work on this watchdog on the lists.

Claude Code (claude-opus-5-5) helped with this series: it looked up the
values in Samsung’s kernel source and device tree for the SM-T510,
wrote the changes and commit messages, ran the checks, and ran the tests
on the tablet. Each patch carries a note saying so.

[1]: https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/tree/00e4b9481434f9b0b644925a9bb2feaf3940219d
[2]: https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/blob/00e4b9481434f9b0b644925a9bb2feaf3940219d/drivers/watchdog/s3c2410_wdt.c#L181-L200
[3]: https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/blob/00e4b9481434f9b0b644925a9bb2feaf3940219d/arch/arm64/boot/dts/exynos/dtbo/exynos7885.dts#L1976-L1984

Paul Menzel (3):
  dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible
  watchdog: s3c2410_wdt: Add Exynos7885 support
  arm64: dts: exynos: exynos7885: Add the watchdog

 .../devicetree/bindings/watchdog/samsung-wdt.yaml    |  4 +++-
 arch/arm64/boot/dts/exynos/exynos7885.dtsi           | 11 +++++++++++
 drivers/watchdog/s3c2410_wdt.c                       | 12 ++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)


base-commit: 0b5bb03d26a268f2606e3f574b277a1105136328
-- 
2.54.0



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

* [PATCH 1/3] dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible
  2026-12-04 17:48 [PATCH 0/3] Add the Exynos7885 watchdog Paul Menzel
@ 2026-12-04 17:48 ` Paul Menzel
  2026-12-04 17:48 ` [PATCH 2/3] watchdog: s3c2410_wdt: Add Exynos7885 support Paul Menzel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2026-12-04 17:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Paul Menzel, Krzysztof Kozlowski, Peter Griffin, Alim Akhtar,
	David Virag, Umer Uddin, linux-watchdog, devicetree,
	linux-arm-kernel, linux-samsung-soc

Document the watchdog of the Exynos7885 SoC. It has a bus clock and a
separate source clock (OSCCLK) for the counter, and there is a single
instance, whose reset is masked through the PMU. So, like the
Exynos5515, it needs samsung,syscon-phandle but no samsung,cluster-index.

It is not compatible with samsung,exynos7-wdt: the PMU bits differ (24
instead of 23), and it has the second clock.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---

Notes:
    Prepared with Claude Code (claude-opus-5-5): vendor source lookup, the change, the commit message, the schema checks and the test runs on the SM-T510.

 Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
index 37d9fc9b68f47..15314824c0703 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml
@@ -24,6 +24,7 @@ properties:
           - samsung,exynos5420-wdt                # for Exynos5420
           - samsung,exynos5515-wdt
           - samsung,exynos7-wdt                   # for Exynos7
+          - samsung,exynos7885-wdt
           - samsung,exynos850-wdt                 # for Exynos850
           - samsung,exynos8855-wdt
           - samsung,exynos990-wdt                 # for Exynos990
@@ -59,7 +60,7 @@ properties:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
       Phandle to the PMU system controller node (in case of Exynos5250,
-      Exynos5420, Exynos5515, Exynos7, Exynos850, Exynos8855, Exynos990 and gs101).
+      Exynos5420, Exynos5515, Exynos7, Exynos7885, Exynos850, Exynos8855, Exynos990 and gs101).
 
 required:
   - compatible
@@ -102,6 +103,7 @@ allOf:
           contains:
             enum:
               - samsung,exynos5515-wdt
+              - samsung,exynos7885-wdt
     then:
       properties:
         clocks:
-- 
2.54.0



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

* [PATCH 2/3] watchdog: s3c2410_wdt: Add Exynos7885 support
  2026-12-04 17:48 [PATCH 0/3] Add the Exynos7885 watchdog Paul Menzel
  2026-12-04 17:48 ` [PATCH 1/3] dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible Paul Menzel
@ 2026-12-04 17:48 ` Paul Menzel
  2026-12-04 17:48 ` [PATCH 3/3] arm64: dts: exynos: exynos7885: Add the watchdog Paul Menzel
  2026-12-05 16:44 ` [PATCH 0/3] Add the Exynos7885 watchdog David Virag
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2026-12-04 17:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Krzysztof Kozlowski,
	Peter Griffin, Alim Akhtar
  Cc: Paul Menzel, Rob Herring, Conor Dooley, David Virag, Umer Uddin,
	linux-watchdog, devicetree, linux-arm-kernel, linux-samsung-soc

The watchdog at 0x10060000 on the Exynos7885 is controlled through the
same PMU registers as on Exynos7 (DISABLE_WDT 0x408, MASK_WDT_RESET
0x40c, RST_STAT 0x404), but with bit 24 instead of 23. The values come
from Samsung’s vendor kernel for the Galaxy Tab A 10.1 (2019), which
uses its "samsung,exynos8-wdt" variant for this SoC (mask and reset
status bit 24), and from that kernel’s log on the SM-T510:

    s3c2410-wdt 10060000.watchdog: DISABLE_WDT reg val:  ffffffff, MASK_WDT_RESET reg val: ffffffff
    s3c2410-wdt 10060000.watchdog: DISABLE_WDT reg val:  feffffff, MASK_WDT_RESET reg val: feffffff
    s3c2410-wdt 10060000.watchdog: Mask_wdt_reset set false done, mask = 0

Tested on the Samsung Galaxy Tab A 10.1 (2019, Wi-Fi, SM-T510) with
`s3c2410_wdt.tmr_atboot=1 s3c2410_wdt.tmr_margin=60`: the driver
probes, both PMU registers then read 0xfeffffff (bit 24 clear), and the
timer is petted through /dev/watchdog:

    s3c2410-wdt 10060000.watchdog: starting watchdog timer
    s3c2410-wdt 10060000.watchdog: watchdog active, reset enabled, irq disabled

After closing /dev/watchdog without the magic character ("watchdog did
not stop!"), the SoC resets 60 s later. In the next boot, RST_STAT reads
0x01000000 (bit 24), against 0x20000000 after a software reset.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---

Notes:
    Prepared with Claude Code (claude-opus-5-5): vendor source lookup, the change, the commit message, the schema checks and the test runs on the SM-T510.

 drivers/watchdog/s3c2410_wdt.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index ab04ae9374d25..67d4e55093b9b 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -259,6 +259,16 @@ static const struct s3c2410_wdt_variant drv_data_exynos7 = {
 		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_AUTO_DISABLE,
 };
 
+static const struct s3c2410_wdt_variant drv_data_exynos7885 = {
+	.disable_reg = EXYNOS5_WDT_DISABLE_REG_OFFSET,
+	.mask_reset_reg = EXYNOS5_WDT_MASK_RESET_REG_OFFSET,
+	.mask_bit = 24,
+	.rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
+	.rst_stat_bit = 24,
+	.quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET |
+		  QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_AUTO_DISABLE,
+};
+
 static const struct s3c2410_wdt_variant drv_data_exynos850_cl0 = {
 	.mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN,
 	.mask_bit = 2,
@@ -420,6 +430,8 @@ static const struct of_device_id s3c2410_wdt_match[] = {
 	  .data = &drv_data_exynos5515 },
 	{ .compatible = "samsung,exynos7-wdt",
 	  .data = &drv_data_exynos7 },
+	{ .compatible = "samsung,exynos7885-wdt",
+	  .data = &drv_data_exynos7885 },
 	{ .compatible = "samsung,exynos850-wdt",
 	  .data = &drv_data_exynos850_cl0 },
 	{ .compatible = "samsung,exynos8855-wdt",
-- 
2.54.0



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

* [PATCH 3/3] arm64: dts: exynos: exynos7885: Add the watchdog
  2026-12-04 17:48 [PATCH 0/3] Add the Exynos7885 watchdog Paul Menzel
  2026-12-04 17:48 ` [PATCH 1/3] dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible Paul Menzel
  2026-12-04 17:48 ` [PATCH 2/3] watchdog: s3c2410_wdt: Add Exynos7885 support Paul Menzel
@ 2026-12-04 17:48 ` Paul Menzel
  2026-12-05 16:44 ` [PATCH 0/3] Add the Exynos7885 watchdog David Virag
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Menzel @ 2026-12-04 17:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Peter Griffin, Alim Akhtar
  Cc: Paul Menzel, Krzysztof Kozlowski, David Virag, Umer Uddin,
	linux-watchdog, devicetree, linux-arm-kernel, linux-samsung-soc

Add the watchdog at 0x10060000, disabled by default like on Exynos850.
Interrupt, clocks and PMU handle follow Samsung’s vendor device tree for
the SoC (SPI 233, WDT_CLUSTER1 gate, OSCCLK as counter clock).

Tested on the Samsung Galaxy Tab A 10.1 (2019, Wi-Fi, SM-T510), whose
device tree enables the node: the watchdog resets the SoC 60 s after an
unexpected close of /dev/watchdog.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---

Notes:
    Prepared with Claude Code (claude-opus-5-5): vendor source lookup, the change, the commit message, the schema checks and the test runs on the SM-T510.

 arch/arm64/boot/dts/exynos/exynos7885.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos7885.dtsi b/arch/arm64/boot/dts/exynos/exynos7885.dtsi
index 6b994b487107e..24711ea9467de 100644
--- a/arch/arm64/boot/dts/exynos/exynos7885.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7885.dtsi
@@ -222,6 +222,17 @@ cmu_peri: clock-controller@10010000 {
 				      "dout_peri_usi2";
 		};
 
+		watchdog: watchdog@10060000 {
+			compatible = "samsung,exynos7885-wdt";
+			reg = <0x10060000 0x100>;
+			interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu_peri CLK_GOUT_WDT1_PCLK>, <&oscclk>;
+			clock-names = "watchdog", "watchdog_src";
+			samsung,syscon-phandle = <&pmu_system_controller>;
+
+			status = "disabled";
+		};
+
 		cmu_core: clock-controller@12000000 {
 			compatible = "samsung,exynos7885-cmu-core";
 			reg = <0x12000000 0x8000>;
-- 
2.54.0



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

* Re: [PATCH 0/3] Add the Exynos7885 watchdog
  2026-12-04 17:48 [PATCH 0/3] Add the Exynos7885 watchdog Paul Menzel
                   ` (2 preceding siblings ...)
  2026-12-04 17:48 ` [PATCH 3/3] arm64: dts: exynos: exynos7885: Add the watchdog Paul Menzel
@ 2026-12-05 16:44 ` David Virag
  3 siblings, 0 replies; 5+ messages in thread
From: David Virag @ 2026-12-05 16:44 UTC (permalink / raw)
  To: Paul Menzel, Wim Van Sebroeck, Guenter Roeck
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Peter Griffin,
	Alim Akhtar, Umer Uddin, linux-watchdog, devicetree,
	linux-arm-kernel, linux-samsung-soc

On Fri, 2026-12-04 at 18:48 +0100, Paul Menzel wrote:
> The Exynos7885 has the usual Samsung watchdog at 0x10060000,
> controlled
> through the PMU like on Exynos7, but with bit 24 in DISABLE_WDT,
> MASK_WDT_RESET and RST_STAT. Add the compatible, the driver variant
> and
> the SoC node (disabled).
> 
> The values come from Samsung’s kernel source for the SM-T510 (Linux
> 4.4) [1]: the samsung,exynos8-wdt variant of s3c2410_wdt.c, which the
> SoC uses, with mask and reset status bit 24 [2], and the watchdog
> node
> of the SoC device tree [3].
> 
> Patches 1 and 2 are for the watchdog tree, patch 3 for the Samsung
> SoC
> tree.
> 
> Tested on the Samsung Galaxy Tab A 10.1 (2019, Wi-Fi, SM-T510) with a
> board device tree that enables the node (not upstream yet – it is
> meant
> to share a dtsi with the SM-T515, exynos7885-gta3xllte): the timer
> runs
> and is petted through /dev/watchdog, an unexpected close resets the
> SoC
> after the 60 s margin, and RST_STAT bit 24 shows the watchdog reset
> in
> the next boot. dt_binding_check, and dtbs_check of the Exynos7885
> boards with the node enabled, report nothing.
> 
> I found no other work on this watchdog on the lists.
> 
> Claude Code (claude-opus-5-5) helped with this series: it looked up
> the
> values in Samsung’s kernel source and device tree for the SM-T510,
> wrote the changes and commit messages, ran the checks, and ran the
> tests
> on the tablet. Each patch carries a note saying so.
> 
> [1]:
> https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/tree/00e4b9481434f9b0b644925a9bb2feaf3940219d
> [2]:
> https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/blob/00e4b9481434f9b0b644925a9bb2feaf3940219d/drivers/watchdog/s3c2410_wdt.c#L181-L200
> [3]:
> https://github.com/gta3xlwifi-dev/android_kernel_gta3xlwifi/blob/00e4b9481434f9b0b644925a9bb2feaf3940219d/arch/arm64/boot/dts/exynos/dtbo/exynos7885.dts#L1976-L1984
> 
> Paul Menzel (3):
>   dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible
>   watchdog: s3c2410_wdt: Add Exynos7885 support
>   arm64: dts: exynos: exynos7885: Add the watchdog
> 
>  .../devicetree/bindings/watchdog/samsung-wdt.yaml    |  4 +++-
>  arch/arm64/boot/dts/exynos/exynos7885.dtsi           | 11
> +++++++++++
>  drivers/watchdog/s3c2410_wdt.c                       | 12
> ++++++++++++
>  3 files changed, 26 insertions(+), 1 deletion(-)
> 
> 
> base-commit: 0b5bb03d26a268f2606e3f574b277a1105136328

For the whole set:

Exynos7885 has two watchdogs. The other one is present at 0x10050000
like on the Exynos850. The IRQ I haven't tested but I suspect it to be
232. As for the PMU registers, I currently have no information.

This is the reason I haven't submitted WDT patches so far, as the other
WDT is kind of undocumented currently.

If information on this gets discovered, then at least the DT bindings
will probably be wrong, as samsung,cluster-index will be needed.

Best regards,
David


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

end of thread, other threads:[~2026-12-05 16:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 17:48 [PATCH 0/3] Add the Exynos7885 watchdog Paul Menzel
2026-12-04 17:48 ` [PATCH 1/3] dt-bindings: watchdog: samsung-wdt: Add Exynos7885 compatible Paul Menzel
2026-12-04 17:48 ` [PATCH 2/3] watchdog: s3c2410_wdt: Add Exynos7885 support Paul Menzel
2026-12-04 17:48 ` [PATCH 3/3] arm64: dts: exynos: exynos7885: Add the watchdog Paul Menzel
2026-12-05 16:44 ` [PATCH 0/3] Add the Exynos7885 watchdog David Virag

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox