Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH v2 0/2]  watchdog: realtek-otto: add fallback compatible
@ 2026-05-12 20:48 Sander Vanheule
  2026-05-12 20:48 ` [PATCH v2 1/2] dt-bindings: watchdog: realtek,otto-wdt: Add " Sander Vanheule
  2026-05-12 20:48 ` [PATCH v2 2/2] watchdog: realtek-otto: add " Sander Vanheule
  0 siblings, 2 replies; 3+ messages in thread
From: Sander Vanheule @ 2026-05-12 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Rustam Adilov, linux-watchdog, devicetree, linux-kernel,
	Sander Vanheule

Like for the GPIO hardware of the Realtek Otto platform, add a fallback
compatible for the watchdog hardware.

For backward compatibility, the binding will still allow current
single-compatible devicetrees to work, but new devicetrees, including
new compatibles, should use a two-component compatible.

This series serves to address comments regarding the device compatibles
for the patches adding RTL9607C watchdog support [1].

[1] https://lore.kernel.org/lkml/20260509163101.722793-1-adilov@disroot.org/

Sander Vanheule (2):
  dt-bindings: watchdog: realtek,otto-wdt: Add fallback compatible
  watchdog: realtek-otto: add fallback compatible

 .../bindings/watchdog/realtek,otto-wdt.yaml   | 22 ++++++++++++++-----
 drivers/watchdog/realtek_otto_wdt.c           |  2 ++
 2 files changed, 18 insertions(+), 6 deletions(-)

-- 
2.54.0


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

* [PATCH v2 1/2] dt-bindings: watchdog: realtek,otto-wdt: Add fallback compatible
  2026-05-12 20:48 [PATCH v2 0/2] watchdog: realtek-otto: add fallback compatible Sander Vanheule
@ 2026-05-12 20:48 ` Sander Vanheule
  2026-05-12 20:48 ` [PATCH v2 2/2] watchdog: realtek-otto: add " Sander Vanheule
  1 sibling, 0 replies; 3+ messages in thread
From: Sander Vanheule @ 2026-05-12 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Rustam Adilov, linux-watchdog, devicetree, linux-kernel,
	Sander Vanheule

As all known hardware instantiations of this watchdog behave the same, a
fallback compatible can be added.

To remain compatible with existing single-compatible bindings, the
current compatibles are duplicated. New compatibles should only be added
to the list with fallback.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
Changes since v1:
- Fix indendations
- Add deprecated property to old compatible
- Use two-part compatible in example
---
 .../bindings/watchdog/realtek,otto-wdt.yaml   | 22 ++++++++++++++-----
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml b/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
index 1f5390a67cdb..e470e0fcbb2a 100644
--- a/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml
@@ -25,11 +25,21 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - realtek,rtl8380-wdt
-      - realtek,rtl8390-wdt
-      - realtek,rtl9300-wdt
-      - realtek,rtl9310-wdt
+    oneOf:
+      - items:
+          - enum:
+              - realtek,rtl8380-wdt
+              - realtek,rtl8390-wdt
+              - realtek,rtl9300-wdt
+              - realtek,rtl9310-wdt
+          - const: realtek,otto-wdt
+      # Legacy without fallback, do not extend
+      - deprecated: true
+        enum:
+          - realtek,rtl8380-wdt
+          - realtek,rtl8390-wdt
+          - realtek,rtl9300-wdt
+          - realtek,rtl9310-wdt
 
   reg:
     maxItems: 1
@@ -74,7 +84,7 @@ unevaluatedProperties: false
 examples:
   - |
     watchdog: watchdog@3150 {
-        compatible = "realtek,rtl8380-wdt";
+        compatible = "realtek,rtl8380-wdt", "realtek,otto-wdt";
         reg = <0x3150 0xc>;
 
         realtek,reset-mode = "soc";
-- 
2.54.0


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

* [PATCH v2 2/2] watchdog: realtek-otto: add fallback compatible
  2026-05-12 20:48 [PATCH v2 0/2] watchdog: realtek-otto: add fallback compatible Sander Vanheule
  2026-05-12 20:48 ` [PATCH v2 1/2] dt-bindings: watchdog: realtek,otto-wdt: Add " Sander Vanheule
@ 2026-05-12 20:48 ` Sander Vanheule
  1 sibling, 0 replies; 3+ messages in thread
From: Sander Vanheule @ 2026-05-12 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Rustam Adilov, linux-watchdog, devicetree, linux-kernel,
	Sander Vanheule

As the binding now supports a fallback compatible for (new) devicetrees,
let's add it to the list of supported compatibles. If new compatibles
are added to the binding, driver updates may no longer be required.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 drivers/watchdog/realtek_otto_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/realtek_otto_wdt.c b/drivers/watchdog/realtek_otto_wdt.c
index 2c30ddd574c5..b4eb2f87f991 100644
--- a/drivers/watchdog/realtek_otto_wdt.c
+++ b/drivers/watchdog/realtek_otto_wdt.c
@@ -350,6 +350,8 @@ static int otto_wdt_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id otto_wdt_ids[] = {
+	{ .compatible = "realtek,otto-wdt" },
+	/* Legacy bindings without fallback compatible */
 	{ .compatible = "realtek,rtl8380-wdt" },
 	{ .compatible = "realtek,rtl8390-wdt" },
 	{ .compatible = "realtek,rtl9300-wdt" },
-- 
2.54.0


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 20:48 [PATCH v2 0/2] watchdog: realtek-otto: add fallback compatible Sander Vanheule
2026-05-12 20:48 ` [PATCH v2 1/2] dt-bindings: watchdog: realtek,otto-wdt: Add " Sander Vanheule
2026-05-12 20:48 ` [PATCH v2 2/2] watchdog: realtek-otto: add " Sander Vanheule

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