Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: watchdog: factor out RZ/V2H(P) watchdog

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>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Wolfram Sang and committed by
Wim Van Sebroeck
fcba2855 909c8ea1

+104 -92
+99
Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/renesas,r9a09g057-wdt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas RZ/V2H(P) Watchdog Timer (WDT) Controller 8 + 9 + maintainers: 10 + - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - items: 16 + - enum: 17 + - renesas,r9a09g047-wdt # RZ/G3E 18 + - renesas,r9a09g056-wdt # RZ/V2N 19 + - const: renesas,r9a09g057-wdt # RZ/V2H(P) 20 + 21 + - items: 22 + - const: renesas,r9a09g087-wdt # RZ/N2H 23 + - const: renesas,r9a09g077-wdt # RZ/T2H 24 + 25 + - enum: 26 + - renesas,r9a09g057-wdt # RZ/V2H(P) 27 + - renesas,r9a09g077-wdt # RZ/T2H 28 + 29 + reg: 30 + minItems: 1 31 + maxItems: 2 32 + 33 + clocks: 34 + minItems: 1 35 + items: 36 + - description: Register access clock 37 + - description: Main clock 38 + 39 + clock-names: 40 + minItems: 1 41 + items: 42 + - const: pclk 43 + - const: oscclk 44 + 45 + power-domains: 46 + maxItems: 1 47 + 48 + resets: 49 + maxItems: 1 50 + 51 + timeout-sec: true 52 + 53 + required: 54 + - compatible 55 + - reg 56 + - clocks 57 + - clock-names 58 + - power-domains 59 + 60 + allOf: 61 + - $ref: watchdog.yaml# 62 + 63 + - if: 64 + properties: 65 + compatible: 66 + contains: 67 + const: renesas,r9a09g057-wdt 68 + then: 69 + properties: 70 + reg: 71 + maxItems: 1 72 + clocks: 73 + minItems: 2 74 + clock-names: 75 + minItems: 2 76 + else: 77 + properties: 78 + clocks: 79 + maxItems: 1 80 + clock-names: 81 + maxItems: 1 82 + reg: 83 + minItems: 2 84 + resets: false 85 + 86 + additionalProperties: false 87 + 88 + examples: 89 + - | 90 + #include <dt-bindings/clock/renesas,r9a09g057-cpg.h> 91 + 92 + watchdog@11c00400 { 93 + compatible = "renesas,r9a09g057-wdt"; 94 + reg = <0x11c00400 0x400>; 95 + clocks = <&cpg CPG_MOD 0x4b>, <&cpg CPG_MOD 0x4c>; 96 + clock-names = "pclk", "oscclk"; 97 + resets = <&cpg 0x75>; 98 + power-domains = <&cpg>; 99 + };
+5 -92
Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
··· 51 51 - renesas,r8a779h0-wdt # R-Car V4M 52 52 - const: renesas,rcar-gen4-wdt # R-Car Gen4 53 53 54 - - items: 55 - - enum: 56 - - renesas,r9a09g047-wdt # RZ/G3E 57 - - renesas,r9a09g056-wdt # RZ/V2N 58 - - const: renesas,r9a09g057-wdt # RZ/V2H(P) 59 - 60 - - enum: 61 - - renesas,r9a09g057-wdt # RZ/V2H(P) 62 - - renesas,r9a09g077-wdt # RZ/T2H 63 - 64 - - items: 65 - - const: renesas,r9a09g087-wdt # RZ/N2H 66 - - const: renesas,r9a09g077-wdt # RZ/T2H 67 - 68 54 reg: 69 - minItems: 1 70 - maxItems: 2 55 + maxItems: 1 71 56 72 57 interrupts: 73 58 maxItems: 1 74 59 75 60 clocks: 76 - minItems: 1 77 - items: 78 - - description: Register access clock 79 - - description: Main clock 80 - 81 - clock-names: 82 - minItems: 1 83 - items: 84 - - const: pclk 85 - - const: oscclk 61 + maxItems: 1 86 62 87 63 power-domains: 88 64 maxItems: 1 ··· 72 96 - compatible 73 97 - reg 74 98 - clocks 99 + - interrupts 100 + - power-domains 101 + - resets 75 102 76 103 allOf: 77 104 - $ref: watchdog.yaml# 78 - 79 - - if: 80 - not: 81 - properties: 82 - compatible: 83 - contains: 84 - enum: 85 - - renesas,r9a09g077-wdt 86 - then: 87 - required: 88 - - power-domains 89 - - resets 90 - 91 - - if: 92 - properties: 93 - compatible: 94 - contains: 95 - enum: 96 - - renesas,r9a09g057-wdt 97 - then: 98 - properties: 99 - clocks: 100 - minItems: 2 101 - clock-names: 102 - minItems: 2 103 - required: 104 - - clock-names 105 - else: 106 - properties: 107 - clocks: 108 - maxItems: 1 109 - 110 - - if: 111 - properties: 112 - compatible: 113 - contains: 114 - enum: 115 - - renesas,r9a09g057-wdt 116 - - renesas,r9a09g077-wdt 117 - then: 118 - properties: 119 - interrupts: false 120 - interrupt-names: false 121 - else: 122 - required: 123 - - interrupts 124 - 125 - - if: 126 - properties: 127 - compatible: 128 - contains: 129 - const: renesas,r9a09g077-wdt 130 - then: 131 - properties: 132 - resets: false 133 - clock-names: 134 - maxItems: 1 135 - reg: 136 - minItems: 2 137 - required: 138 - - clock-names 139 - - power-domains 140 - else: 141 - properties: 142 - reg: 143 - maxItems: 1 144 105 145 106 additionalProperties: false 146 107