From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B95D42EACFB for ; Fri, 26 Sep 2025 11:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758885750; cv=none; b=XL0YfdeGHhac2CmNZJ01Vz3uzbMN69zh4RucMqghHnfgX4N2gcFOhAlhQWUonaDdvad0d50csovZyDdvn58tn8zwAbAwj1b9ubs3S605o/qCnNNGa/nl6jDdrvLTN0xrvTMZ8AeQQjKPvASPKmxRAxcJ0OnY5GC6cFW8K5w5BOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758885750; c=relaxed/simple; bh=8bYo/6aqCww3aToUOS/AGXHFbutgdtCzvPw6sel43Hs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XHMWSlXqpaXNerkotY5SwHo24XP5J3/XIVD2N1wNcFkAw2xJN4gSubaO0waZKMqjZ/iwG5hwjYtgS6RopemNbVibtmKR39LrHEql7BLjQBfMPILacjToJaEnXt5UrRRkCGK2xw4c5soSZO5/yVBftVmwyMfem8LM+Tp51aq9aD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=XwGf0alr; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="XwGf0alr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=BhiUmQYYjGk4H/nTQ19raTZxwFZJwlsdtgP5//6mYvg=; b=XwGf0a lrdeRfywdyTPz59ztASjklUnMLlKXxsf8tGhAP/7JYZJDvorN28FpauWU5e4+ICU 98uZ2v2+zfkJYEHFz1fJads9loumI3I08ChueMVliq61Q5kPDeVLjWkTy82fH/bU VN2G/S8xIP4DsRjderFn1nUsqVBENw+nAqTzX9pju1tHUyhE9B9uFTLjBRY7PRkz 65lZj2eiAqJxpRQFL3E7X9vyWfLQ2xrfbgH7spV56Y8bUepzUIy++e0XXzOr5hiQ V1gGlepYJl/acUtmKcRHpmZsmiGO6ky+q7Jy9BtFNVG6EmnFm2s5f3FotZkEtNPT iTNWNGWN9voVI//A== Received: (qmail 2235347 invoked from network); 26 Sep 2025 13:22:23 +0200 Received: by mail.zeus03.de with UTF8SMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 26 Sep 2025 13:22:23 +0200 X-UD-Smtp-Session: l3s3148p1@PbXmf7I/pIsgAwDPXwQHAL/S9V79e5yL From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Biju Das , Lad Prabhakar , Wolfram Sang , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/4] dt-bindings: watchdog: factor out RZ/G2L watchdog Date: Fri, 26 Sep 2025 13:22:15 +0200 Message-ID: <20250926112218.28723-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250926112218.28723-1-wsa+renesas@sang-engineering.com> References: <20250926112218.28723-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- .../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 + +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 + #include + + 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 = , + ; + 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