From patchwork Fri Aug 30 13:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13785112 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46159CA0FEB for ; Fri, 30 Aug 2024 13:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DpeiQX4Jd1MKWI0V4N5akOWI0CvHFWy28Yf195oO568=; b=Har3NFQP0quWOrHlD/3dP+S4nW +qwh5DBvL7TcfT984LD84Gf/9ieTjr37+tFhnWSj2nSgYOL4Ij/Hxa+fMvXyDlF2MzC1raYBdClh5 sS4kMus1gxnCdXwX6JKweQRbEDFheAKtDixeOCbPK/8NdYRm7TndqjQuWTbfknOXq1p0vDaQUXdcn k4toYpe1fXOwBBOlG/q4dS6JJVlOb61iJ4Ok/WKPWUdFBsWmj/AVPZCcxX73jjRvREP+63JWzULTE 8HTh6JHFwVeWmTi/5FChabLJ9lizd9VmVuxZ2fPCvmao2vF87jdnemgjpHdbEdDLzI+QIhodGPFx5 31/yIT1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk1SB-00000006N5S-0jEK; Fri, 30 Aug 2024 13:14:15 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk1H0-00000006Jko-2b5j for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 13:02:44 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5334a8a1af7so1857961e87.2 for ; Fri, 30 Aug 2024 06:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1725022961; x=1725627761; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DpeiQX4Jd1MKWI0V4N5akOWI0CvHFWy28Yf195oO568=; b=LgCuoxYoig5E9AXqlQ6ZlXWWaMsn25JN8LYSDoObzl898m0z4t1D3I5vsJpdn6mCFU aqRBebJqUqeHkA26HLIk6DkV71EiMlYqbvNpB3RyyDcMsa7ehpZZq34nPZilc73B2PhC Q/tMaAx/7dwjs8oOITcnwxvmMd6C+RgiArEw41+vbliMEvW2hW/bfV1Rj8Ngfc1rWACg 8CYRa9uCHByVTu6U12lT+n8HzeT897Lmbv3SSHNFwmA+jObyeL25xqAxT4REj1+39oTU hLmXwh2th1Mi2rGUQRqeGqez8ZpxkLw51O28Q9nr1TcJS95vmUlEzbJjvZAQQUDfez1x JYJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725022961; x=1725627761; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DpeiQX4Jd1MKWI0V4N5akOWI0CvHFWy28Yf195oO568=; b=oY2R/PJcCPaIcy4y5nFUzukpM9ZT99RZugmjFQGuFw/hZlRHGPXogiy3c9Ej9Mwq6a R66UYBO+cwCZkDJYloQ9pU3CI0vlMbv/Lz4oe8Q0vudnmjZA7NKUNnowUohXjRCYpl8R P83j+E0VotrnPf+5FhAtGX70Mq/71uEK4/2hXBnK4aAGhjX0/2MHjy8gMifg5lHQAdny 29/RSEm8QPEL+DyC1l+NwTiWJsT1ULx/CunCe7wqJOYRd96RFgvoGbym877NgP8fMYgT XW5dnEIiRp6NhVBCRgkMAd+/DoVSZVlstPz7vbE37behtG/PedtNjnimkSK+MfBu9Mox S5zQ== X-Forwarded-Encrypted: i=1; AJvYcCUR9WQSGsLmFav1o9A9Z31Y6M42JyrDH4uvGX886VhUhthB4ciCeMJ5ekN0O1Hh4pQKrZSwOyM4Ti0lJfftR1WZ@lists.infradead.org X-Gm-Message-State: AOJu0Yyh8KIc5QBqLHe41d/Tp+jyy31pGdWOjF9ELW0fsFPUaX1aFpm0 CWGBM/QqFrKBd522nYbvmBsR/yIQocNnD1Bv6EwQ/X+/kOa1WYuEiRlvhR/Y1fg= X-Google-Smtp-Source: AGHT+IEWIQLtsvWqqztg1PR23TQmXh8GZ651LPqdLTXjQkWjM6VBB4/QlA6B9Gy/FjD+jLwhW9TeaQ== X-Received: by 2002:a05:6512:3f06:b0:52c:850b:cfc6 with SMTP id 2adb3069b0e04-53546b8dc43mr1532482e87.38.1725022960589; Fri, 30 Aug 2024 06:02:40 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ba642594dsm80361785e9.47.2024.08.30.06.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 06:02:40 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, alexandre.belloni@bootlin.com, magnus.damm@gmail.com, p.zabel@pengutronix.de Cc: claudiu.beznea@tuxon.dev, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH v3 05/12] dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RTCA-3 IP Date: Fri, 30 Aug 2024 16:02:11 +0300 Message-Id: <20240830130218.3377060-6-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240830130218.3377060-1-claudiu.beznea.uj@bp.renesas.com> References: <20240830130218.3377060-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_060242_701301_8CD540EE X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Claudiu Beznea Document the RTC IP (RTCA-3) available on the Renesas RZ/G3S SoC. The RTC IP available on Renesas RZ/V2H is almost identical with the one found on Renesas RZ/G3S (it misses the time capture functionality which is not yet implemented on proposed driver). For this, added also a generic compatible that will be used at the moment as fallback for both RZ/G3S and RZ/V2H. Signed-off-by: Claudiu Beznea Reviewed-by: Rob Herring (Arm) --- Changes in v3: - added RTC bus clock, reset and power-domain; it has been detected by reverse engineering that RTC and VBATTB clock, reset and power domain are shared; HW manual doesn't mention it - updated example with these and with assigned-clock properties needed to configure the VBATTCLK MUX with proper parent - updated example section with dt-bindings/clock/r9a08g045-cpg.h and dt-bindings/clock/r9a08g045-vbattb.h includes - for all these, dropped Conor's Rb tag Changes in v2: - updated patch description and title - included reference to rtc.yaml - updated compatible list with a generic compatible as explained in patch description; with this the node in examples section has also been updated - used items to describe interrupts, interrupt-names, clock, clock-names - updated title section .../bindings/rtc/renesas,rz-rtca3.yaml | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml diff --git a/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml b/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml new file mode 100644 index 000000000000..bc99795dfb6b --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/renesas,rz-rtca3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RTCA-3 Real Time Clock + +maintainers: + - Claudiu Beznea + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + items: + - enum: + - renesas,r9a08g045-rtca3 # RZ/G3S + - const: renesas,rz-rtca3 + + reg: + maxItems: 1 + + interrupts: + items: + - description: Alarm interrupt + - description: Periodic interrupt + - description: Carry interrupt + + interrupt-names: + items: + - const: alarm + - const: period + - const: carry + + clocks: + items: + - description: RTC bus clock + - description: RTC counter clock + + clock-names: + items: + - const: bus + - const: counter + + power-domains: + maxItems: 1 + + resets: + items: + - description: VBATTB module reset + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - power-domains + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + rtc@1004ec00 { + compatible = "renesas,r9a08g045-rtca3", "renesas,rz-rtca3"; + reg = <0x1004ec00 0x400>; + interrupts = , + , + ; + interrupt-names = "alarm", "period", "carry"; + clocks = <&cpg CPG_MOD R9A08G045_VBAT_BCLK>, <&vbattclk VBATTB_VBATTCLK>; + clock-names = "bus", "counter"; + assigned-clocks = <&vbattb VBATTB_MUX>; + assigned-clock-parents = <&vbattb VBATTB_XC>; + power-domains = <&cpg>; + resets = <&cpg R9A08G045_VBAT_BRESETN>; + };