* [PATCH v3 1/5] dt-bindings: watchdog: factor out RZ/A watchdog
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
@ 2025-10-07 15:20 ` Wolfram Sang
2025-10-08 10:04 ` Geert Uytterhoeven
2025-10-07 15:20 ` [PATCH v3 2/5] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-07 15:20 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v2:
* none
.../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..ba922c3f7b10
--- /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>
+
+ 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] 13+ messages in thread* Re: [PATCH v3 1/5] dt-bindings: watchdog: factor out RZ/A watchdog
2025-10-07 15:20 ` [PATCH v3 1/5] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
@ 2025-10-08 10:04 ` Geert Uytterhoeven
0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 10:04 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Magnus Damm,
linux-watchdog, devicetree
On Tue, 7 Oct 2025 at 17:20, 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
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] 13+ messages in thread
* [PATCH v3 2/5] dt-bindings: watchdog: factor out RZ/N1 watchdog
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
2025-10-07 15:20 ` [PATCH v3 1/5] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
@ 2025-10-07 15:20 ` Wolfram Sang
2025-10-08 10:19 ` Geert Uytterhoeven
2025-10-07 15:20 ` [PATCH v3 3/5] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-07 15:20 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v2:
* none
.../bindings/watchdog/renesas,rzn1-wdt.yaml | 48 +++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 6 ---
2 files changed, 48 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..0efc9a92fa51
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
@@ -0,0 +1,48 @@
+# 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:
+ - const: 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>
+
+ 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] 13+ messages in thread* Re: [PATCH v3 2/5] dt-bindings: watchdog: factor out RZ/N1 watchdog
2025-10-07 15:20 ` [PATCH v3 2/5] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
@ 2025-10-08 10:19 ` Geert Uytterhoeven
0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 10:19 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 17:20, 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzn1-wdt.yaml
RZ/N1 does not support "timeout-sec", right? As this detail was not
expressed before, you may want to mention that in the patch description.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
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] 13+ messages in thread
* [PATCH v3 3/5] dt-bindings: watchdog: factor out RZ/G2L watchdog
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
2025-10-07 15:20 ` [PATCH v3 1/5] dt-bindings: watchdog: factor out RZ/A watchdog Wolfram Sang
2025-10-07 15:20 ` [PATCH v3 2/5] dt-bindings: watchdog: factor out RZ/N1 watchdog Wolfram Sang
@ 2025-10-07 15:20 ` Wolfram Sang
2025-10-08 10:25 ` Geert Uytterhoeven
2025-10-07 15:20 ` [PATCH v3 4/5] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-07 15:20 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Guenter Roeck, Lad Prabhakar, Biju Das,
Wim Van Sebroeck, 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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v2:
* simplified some 'enum' to 'const'
* added tag from Biju (Thanks!)
.../bindings/watchdog/renesas,rzg2l-wdt.yaml | 110 ++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 45 +------
2 files changed, 111 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..837e4cb33dd3
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
@@ -0,0 +1,110 @@
+# 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:
+ - const: 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:
+ const: renesas,rzg2l-wdt
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ interrupt-names:
+ minItems: 2
+ required:
+ - interrupt-names
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+ interrupt-names: false
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/r9a07g044-cpg.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ 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] 13+ messages in thread* Re: [PATCH v3 3/5] dt-bindings: watchdog: factor out RZ/G2L watchdog
2025-10-07 15:20 ` [PATCH v3 3/5] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
@ 2025-10-08 10:25 ` Geert Uytterhoeven
0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 10:25 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Guenter Roeck, Lad Prabhakar, Biju Das,
Wim Van Sebroeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 17:20, 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,rzg2l-wdt.yaml
> @@ -0,0 +1,110 @@
> +# 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:
> + - const: 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:
> + const: renesas,rzg2l-wdt
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + interrupt-names:
> + minItems: 2
> + required:
> + - interrupt-names
> + else:
> + properties:
> + interrupts:
> + maxItems: 1
> + interrupt-names: false
I am not a big fan of explicitly forbidding *-names in case
there is just one, if the first name still makes sense.
Regardless:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
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] 13+ messages in thread
* [PATCH v3 4/5] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
` (2 preceding siblings ...)
2025-10-07 15:20 ` [PATCH v3 3/5] dt-bindings: watchdog: factor out RZ/G2L watchdog Wolfram Sang
@ 2025-10-07 15:20 ` Wolfram Sang
2025-10-08 10:36 ` Geert Uytterhoeven
2025-10-07 15:20 ` [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H Wolfram Sang
2025-10-08 13:17 ` [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
5 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-07 15:20 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v2:
* simplified some 'enum' to 'const'
* moved entries with only one compatible to the bottom of the list
.../watchdog/renesas,r9a09g057-wdt.yaml | 109 ++++++++++++++++++
.../bindings/watchdog/renesas,wdt.yaml | 97 +---------------
2 files changed, 114 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..0562f4afbd42
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
@@ -0,0 +1,109 @@
+# 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)
+
+ - items:
+ - const: renesas,r9a09g087-wdt # RZ/N2H
+ - const: renesas,r9a09g077-wdt # RZ/T2H
+
+ - enum:
+ - renesas,r9a09g057-wdt # RZ/V2H(P)
+ - 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
+ - clock-names
+ - power-domains
+
+allOf:
+ - $ref: watchdog.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g057-wdt
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ clock-names:
+ minItems: 2
+ else:
+ properties:
+ clocks:
+ maxItems: 1
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a09g077-wdt
+ then:
+ properties:
+ resets: false
+ clock-names:
+ maxItems: 1
+ reg:
+ minItems: 2
+ else:
+ properties:
+ reg:
+ maxItems: 1
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/renesas,r9a09g057-cpg.h>
+
+ 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] 13+ messages in thread* Re: [PATCH v3 4/5] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog
2025-10-07 15:20 ` [PATCH v3 4/5] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
@ 2025-10-08 10:36 ` Geert Uytterhoeven
0 siblings, 0 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 10:36 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Guenter Roeck, Lad Prabhakar, Wim Van Sebroeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Magnus Damm,
linux-watchdog, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 17:20, 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
> @@ -0,0 +1,109 @@
> +# 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)
> +
> + - items:
> + - const: renesas,r9a09g087-wdt # RZ/N2H
> + - const: renesas,r9a09g077-wdt # RZ/T2H
> +
> + - enum:
> + - renesas,r9a09g057-wdt # RZ/V2H(P)
> + - renesas,r9a09g077-wdt # RZ/T2H
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g057-wdt
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + clock-names:
> + minItems: 2
> + else:
> + properties:
> + clocks:
> + maxItems: 1
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g077-wdt
> + then:
> + properties:
> + resets: false
> + clock-names:
> + maxItems: 1
> + reg:
> + minItems: 2
> + else:
> + properties:
> + reg:
> + maxItems: 1
Both if-statements can be merged, as the second test condition boils
down to the inverse of the first.
The rest LGTM.
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] 13+ messages in thread
* [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
` (3 preceding siblings ...)
2025-10-07 15:20 ` [PATCH v3 4/5] dt-bindings: watchdog: factor out RZ/V2H(P) watchdog Wolfram Sang
@ 2025-10-07 15:20 ` Wolfram Sang
2025-10-08 10:45 ` Geert Uytterhoeven
2025-10-08 13:17 ` [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Rob Herring
5 siblings, 1 reply; 13+ messages in thread
From: Wolfram Sang @ 2025-10-07 15:20 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
Normally, RWDT and SWDT can share the same binding. But on R-Car V3H,
SWDT misses the reset bit. Add this exception.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v2:
* new patch
.../devicetree/bindings/watchdog/renesas,wdt.yaml | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 08ba128bf442..727f034e7f92 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -39,6 +39,7 @@ properties:
- renesas,r8a77965-wdt # R-Car M3-N
- renesas,r8a77970-wdt # R-Car V3M
- renesas,r8a77980-wdt # R-Car V3H
+ - renesas,r8a77980-swdt # R-Car V3H SWDT (no reset)
- renesas,r8a77990-wdt # R-Car E3
- renesas,r8a77995-wdt # R-Car D3
- const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2
@@ -74,11 +75,22 @@ required:
- clocks
- interrupts
- power-domains
- - resets
allOf:
- $ref: watchdog.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r8a77980-swdt
+ then:
+ properties:
+ resets: false
+ else:
+ required:
+ - resets
+
additionalProperties: false
examples:
--
2.47.2
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H
2025-10-07 15:20 ` [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H Wolfram Sang
@ 2025-10-08 10:45 ` Geert Uytterhoeven
2025-10-08 13:40 ` Wolfram Sang
0 siblings, 1 reply; 13+ messages in thread
From: Geert Uytterhoeven @ 2025-10-08 10:45 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
Hi Wolfram,
On Tue, 7 Oct 2025 at 17:20, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Normally, RWDT and SWDT can share the same binding. But on R-Car V3H,
> SWDT misses the reset bit. Add this exception.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
> --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
> @@ -39,6 +39,7 @@ properties:
> - renesas,r8a77965-wdt # R-Car M3-N
> - renesas,r8a77970-wdt # R-Car V3M
> - renesas,r8a77980-wdt # R-Car V3H
> + - renesas,r8a77980-swdt # R-Car V3H SWDT (no reset)
The SWDT module on R-Car V3H is still identical to the RWDT module,
and the RWDT/SWDT modules on other R-Car Gen3 SoCs. It is merely
the integration into the SoC that differs. Hence I don't think a new
compatible value is warranted.
> - renesas,r8a77990-wdt # R-Car E3
> - renesas,r8a77995-wdt # R-Car D3
> - const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2
> @@ -74,11 +75,22 @@ required:
> - clocks
> - interrupts
> - power-domains
> - - resets
>
> allOf:
> - $ref: watchdog.yaml#
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r8a77980-swdt
> + then:
> + properties:
> + resets: false
> + else:
> + required:
> + - resets
> +
Instead, I would just make the resets property optional (i.e. not
required) for renesas,r8a77980-wdt.
Of course, I wouldn't be surprised if the MSSR does have a reset bit to
control SWDT on R-Car V3H. But it may be a bit hard to flip the
suspected bit on a system with remote access, as it requires modifying
firmware permissions?
> additionalProperties: false
>
> examples:
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] 13+ messages in thread* Re: [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H
2025-10-08 10:45 ` Geert Uytterhoeven
@ 2025-10-08 13:40 ` Wolfram Sang
0 siblings, 0 replies; 13+ messages in thread
From: Wolfram Sang @ 2025-10-08 13:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
Magnus Damm, linux-watchdog, devicetree
[-- Attachment #1: Type: text/plain, Size: 955 bytes --]
Hi Geert,
thanks for the reviews!
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: renesas,r8a77980-swdt
> > + then:
> > + properties:
> > + resets: false
> > + else:
> > + required:
> > + - resets
> > +
>
> Instead, I would just make the resets property optional (i.e. not
> required) for renesas,r8a77980-wdt.
Oh, I like that idea! Because you are right the IP core is the same.
> Of course, I wouldn't be surprised if the MSSR does have a reset bit to
> control SWDT on R-Car V3H. But it may be a bit hard to flip the
> suspected bit on a system with remote access, as it requires modifying
> firmware permissions?
Well, in the docs *every* SoC except V3H has it expressed. So, I
consider it officially unsupported. And I don't feel like digging out
why.
I'll implement your suggestion.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs
2025-10-07 15:20 [PATCH v3 0/5] dt-bindings: watchdog: factor out RZ watchdogs Wolfram Sang
` (4 preceding siblings ...)
2025-10-07 15:20 ` [PATCH v3 5/5] dt-bindings: watchdog: renesas,wdt: add SWDT exception for V3H Wolfram Sang
@ 2025-10-08 13:17 ` Rob Herring
5 siblings, 0 replies; 13+ messages in thread
From: Rob Herring @ 2025-10-08 13:17 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Biju Das, Conor Dooley, devicetree,
Geert Uytterhoeven, Guenter Roeck, Krzysztof Kozlowski,
Lad Prabhakar, linux-watchdog, Magnus Damm, Wim Van Sebroeck
On Tue, Oct 7, 2025 at 10:20 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Minor changes since v2 are documented in each individual patch. Main
> change is that patch 5 is added to keep dependency handling low.
My tag from v1 is missing on patches 1-4.
Rob
^ permalink raw reply [flat|nested] 13+ messages in thread