From patchwork Mon Jun 13 15:05:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 581623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8A73CCA47B for ; Mon, 13 Jun 2022 18:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbiFMSrs (ORCPT ); Mon, 13 Jun 2022 14:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344214AbiFMSr2 (ORCPT ); Mon, 13 Jun 2022 14:47:28 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E6D4D9EA6; Mon, 13 Jun 2022 08:06:11 -0700 (PDT) X-IronPort-AV: E=Sophos;i="5.91,297,1647270000"; d="scan'208";a="122769637" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 14 Jun 2022 00:06:10 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6579642130CE; Tue, 14 Jun 2022 00:06:07 +0900 (JST) From: Phil Edworthy To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski Cc: Phil Edworthy , Wolfram Sang , Geert Uytterhoeven , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Subject: [PATCH v2 1/2] dt-bindings: watchdog: renesas,wdt: Add r9a09g011 (RZ/V2M) support Date: Mon, 13 Jun 2022 16:05:49 +0100 Message-Id: <20220613150550.70334-2-phil.edworthy@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220613150550.70334-1-phil.edworthy@renesas.com> References: <20220613150550.70334-1-phil.edworthy@renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Add the documentation for the r9a09g011 SoC, but in doing so also reorganise the doc to make it easier to read. Additionally, make the binding require an interrupt to be specified. Whilst the driver does not need an interrupt, all of the SoCs that use this binding actually provide one. Signed-off-by: Phil Edworthy Reviewed-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven --- v2: - Added minItems for interrupt-names and clock-names --- .../bindings/watchdog/renesas,wdt.yaml | 71 ++++++++++++------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml index a8d7dde5271b..7bb6ca6af882 100644 --- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml @@ -31,6 +31,11 @@ properties: - renesas,r9a07g054-wdt # RZ/V2L - const: renesas,rzg2l-wdt + - items: + - enum: + - renesas,r9a09g011-wdt # RZ/V2M + - const: renesas,rzv2m-wdt # RZ/V2M + - items: - enum: - renesas,r8a7742-wdt # RZ/G1H @@ -70,13 +75,29 @@ properties: reg: maxItems: 1 - interrupts: true - - interrupt-names: true - - clocks: true - - clock-names: true + interrupts: + minItems: 1 + items: + - description: Timeout + - description: Parity error + + interrupt-names: + minItems: 1 + items: + - const: wdt + - const: perrout + + clocks: + minItems: 1 + items: + - description: Register access clock + - description: Main clock + + clock-names: + minItems: 1 + items: + - const: pclk + - const: oscclk power-domains: maxItems: 1 @@ -89,6 +110,7 @@ properties: required: - compatible - reg + - interrupts - clocks allOf: @@ -113,31 +135,30 @@ allOf: contains: enum: - renesas,rzg2l-wdt + - renesas,rzv2m-wdt then: properties: - interrupts: - maxItems: 2 - interrupt-names: - items: - - const: wdt - - const: perrout clocks: - items: - - description: Register access clock - - description: Main clock + minItems: 2 clock-names: - items: - - const: pclk - - const: oscclk + minItems: 2 required: - clock-names - - interrupt-names - else: + + - if: + properties: + compatible: + contains: + enum: + - renesas,rzg2l-wdt + then: properties: interrupts: - maxItems: 1 - clocks: - maxItems: 1 + minItems: 2 + interrupt-names: + minItems: 2 + required: + - interrupt-names additionalProperties: false @@ -145,9 +166,11 @@ examples: - | #include #include + #include wdt0: watchdog@e6020000 { compatible = "renesas,r8a7795-wdt", "renesas,rcar-gen3-wdt"; reg = <0xe6020000 0x0c>; + interrupts = ; clocks = <&cpg CPG_MOD 402>; power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; resets = <&cpg 402>;