* [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs
@ 2025-09-26 11:22 Wolfram Sang
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-09-26 11:22 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wolfram Sang, Conor Dooley, devicetree,
Geert Uytterhoeven, Guenter Roeck, Krzysztof Kozlowski,
linux-watchdog, Magnus Damm, Rob Herring, Wim Van Sebroeck
renesas,wdt.yaml describes lots of different hardware blocks which
results in complex if-structs. Factor out the different IP blocks into
their own files. I took over maintainership of the files for RZ/A and
RZ/N1 but if someone else wants them, very fine with me. RZ/G2L and
RZ/V2H have the original driver contributors as maintainers (Hi Biju, Hi
Prabhakar :)). If these need changes, please let me know, too.
Passes 'dt_binding_check' and 'dtbs_check' after each patch here.
Looking forward to comments.
Happy hacking!
Wolfram Sang (4):
dt-bindings: watchdog: factor out RZ/A watchdog
dt-bindings: watchdog: factor out RZ/N1 watchdog
dt-bindings: watchdog: factor out RZ/G2L watchdog
dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
.../watchdog/renesas,r9a09g057-wdt.yaml | 113 +++++++++++++
.../bindings/watchdog/renesas,rza-wdt.yaml | 51 ++++++
.../bindings/watchdog/renesas,rzg2l-wdt.yaml | 111 +++++++++++++
.../bindings/watchdog/renesas,rzn1-wdt.yaml | 49 ++++++
.../bindings/watchdog/renesas,wdt.yaml | 155 +-----------------
5 files changed, 330 insertions(+), 149 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
--
2.47.2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
@ 2025-09-26 11:22 ` Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
2025-10-02 9:53 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
` (3 subsequent siblings)
4 siblings, 2 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-09-26 11:22 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wolfram Sang, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Renesas created different watchdog IPs but they are all handled in the
same binding documentation. This leads to a lot of conditional handling
which makes it unnecessarily hard to add new items. Factor out the RZ/A
watchdog to make handling easier.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
.../bindings/watchdog/renesas,rza-wdt.yaml | 51 +++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 7 ---
2 files changed, 51 insertions(+), 7 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
new file mode 100644
index 000000000000..7078218e0759
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/renesas,rza-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/A Watchdog Timer (WDT) Controller
+
+maintainers:
+ - Wolfram Sang <wsa+renesas@sang-engineering.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - renesas,r7s72100-wdt # RZ/A1
+ - renesas,r7s9210-wdt # RZ/A2
+ - const: renesas,rza-wdt # RZ/A
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ timeout-sec: true
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+allOf:
+ - $ref: watchdog.yaml#
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r7s72100-clock.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ wdt: watchdog@fcfe0000 {
+ compatible = "renesas,r7s72100-wdt", "renesas,rza-wdt";
+ reg = <0xfcfe0000 0x6>;
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&p0_clk>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index b6e60162c263..8a25e0c6271f 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -13,12 +13,6 @@ maintainers:
properties:
compatible:
oneOf:
- - items:
- - enum:
- - renesas,r7s72100-wdt # RZ/A1
- - renesas,r7s9210-wdt # RZ/A2
- - const: renesas,rza-wdt # RZ/A
-
- items:
- enum:
- renesas,r9a06g032-wdt # RZ/N1D
@@ -140,7 +134,6 @@ allOf:
contains:
enum:
- renesas,r9a09g077-wdt
- - renesas,rza-wdt
- renesas,rzn1-wdt
then:
required:
--
2.47.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
@ 2025-09-26 11:22 ` Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
2025-10-02 10:02 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
` (2 subsequent siblings)
4 siblings, 2 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-09-26 11:22 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wolfram Sang, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Renesas created different watchdog IPs but they are all handled in the
same binding documentation. This leads to a lot of conditional handling
which makes it unnecessarily hard to add new items. Factor out the RZ/N1
watchdog to make handling easier.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
.../bindings/watchdog/renesas,rzn1-wdt.yaml | 49 +++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 6 ---
2 files changed, 49 insertions(+), 6 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
new file mode 100644
index 000000000000..01eab6cc1110
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/renesas,rzn1-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/N1 Watchdog Timer (WDT) Controller
+
+maintainers:
+ - Wolfram Sang <wsa+renesas@sang-engineering.com>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - renesas,r9a06g032-wdt # RZ/N1D
+ - const: renesas,rzn1-wdt # RZ/N1
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+allOf:
+ - $ref: watchdog.yaml#
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r9a06g032-sysctrl.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ wdt0: watchdog@40008000 {
+ compatible = "renesas,r9a06g032-wdt", "renesas,rzn1-wdt";
+ reg = <0x40008000 0x1000>;
+ interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&sysctrl R9A06G032_CLK_WATCHDOG>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 8a25e0c6271f..12ba07781763 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -13,11 +13,6 @@ maintainers:
properties:
compatible:
oneOf:
- - items:
- - enum:
- - renesas,r9a06g032-wdt # RZ/N1D
- - const: renesas,rzn1-wdt # RZ/N1
-
- items:
- enum:
- renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
@@ -134,7 +129,6 @@ allOf:
contains:
enum:
- renesas,r9a09g077-wdt
- - renesas,rzn1-wdt
then:
required:
- power-domains
--
2.47.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
2025-09-26 11:22 ` [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
@ 2025-09-26 11:22 ` Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:13 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
2025-10-02 2:23 ` [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
4 siblings, 2 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-09-26 11:22 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wolfram Sang, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Renesas created different watchdog IPs but they are all handled in the
same binding documentation. This leads to a lot of conditional handling
which makes it unnecessarily hard to add new items. Factor out the
RZ/G2L watchdog to make handling easier.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
.../bindings/watchdog/renesas,rzg2l-wdt.yaml | 111 ++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 45 +------
2 files changed, 112 insertions(+), 44 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
new file mode 100644
index 000000000000..77d325415280
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
@@ -0,0 +1,111 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/renesas,rzg2l-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/G2L Watchdog Timer (WDT) Controller
+
+maintainers:
+ - Biju Das <biju.das.jz@bp.renesas.com>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
+ - renesas,r9a07g044-wdt # RZ/G2{L,LC}
+ - renesas,r9a07g054-wdt # RZ/V2L
+ - renesas,r9a08g045-wdt # RZ/G3S
+ - const: renesas,rzg2l-wdt
+
+ - items:
+ - enum:
+ - renesas,r9a09g011-wdt # RZ/V2M
+ - const: renesas,rzv2m-wdt # RZ/V2M
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: Timeout
+ - description: Parity error
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: wdt
+ - const: perrout
+
+ clocks:
+ items:
+ - description: Register access clock
+ - description: Main clock
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: oscclk
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ timeout-sec: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - power-domains
+ - resets
+
+allOf:
+ - $ref: watchdog.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,rzg2l-wdt
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ interrupt-names:
+ minItems: 2
+ required:
+ - interrupt-names
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r9a07g044-cpg.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ wdt0: watchdog@12800800 {
+ compatible = "renesas,r9a07g044-wdt",
+ "renesas,rzg2l-wdt";
+ reg = <0x12800800 0x400>;
+ clocks = <&cpg CPG_MOD R9A07G044_WDT0_PCLK>,
+ <&cpg CPG_MOD R9A07G044_WDT0_CLK>;
+ clock-names = "pclk", "oscclk";
+ interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "wdt", "perrout";
+ resets = <&cpg R9A07G044_WDT0_PRESETN>;
+ power-domains = <&cpg>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 12ba07781763..2a15c012fd67 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -13,19 +13,6 @@ maintainers:
properties:
compatible:
oneOf:
- - items:
- - enum:
- - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
- - renesas,r9a07g044-wdt # RZ/G2{L,LC}
- - renesas,r9a07g054-wdt # RZ/V2L
- - renesas,r9a08g045-wdt # RZ/G3S
- - const: renesas,rzg2l-wdt
-
- - items:
- - enum:
- - renesas,r9a09g011-wdt # RZ/V2M
- - const: renesas,rzv2m-wdt # RZ/V2M
-
- items:
- enum:
- renesas,r8a7742-wdt # RZ/G1H
@@ -83,16 +70,7 @@ properties:
maxItems: 2
interrupts:
- minItems: 1
- items:
- - description: Timeout
- - description: Parity error
-
- interrupt-names:
- minItems: 1
- items:
- - const: wdt
- - const: perrout
+ maxItems: 1
clocks:
minItems: 1
@@ -140,8 +118,6 @@ allOf:
contains:
enum:
- renesas,r9a09g057-wdt
- - renesas,rzg2l-wdt
- - renesas,rzv2m-wdt
then:
properties:
clocks:
@@ -155,25 +131,6 @@ allOf:
clocks:
maxItems: 1
- - if:
- properties:
- compatible:
- contains:
- enum:
- - renesas,rzg2l-wdt
- then:
- properties:
- interrupts:
- minItems: 2
- interrupt-names:
- minItems: 2
- required:
- - interrupt-names
- else:
- properties:
- interrupts:
- maxItems: 1
-
- if:
properties:
compatible:
--
2.47.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
` (2 preceding siblings ...)
2025-09-26 11:22 ` [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
@ 2025-09-26 11:22 ` Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:33 ` Lad, Prabhakar
2025-10-02 2:23 ` [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
4 siblings, 2 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-09-26 11:22 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wolfram Sang, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Renesas created different watchdog IPs but they are all handled in the
same binding documentation. This leads to a lot of conditional handling
which makes it unnecessarily hard to add new items. Factor out the
RZ/V2H(P) watchdog to make handling easier.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
.../watchdog/renesas,r9a09g057-wdt.yaml | 113 ++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 97 +--------------
2 files changed, 118 insertions(+), 92 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
new file mode 100644
index 000000000000..2450ac856783
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/renesas,r9a09g057-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RZ/V2H(P) Watchdog Timer (WDT) Controller
+
+maintainers:
+ - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - renesas,r9a09g047-wdt # RZ/G3E
+ - renesas,r9a09g056-wdt # RZ/V2N
+ - const: renesas,r9a09g057-wdt # RZ/V2H(P)
+
+ - enum:
+ - renesas,r9a09g057-wdt # RZ/V2H(P)
+ - renesas,r9a09g077-wdt # RZ/T2H
+
+ - items:
+ - const: renesas,r9a09g087-wdt # RZ/N2H
+ - const: renesas,r9a09g077-wdt # RZ/T2H
+
+ reg:
+ minItems: 1
+ maxItems: 2
+
+ clocks:
+ minItems: 1
+ items:
+ - description: Register access clock
+ - description: Main clock
+
+ clock-names:
+ minItems: 1
+ items:
+ - const: pclk
+ - const: oscclk
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ timeout-sec: true
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+allOf:
+ - $ref: watchdog.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a09g057-wdt
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ minItems: 2
+ required:
+ - clock-names
+ else:
+ properties:
+ clocks:
+ maxItems: 1
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g077-wdt
+ then:
+ properties:
+ resets: false
+ clock-names:
+ maxItems: 1
+ reg:
+ minItems: 2
+ required:
+ - clock-names
+ - power-domains
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/renesas,r9a09g057-cpg.h>
+
+ wdt0: watchdog@11c00400 {
+ compatible = "renesas,r9a09g057-wdt";
+ reg = <0x11c00400 0x400>;
+ clocks = <&cpg CPG_MOD 0x4b>, <&cpg CPG_MOD 0x4c>;
+ clock-names = "pclk", "oscclk";
+ resets = <&cpg 0x75>;
+ power-domains = <&cpg>;
+ };
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 2a15c012fd67..08ba128bf442 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -51,38 +51,14 @@ properties:
- renesas,r8a779h0-wdt # R-Car V4M
- const: renesas,rcar-gen4-wdt # R-Car Gen4
- - items:
- - enum:
- - renesas,r9a09g047-wdt # RZ/G3E
- - renesas,r9a09g056-wdt # RZ/V2N
- - const: renesas,r9a09g057-wdt # RZ/V2H(P)
-
- - enum:
- - renesas,r9a09g057-wdt # RZ/V2H(P)
- - renesas,r9a09g077-wdt # RZ/T2H
-
- - items:
- - const: renesas,r9a09g087-wdt # RZ/N2H
- - const: renesas,r9a09g077-wdt # RZ/T2H
-
reg:
- minItems: 1
- maxItems: 2
+ maxItems: 1
interrupts:
maxItems: 1
clocks:
- minItems: 1
- items:
- - description: Register access clock
- - description: Main clock
-
- clock-names:
- minItems: 1
- items:
- - const: pclk
- - const: oscclk
+ maxItems: 1
power-domains:
maxItems: 1
@@ -96,76 +72,13 @@ required:
- compatible
- reg
- clocks
+ - interrupts
+ - power-domains
+ - resets
allOf:
- $ref: watchdog.yaml#
- - if:
- not:
- properties:
- compatible:
- contains:
- enum:
- - renesas,r9a09g077-wdt
- then:
- required:
- - power-domains
- - resets
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - renesas,r9a09g057-wdt
- then:
- properties:
- clocks:
- minItems: 2
- clock-names:
- minItems: 2
- required:
- - clock-names
- else:
- properties:
- clocks:
- maxItems: 1
-
- - if:
- properties:
- compatible:
- contains:
- enum:
- - renesas,r9a09g057-wdt
- - renesas,r9a09g077-wdt
- then:
- properties:
- interrupts: false
- interrupt-names: false
- else:
- required:
- - interrupts
-
- - if:
- properties:
- compatible:
- contains:
- const: renesas,r9a09g077-wdt
- then:
- properties:
- resets: false
- clock-names:
- maxItems: 1
- reg:
- minItems: 2
- required:
- - clock-names
- - power-domains
- else:
- properties:
- reg:
- maxItems: 1
-
additionalProperties: false
examples:
--
2.47.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
` (3 preceding siblings ...)
2025-09-26 11:22 ` [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
@ 2025-10-02 2:23 ` Rob Herring
2025-10-02 7:46 ` Wolfram Sang
4 siblings, 1 reply; 17+ messages in thread
From: Rob Herring @ 2025-10-02 2:23 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Conor Dooley,
devicetree, Geert Uytterhoeven, Guenter Roeck,
Krzysztof Kozlowski, linux-watchdog, Magnus Damm,
Wim Van Sebroeck
On Fri, Sep 26, 2025 at 01:22:12PM +0200, Wolfram Sang wrote:
> renesas,wdt.yaml describes lots of different hardware blocks which
> results in complex if-structs. Factor out the different IP blocks into
> their own files. I took over maintainership of the files for RZ/A and
> RZ/N1 but if someone else wants them, very fine with me. RZ/G2L and
> RZ/V2H have the original driver contributors as maintainers (Hi Biju, Hi
> Prabhakar :)). If these need changes, please let me know, too.
>
> Passes 'dt_binding_check' and 'dtbs_check' after each patch here.
> Looking forward to comments.
>
> Happy hacking!
>
>
> Wolfram Sang (4):
> dt-bindings: watchdog: factor out RZ/A watchdog
> dt-bindings: watchdog: factor out RZ/N1 watchdog
> dt-bindings: watchdog: factor out RZ/G2L watchdog
> dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
>
> .../watchdog/renesas,r9a09g057-wdt.yaml | 113 +++++++++++++
> .../bindings/watchdog/renesas,rza-wdt.yaml | 51 ++++++
> .../bindings/watchdog/renesas,rzg2l-wdt.yaml | 111 +++++++++++++
> .../bindings/watchdog/renesas,rzn1-wdt.yaml | 49 ++++++
> .../bindings/watchdog/renesas,wdt.yaml | 155 +-----------------
> 5 files changed, 330 insertions(+), 149 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Let me know if watchdog maintainers fail to pick this up. Seems to be
hit or miss for bindings...
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
@ 2025-10-02 2:30 ` Guenter Roeck
2025-10-02 9:53 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-10-02 2:30 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wim Van Sebroeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
On 9/26/25 04:22, Wolfram Sang wrote:
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the RZ/A
> watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> .../bindings/watchdog/renesas,rza-wdt.yaml | 51 +++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 7 ---
> 2 files changed, 51 insertions(+), 7 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
> new file mode 100644
> index 000000000000..7078218e0759
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rza-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/A Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Wolfram Sang <wsa+renesas@sang-engineering.com>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - renesas,r7s72100-wdt # RZ/A1
> + - renesas,r7s9210-wdt # RZ/A2
> + - const: renesas,rza-wdt # RZ/A
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r7s72100-clock.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt: watchdog@fcfe0000 {
> + compatible = "renesas,r7s72100-wdt", "renesas,rza-wdt";
> + reg = <0xfcfe0000 0x6>;
> + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&p0_clk>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index b6e60162c263..8a25e0c6271f 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,12 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r7s72100-wdt # RZ/A1
> - - renesas,r7s9210-wdt # RZ/A2
> - - const: renesas,rza-wdt # RZ/A
> -
> - items:
> - enum:
> - renesas,r9a06g032-wdt # RZ/N1D
> @@ -140,7 +134,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g077-wdt
> - - renesas,rza-wdt
> - renesas,rzn1-wdt
> then:
> required:
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog
2025-09-26 11:22 ` [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
@ 2025-10-02 2:30 ` Guenter Roeck
2025-10-02 10:02 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-10-02 2:30 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wim Van Sebroeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
On 9/26/25 04:22, Wolfram Sang wrote:
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the RZ/N1
> watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> .../bindings/watchdog/renesas,rzn1-wdt.yaml | 49 +++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 6 ---
> 2 files changed, 49 insertions(+), 6 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
> new file mode 100644
> index 000000000000..01eab6cc1110
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rzn1-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/N1 Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Wolfram Sang <wsa+renesas@sang-engineering.com>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - renesas,r9a06g032-wdt # RZ/N1D
> + - const: renesas,rzn1-wdt # RZ/N1
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r9a06g032-sysctrl.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt0: watchdog@40008000 {
> + compatible = "renesas,r9a06g032-wdt", "renesas,rzn1-wdt";
> + reg = <0x40008000 0x1000>;
> + interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> + clocks = <&sysctrl R9A06G032_CLK_WATCHDOG>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 8a25e0c6271f..12ba07781763 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,11 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r9a06g032-wdt # RZ/N1D
> - - const: renesas,rzn1-wdt # RZ/N1
> -
> - items:
> - enum:
> - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> @@ -134,7 +129,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g077-wdt
> - - renesas,rzn1-wdt
> then:
> required:
> - power-domains
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog
2025-09-26 11:22 ` [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
@ 2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:13 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-10-02 2:31 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wim Van Sebroeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
On 9/26/25 04:22, Wolfram Sang wrote:
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the
> RZ/G2L watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> .../bindings/watchdog/renesas,rzg2l-wdt.yaml | 111 ++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 45 +------
> 2 files changed, 112 insertions(+), 44 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> new file mode 100644
> index 000000000000..77d325415280
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rzg2l-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/G2L Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Biju Das <biju.das.jz@bp.renesas.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> + - renesas,r9a07g044-wdt # RZ/G2{L,LC}
> + - renesas,r9a07g054-wdt # RZ/V2L
> + - renesas,r9a08g045-wdt # RZ/G3S
> + - const: renesas,rzg2l-wdt
> +
> + - items:
> + - enum:
> + - renesas,r9a09g011-wdt # RZ/V2M
> + - const: renesas,rzv2m-wdt # RZ/V2M
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + minItems: 1
> + items:
> + - description: Timeout
> + - description: Parity error
> +
> + interrupt-names:
> + minItems: 1
> + items:
> + - const: wdt
> + - const: perrout
> +
> + clocks:
> + items:
> + - description: Register access clock
> + - description: Main clock
> +
> + clock-names:
> + items:
> + - const: pclk
> + - const: oscclk
> +
> + power-domains:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - power-domains
> + - resets
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,rzg2l-wdt
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + interrupt-names:
> + minItems: 2
> + required:
> + - interrupt-names
> + else:
> + properties:
> + interrupts:
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r9a07g044-cpg.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt0: watchdog@12800800 {
> + compatible = "renesas,r9a07g044-wdt",
> + "renesas,rzg2l-wdt";
> + reg = <0x12800800 0x400>;
> + clocks = <&cpg CPG_MOD R9A07G044_WDT0_PCLK>,
> + <&cpg CPG_MOD R9A07G044_WDT0_CLK>;
> + clock-names = "pclk", "oscclk";
> + interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "wdt", "perrout";
> + resets = <&cpg R9A07G044_WDT0_PRESETN>;
> + power-domains = <&cpg>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 12ba07781763..2a15c012fd67 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,19 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> - - renesas,r9a07g044-wdt # RZ/G2{L,LC}
> - - renesas,r9a07g054-wdt # RZ/V2L
> - - renesas,r9a08g045-wdt # RZ/G3S
> - - const: renesas,rzg2l-wdt
> -
> - - items:
> - - enum:
> - - renesas,r9a09g011-wdt # RZ/V2M
> - - const: renesas,rzv2m-wdt # RZ/V2M
> -
> - items:
> - enum:
> - renesas,r8a7742-wdt # RZ/G1H
> @@ -83,16 +70,7 @@ properties:
> maxItems: 2
>
> interrupts:
> - minItems: 1
> - items:
> - - description: Timeout
> - - description: Parity error
> -
> - interrupt-names:
> - minItems: 1
> - items:
> - - const: wdt
> - - const: perrout
> + maxItems: 1
>
> clocks:
> minItems: 1
> @@ -140,8 +118,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g057-wdt
> - - renesas,rzg2l-wdt
> - - renesas,rzv2m-wdt
> then:
> properties:
> clocks:
> @@ -155,25 +131,6 @@ allOf:
> clocks:
> maxItems: 1
>
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,rzg2l-wdt
> - then:
> - properties:
> - interrupts:
> - minItems: 2
> - interrupt-names:
> - minItems: 2
> - required:
> - - interrupt-names
> - else:
> - properties:
> - interrupts:
> - maxItems: 1
> -
> - if:
> properties:
> compatible:
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-09-26 11:22 ` [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
@ 2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:33 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-10-02 2:31 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Biju Das, Lad Prabhakar, Wim Van Sebroeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
On 9/26/25 04:22, Wolfram Sang wrote:
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the
> RZ/V2H(P) watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> .../watchdog/renesas,r9a09g057-wdt.yaml | 113 ++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 97 +--------------
> 2 files changed, 118 insertions(+), 92 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> new file mode 100644
> index 000000000000..2450ac856783
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> @@ -0,0 +1,113 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,r9a09g057-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/V2H(P) Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a09g047-wdt # RZ/G3E
> + - renesas,r9a09g056-wdt # RZ/V2N
> + - const: renesas,r9a09g057-wdt # RZ/V2H(P)
> +
> + - enum:
> + - renesas,r9a09g057-wdt # RZ/V2H(P)
> + - renesas,r9a09g077-wdt # RZ/T2H
> +
> + - items:
> + - const: renesas,r9a09g087-wdt # RZ/N2H
> + - const: renesas,r9a09g077-wdt # RZ/T2H
> +
> + reg:
> + minItems: 1
> + maxItems: 2
> +
> + clocks:
> + minItems: 1
> + items:
> + - description: Register access clock
> + - description: Main clock
> +
> + clock-names:
> + minItems: 1
> + items:
> + - const: pclk
> + - const: oscclk
> +
> + power-domains:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,r9a09g057-wdt
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + clock-names:
> + minItems: 2
> + required:
> + - clock-names
> + else:
> + properties:
> + clocks:
> + maxItems: 1
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g077-wdt
> + then:
> + properties:
> + resets: false
> + clock-names:
> + maxItems: 1
> + reg:
> + minItems: 2
> + required:
> + - clock-names
> + - power-domains
> + else:
> + properties:
> + reg:
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/renesas,r9a09g057-cpg.h>
> +
> + wdt0: watchdog@11c00400 {
> + compatible = "renesas,r9a09g057-wdt";
> + reg = <0x11c00400 0x400>;
> + clocks = <&cpg CPG_MOD 0x4b>, <&cpg CPG_MOD 0x4c>;
> + clock-names = "pclk", "oscclk";
> + resets = <&cpg 0x75>;
> + power-domains = <&cpg>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 2a15c012fd67..08ba128bf442 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -51,38 +51,14 @@ properties:
> - renesas,r8a779h0-wdt # R-Car V4M
> - const: renesas,rcar-gen4-wdt # R-Car Gen4
>
> - - items:
> - - enum:
> - - renesas,r9a09g047-wdt # RZ/G3E
> - - renesas,r9a09g056-wdt # RZ/V2N
> - - const: renesas,r9a09g057-wdt # RZ/V2H(P)
> -
> - - enum:
> - - renesas,r9a09g057-wdt # RZ/V2H(P)
> - - renesas,r9a09g077-wdt # RZ/T2H
> -
> - - items:
> - - const: renesas,r9a09g087-wdt # RZ/N2H
> - - const: renesas,r9a09g077-wdt # RZ/T2H
> -
> reg:
> - minItems: 1
> - maxItems: 2
> + maxItems: 1
>
> interrupts:
> maxItems: 1
>
> clocks:
> - minItems: 1
> - items:
> - - description: Register access clock
> - - description: Main clock
> -
> - clock-names:
> - minItems: 1
> - items:
> - - const: pclk
> - - const: oscclk
> + maxItems: 1
>
> power-domains:
> maxItems: 1
> @@ -96,76 +72,13 @@ required:
> - compatible
> - reg
> - clocks
> + - interrupts
> + - power-domains
> + - resets
>
> allOf:
> - $ref: watchdog.yaml#
>
> - - if:
> - not:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g077-wdt
> - then:
> - required:
> - - power-domains
> - - resets
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g057-wdt
> - then:
> - properties:
> - clocks:
> - minItems: 2
> - clock-names:
> - minItems: 2
> - required:
> - - clock-names
> - else:
> - properties:
> - clocks:
> - maxItems: 1
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g057-wdt
> - - renesas,r9a09g077-wdt
> - then:
> - properties:
> - interrupts: false
> - interrupt-names: false
> - else:
> - required:
> - - interrupts
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - const: renesas,r9a09g077-wdt
> - then:
> - properties:
> - resets: false
> - clock-names:
> - maxItems: 1
> - reg:
> - minItems: 2
> - required:
> - - clock-names
> - - power-domains
> - else:
> - properties:
> - reg:
> - maxItems: 1
> -
> additionalProperties: false
>
> examples:
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs
2025-10-02 2:23 ` [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
@ 2025-10-02 7:46 ` Wolfram Sang
0 siblings, 0 replies; 17+ messages in thread
From: Wolfram Sang @ 2025-10-02 7:46 UTC (permalink / raw)
To: Rob Herring
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Conor Dooley,
devicetree, Geert Uytterhoeven, Guenter Roeck,
Krzysztof Kozlowski, linux-watchdog, Magnus Damm,
Wim Van Sebroeck
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
> Let me know if watchdog maintainers fail to pick this up. Seems to be
> hit or miss for bindings...
Thanks. I think the WDT tree is the better choice here because this is
only a preparational cleanup for the actual changes...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
@ 2025-10-02 9:53 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Lad, Prabhakar @ 2025-10-02 9:53 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
Thank you for the patch.
On Fri, Sep 26, 2025 at 12:22 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the RZ/A
> watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> .../bindings/watchdog/renesas,rza-wdt.yaml | 51 +++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 7 ---
> 2 files changed, 51 insertions(+), 7 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
> new file mode 100644
> index 000000000000..7078218e0759
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rza-wdt.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rza-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/A Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Wolfram Sang <wsa+renesas@sang-engineering.com>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - renesas,r7s72100-wdt # RZ/A1
> + - renesas,r7s9210-wdt # RZ/A2
> + - const: renesas,rza-wdt # RZ/A
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r7s72100-clock.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt: watchdog@fcfe0000 {
we can get rid of the label, rest LGTM.
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> + compatible = "renesas,r7s72100-wdt", "renesas,rza-wdt";
> + reg = <0xfcfe0000 0x6>;
> + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&p0_clk>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index b6e60162c263..8a25e0c6271f 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,12 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r7s72100-wdt # RZ/A1
> - - renesas,r7s9210-wdt # RZ/A2
> - - const: renesas,rza-wdt # RZ/A
> -
> - items:
> - enum:
> - renesas,r9a06g032-wdt # RZ/N1D
> @@ -140,7 +134,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g077-wdt
> - - renesas,rza-wdt
> - renesas,rzn1-wdt
> then:
> required:
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog
2025-09-26 11:22 ` [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
@ 2025-10-02 10:02 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Lad, Prabhakar @ 2025-10-02 10:02 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
Thank you for the patch.
On Fri, Sep 26, 2025 at 12:22 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the RZ/N1
> watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> .../bindings/watchdog/renesas,rzn1-wdt.yaml | 49 +++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 6 ---
> 2 files changed, 49 insertions(+), 6 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
> new file mode 100644
> index 000000000000..01eab6cc1110
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rzn1-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/N1 Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Wolfram Sang <wsa+renesas@sang-engineering.com>
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - renesas,r9a06g032-wdt # RZ/N1D
We could make this const instead. But if the DT maintainers are OK we
can leave it as is.
> + - const: renesas,rzn1-wdt # RZ/N1
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r9a06g032-sysctrl.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt0: watchdog@40008000 {
we can get rid of the label, rest LGTM.
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> + compatible = "renesas,r9a06g032-wdt", "renesas,rzn1-wdt";
> + reg = <0x40008000 0x1000>;
> + interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> + clocks = <&sysctrl R9A06G032_CLK_WATCHDOG>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 8a25e0c6271f..12ba07781763 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,11 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r9a06g032-wdt # RZ/N1D
> - - const: renesas,rzn1-wdt # RZ/N1
> -
> - items:
> - enum:
> - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> @@ -134,7 +129,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g077-wdt
> - - renesas,rzn1-wdt
> then:
> required:
> - power-domains
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog
2025-09-26 11:22 ` [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
@ 2025-10-02 10:13 ` Lad, Prabhakar
1 sibling, 0 replies; 17+ messages in thread
From: Lad, Prabhakar @ 2025-10-02 10:13 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
Thank you for the patch.
On Fri, Sep 26, 2025 at 12:22 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the
> RZ/G2L watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> .../bindings/watchdog/renesas,rzg2l-wdt.yaml | 111 ++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 45 +------
> 2 files changed, 112 insertions(+), 44 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> new file mode 100644
> index 000000000000..77d325415280
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,rzg2l-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/G2L Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Biju Das <biju.das.jz@bp.renesas.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> + - renesas,r9a07g044-wdt # RZ/G2{L,LC}
> + - renesas,r9a07g054-wdt # RZ/V2L
> + - renesas,r9a08g045-wdt # RZ/G3S
> + - const: renesas,rzg2l-wdt
> +
> + - items:
> + - enum:
> + - renesas,r9a09g011-wdt # RZ/V2M
> + - const: renesas,rzv2m-wdt # RZ/V2M
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + minItems: 1
> + items:
> + - description: Timeout
> + - description: Parity error
> +
> + interrupt-names:
> + minItems: 1
> + items:
> + - const: wdt
> + - const: perrout
> +
> + clocks:
> + items:
> + - description: Register access clock
> + - description: Main clock
> +
> + clock-names:
> + items:
> + - const: pclk
> + - const: oscclk
> +
> + power-domains:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - power-domains
> + - resets
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,rzg2l-wdt
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + interrupt-names:
> + minItems: 2
> + required:
> + - interrupt-names
> + else:
> + properties:
> + interrupts:
> + maxItems: 1
For the RZ/V2M case we need maxItems: 1 for interrupt-names or
interrupt-names: false.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/r9a07g044-cpg.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + wdt0: watchdog@12800800 {
We can get rid of this label.
Rest LGTM,
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> + compatible = "renesas,r9a07g044-wdt",
> + "renesas,rzg2l-wdt";
> + reg = <0x12800800 0x400>;
> + clocks = <&cpg CPG_MOD R9A07G044_WDT0_PCLK>,
> + <&cpg CPG_MOD R9A07G044_WDT0_CLK>;
> + clock-names = "pclk", "oscclk";
> + interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "wdt", "perrout";
> + resets = <&cpg R9A07G044_WDT0_PRESETN>;
> + power-domains = <&cpg>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 12ba07781763..2a15c012fd67 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -13,19 +13,6 @@ maintainers:
> properties:
> compatible:
> oneOf:
> - - items:
> - - enum:
> - - renesas,r9a07g043-wdt # RZ/G2UL and RZ/Five
> - - renesas,r9a07g044-wdt # RZ/G2{L,LC}
> - - renesas,r9a07g054-wdt # RZ/V2L
> - - renesas,r9a08g045-wdt # RZ/G3S
> - - const: renesas,rzg2l-wdt
> -
> - - items:
> - - enum:
> - - renesas,r9a09g011-wdt # RZ/V2M
> - - const: renesas,rzv2m-wdt # RZ/V2M
> -
> - items:
> - enum:
> - renesas,r8a7742-wdt # RZ/G1H
> @@ -83,16 +70,7 @@ properties:
> maxItems: 2
>
> interrupts:
> - minItems: 1
> - items:
> - - description: Timeout
> - - description: Parity error
> -
> - interrupt-names:
> - minItems: 1
> - items:
> - - const: wdt
> - - const: perrout
> + maxItems: 1
>
> clocks:
> minItems: 1
> @@ -140,8 +118,6 @@ allOf:
> contains:
> enum:
> - renesas,r9a09g057-wdt
> - - renesas,rzg2l-wdt
> - - renesas,rzv2m-wdt
> then:
> properties:
> clocks:
> @@ -155,25 +131,6 @@ allOf:
> clocks:
> maxItems: 1
>
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,rzg2l-wdt
> - then:
> - properties:
> - interrupts:
> - minItems: 2
> - interrupt-names:
> - minItems: 2
> - required:
> - - interrupt-names
> - else:
> - properties:
> - interrupts:
> - maxItems: 1
> -
> - if:
> properties:
> compatible:
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-09-26 11:22 ` [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
@ 2025-10-02 10:33 ` Lad, Prabhakar
2025-10-02 11:49 ` Wolfram Sang
1 sibling, 1 reply; 17+ messages in thread
From: Lad, Prabhakar @ 2025-10-02 10:33 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
Thank you for the patch.
On Fri, Sep 26, 2025 at 12:22 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Renesas created different watchdog IPs but they are all handled in the
> same binding documentation. This leads to a lot of conditional handling
> which makes it unnecessarily hard to add new items. Factor out the
> RZ/V2H(P) watchdog to make handling easier.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> .../watchdog/renesas,r9a09g057-wdt.yaml | 113 ++++++++++++++++++
> .../bindings/watchdog/renesas,wdt.yaml | 97 +--------------
> 2 files changed, 118 insertions(+), 92 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
>
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> new file mode 100644
> index 000000000000..2450ac856783
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> @@ -0,0 +1,113 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/watchdog/renesas,r9a09g057-wdt.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/V2H(P) Watchdog Timer (WDT) Controller
> +
> +maintainers:
> + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - renesas,r9a09g047-wdt # RZ/G3E
> + - renesas,r9a09g056-wdt # RZ/V2N
> + - const: renesas,r9a09g057-wdt # RZ/V2H(P)
> +
> + - enum:
> + - renesas,r9a09g057-wdt # RZ/V2H(P)
> + - renesas,r9a09g077-wdt # RZ/T2H
> +
> + - items:
> + - const: renesas,r9a09g087-wdt # RZ/N2H
> + - const: renesas,r9a09g077-wdt # RZ/T2H
> +
> + reg:
> + minItems: 1
> + maxItems: 2
> +
> + clocks:
> + minItems: 1
> + items:
> + - description: Register access clock
> + - description: Main clock
> +
> + clock-names:
> + minItems: 1
> + items:
> + - const: pclk
> + - const: oscclk
> +
> + power-domains:
> + maxItems: 1
> +
> + resets:
> + maxItems: 1
> +
> + timeout-sec: true
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - $ref: watchdog.yaml#
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - renesas,r9a09g057-wdt
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + clock-names:
> + minItems: 2
> + required:
> + - clock-names
We could move this into the above required list as it is marked as
required for all the SoCs.
> + else:
> + properties:
> + clocks:
> + maxItems: 1
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g077-wdt
> + then:
> + properties:
> + resets: false
> + clock-names:
> + maxItems: 1
> + reg:
> + minItems: 2
> + required:
> + - clock-names
> + - power-domains
`power-domains` should be a required property for
`renesas,r9a09g057-wdt` case too. We can move this to the top level
required list as all the SoCs need it.
> + else:
> + properties:
> + reg:
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/renesas,r9a09g057-cpg.h>
> +
> + wdt0: watchdog@11c00400 {
We can get rid of this label.
Rest LGTM,
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> + compatible = "renesas,r9a09g057-wdt";
> + reg = <0x11c00400 0x400>;
> + clocks = <&cpg CPG_MOD 0x4b>, <&cpg CPG_MOD 0x4c>;
> + clock-names = "pclk", "oscclk";
> + resets = <&cpg 0x75>;
> + power-domains = <&cpg>;
> + };
> diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> index 2a15c012fd67..08ba128bf442 100644
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -51,38 +51,14 @@ properties:
> - renesas,r8a779h0-wdt # R-Car V4M
> - const: renesas,rcar-gen4-wdt # R-Car Gen4
>
> - - items:
> - - enum:
> - - renesas,r9a09g047-wdt # RZ/G3E
> - - renesas,r9a09g056-wdt # RZ/V2N
> - - const: renesas,r9a09g057-wdt # RZ/V2H(P)
> -
> - - enum:
> - - renesas,r9a09g057-wdt # RZ/V2H(P)
> - - renesas,r9a09g077-wdt # RZ/T2H
> -
> - - items:
> - - const: renesas,r9a09g087-wdt # RZ/N2H
> - - const: renesas,r9a09g077-wdt # RZ/T2H
> -
> reg:
> - minItems: 1
> - maxItems: 2
> + maxItems: 1
>
> interrupts:
> maxItems: 1
>
> clocks:
> - minItems: 1
> - items:
> - - description: Register access clock
> - - description: Main clock
> -
> - clock-names:
> - minItems: 1
> - items:
> - - const: pclk
> - - const: oscclk
> + maxItems: 1
>
> power-domains:
> maxItems: 1
> @@ -96,76 +72,13 @@ required:
> - compatible
> - reg
> - clocks
> + - interrupts
> + - power-domains
> + - resets
>
> allOf:
> - $ref: watchdog.yaml#
>
> - - if:
> - not:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g077-wdt
> - then:
> - required:
> - - power-domains
> - - resets
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g057-wdt
> - then:
> - properties:
> - clocks:
> - minItems: 2
> - clock-names:
> - minItems: 2
> - required:
> - - clock-names
> - else:
> - properties:
> - clocks:
> - maxItems: 1
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - renesas,r9a09g057-wdt
> - - renesas,r9a09g077-wdt
> - then:
> - properties:
> - interrupts: false
> - interrupt-names: false
> - else:
> - required:
> - - interrupts
> -
> - - if:
> - properties:
> - compatible:
> - contains:
> - const: renesas,r9a09g077-wdt
> - then:
> - properties:
> - resets: false
> - clock-names:
> - maxItems: 1
> - reg:
> - minItems: 2
> - required:
> - - clock-names
> - - power-domains
> - else:
> - properties:
> - reg:
> - maxItems: 1
> -
> additionalProperties: false
>
> examples:
> --
> 2.47.2
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-10-02 10:33 ` Lad, Prabhakar
@ 2025-10-02 11:49 ` Wolfram Sang
2025-10-02 19:56 ` Guenter Roeck
0 siblings, 1 reply; 17+ messages in thread
From: Wolfram Sang @ 2025-10-02 11:49 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
Hi Prabhakar,
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thanks for the fast and detailed reviews! From a glimpse, all your
comments make perfect sense to me, so I will send a v2 soon.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-10-02 11:49 ` Wolfram Sang
@ 2025-10-02 19:56 ` Guenter Roeck
0 siblings, 0 replies; 17+ messages in thread
From: Guenter Roeck @ 2025-10-02 19:56 UTC (permalink / raw)
To: Wolfram Sang, Lad, Prabhakar
Cc: linux-renesas-soc, Biju Das, Lad Prabhakar, Wim Van Sebroeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
On 10/2/25 04:49, Wolfram Sang wrote:
> Hi Prabhakar,
>
>> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Thanks for the fast and detailed reviews! From a glimpse, all your
> comments make perfect sense to me, so I will send a v2 soon.
>
Please keep my code review tag when sending v2.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-10-02 19:56 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 11:22 [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
2025-09-26 11:22 ` [PATCH 1/4] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
2025-10-02 9:53 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 2/4] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
2025-10-02 2:30 ` Guenter Roeck
2025-10-02 10:02 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:13 ` Lad, Prabhakar
2025-09-26 11:22 ` [PATCH 4/4] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
2025-10-02 2:31 ` Guenter Roeck
2025-10-02 10:33 ` Lad, Prabhakar
2025-10-02 11:49 ` Wolfram Sang
2025-10-02 19:56 ` Guenter Roeck
2025-10-02 2:23 ` [PATCH 0/4] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
2025-10-02 7:46 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).