From patchwork Sat Oct 19 08:47:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13842631 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 37BCED3C904 for ; Sat, 19 Oct 2024 08:58:51 +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=gxllZ9cfpYLn8XB0jhlEujoms+pf5ypaVvxphLqZAZU=; b=ysmtY5h41VBf3HeASxtqY3OXXu 345xrAWAP1BTe94VkDp2hLjz2jetGv6njuD+1YITMxdY8AP5peEm0O/Q4SyPSmyPhCjp1psiy7X0z Q8Hzq2bHbk2noRVeDu9YqkGyGrHGW6kBX4ImRCtO5NL4ST8jHy9lwAtkvsSUDjjFcRKsqS+xZYGLO O9P+ipBPV0ldYFRR1ldmusOEsy2jw0YxQ+qlAiuzRFTOLaxJSQKXDGofImaKZCoZr0KokMngEmtHb lz/fuNqtw4ftw/0UQMrLeIluuonWINBGSAy18kWmJG1dWmsYkBSHi8fTHAu3dhriJDYfsS2SBBk0t jIhapUSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t25IH-00000002v60-0vQe; Sat, 19 Oct 2024 08:58:41 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t257y-00000002s4d-3KXI for linux-arm-kernel@lists.infradead.org; Sat, 19 Oct 2024 08:48:04 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so26592315e9.3 for ; Sat, 19 Oct 2024 01:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1729327681; x=1729932481; 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=gxllZ9cfpYLn8XB0jhlEujoms+pf5ypaVvxphLqZAZU=; b=IjMG27BuTAApE4YqbR3ntBVOFc0fvbTjLnv7KyVhg/iqjtcR3KizEMNwSSxEdtqALS FW4OJvUNwicobhNlzwhxEyw3x19PU9sMH5hC2VRG329Zg9dxxMa/a2WO/lKtWDjmg3FH qyIXt2Cxs3Rd4peaHpAoz6NwwPIBgjM2Wc5rr+wv3f0uVATy8D8ot6Sw0kqxmigw+lLU R81xGSvfo/reqEr+SzSfLHkDosaiIrWBC/lyPOdAGVdS2rBxbCFvjBY1XTp3MG/vQnxA Rxv7WgsrkzDgmyR5f2gG7UDsxJiG1Bnv9dSaqEn1zF0MUVhkaefYw2T7XnQrJ4EQXTZ/ dNRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729327681; x=1729932481; 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=gxllZ9cfpYLn8XB0jhlEujoms+pf5ypaVvxphLqZAZU=; b=JL/6Hmz9iIl55RO2gHvG1IMH3N6W+kQFf7pXXGWHcScDFE8dKnv2dlrCp6k9ACetSJ YNjE4ZlOCPtYQ11lc0ZPNNGGZ1FA4XiXK4hbM6z5Bgpbs3dkgVPrXnt+z1AoVxHEcaIW 6dTwjecTXfkMeTbwnyEdDwrBqc8dvbMQopcB7oz5rXVyk5cpLFnWHqP3Fmku9J/WHlZb T+ZCj8D7VE2VxVgTPP3NikVp8b/1BFi9dJZ8x9EnanU4N80PYEmXkKl5oLdfKLD1Qd+D kwVY+8DIc4v5kHfqNSEmJ+200ql55OCpXUUyj+sXL+/WPh6lQEwiepdvu2vjRvSIQXJ1 NxVQ== X-Forwarded-Encrypted: i=1; AJvYcCWG4fkFYlyUNg3DgGXHVAEJjpDu0KYUvUEpp2GycgGsKs93A+/MMImRJQjjGeTXr5yThyu+CkDM8JysFSFPnkcf@lists.infradead.org X-Gm-Message-State: AOJu0Ywp6K96tuZ+PeaH6C0bAG7by92zQCyt5F+DDynbbUeCsObPjHgN kZB08z6WU3dKilOhf4j+w30MlHYQH4UWjfynivDSDsQWMKafBknRp9/zKi2SkVo= X-Google-Smtp-Source: AGHT+IHEEmDIsAUbKEywuBfYGHtLGgJje1LXuZaP56VpldMdG2ei0MMJIZx/tutRtcE/V7pfK9evVA== X-Received: by 2002:a05:600c:4751:b0:430:563a:b20a with SMTP id 5b1f17b1804b1-431616494a9mr41362325e9.11.1729327680775; Sat, 19 Oct 2024 01:48:00 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.23]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ecf0eccbasm3898731f8f.81.2024.10.19.01.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2024 01:48:00 -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: 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@tuxon.dev, Claudiu Beznea Subject: [PATCH v4 06/12] dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RTCA-3 IP Date: Sat, 19 Oct 2024 11:47:32 +0300 Message-Id: <20241019084738.3370489-7-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241019084738.3370489-1-claudiu.beznea.uj@bp.renesas.com> References: <20241019084738.3370489-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-20241019_014802_861853_6675C304 X-CRM114-Status: GOOD ( 18.52 ) 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. Reviewed-by: Rob Herring (Arm) Signed-off-by: Claudiu Beznea --- Changes in v4: - collected tags - dropped the assigned-clocks, assigned-clock-parents properties from the example, along with r9a08g045-vbattb.h inclusion; these were moved to the VBATTB example as it fits better in there since these are related to the VBATTB but not to the RTC; Rob, I haven't dropped your Rb tag for this; please let me know if you consider it otherwise. 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 | 83 +++++++++++++++++++ 1 file changed, 83 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..f1e9d01633c7 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml @@ -0,0 +1,83 @@ +# 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 + + 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"; + power-domains = <&cpg>; + resets = <&cpg R9A08G045_VBAT_BRESETN>; + };