From patchwork Fri Jun 14 07:19:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13697967 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 85FAFC27C6E for ; Fri, 14 Jun 2024 07:20:12 +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: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:In-Reply-To:References:List-Owner; bh=7bM7IjO937X8gnabRpqjs0dK731L6r6PD6s0e3tUxWg=; b=FiMk35DljDxnNqSnMdnHZ8GbIV RHBEcjH4pBqxXILTRyVDPEKS0+tRMhGLvvxvDentF4YEv7PjmtOQn93OoLFXT9LjI4hjwYyq4Tedo oG5oVD5uwMKrSuI26m2YK+gnC5GigUP6sjWjxnsQm2UXnlVOPYNmKRStoykts8MrGkSrx/IoMkKAB mudgyijPKIUGJ5gcDAvRedKk+UyfHW/uM07FIB19iBDEsTOao2d2WQ4vFJrIORCIpDOBcPSOr2W6u L6hoMWueaxjfg6l14WwoqLj9K1CV0SQ0pFpca2bLaDo4t6cS2bd2EHycOByg/v8vGBLDi8soNIPbk i/TIaLyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sI1E4-00000001jPS-0ir3; Fri, 14 Jun 2024 07:19:56 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sI1E1-00000001jOC-065l for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2024 07:19:54 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2ebeefb9b56so21136601fa.0 for ; Fri, 14 Jun 2024 00:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1718349590; x=1718954390; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7bM7IjO937X8gnabRpqjs0dK731L6r6PD6s0e3tUxWg=; b=OQlnhg7lLctMI1SWGwoYNWl1f4Ht01XxBqq2BBMWp+S96JUg70rcJvr072AlRRDAAH mpBQs3aLrKSnF9f/ym/srCjVIefotr/zzM8i5hCbL4oE3DSNVqndjUlLvgruk+8MNZuC PAwF/oNT3LELS6TrYMhFiyt4BQbN3qZJ24sygE0Bg4h37cd4TKrkUILlbYIgdJzSUnUu 7lS8qWR4B7j4HmTdKn3ZQjuMXOYBZ+yCw+dj/SxtEKZ+/HJBEdjPQhIMqMS+oOYhLKXR YBDvnZ5r0ZI9cVU8s9Nkit8Mw/S2uY3lsJyH6bYzuN+zUoyCEFH0XmwWuKZeRf/VBZ9i KHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718349590; x=1718954390; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7bM7IjO937X8gnabRpqjs0dK731L6r6PD6s0e3tUxWg=; b=mCYC5aMIMcpkbexGI0QlRqjgXbuThwGtEKMBKvVua05+X+PKgrkLA8LM+/b++X9EOp OG/ESeT5MRVcbz64/QmW7TQZw3g8AWgpMZwTFU6Oya/Hu5z19DRE300p9VFo+cUNcCsv cL3hHVk8aCTUEL3pE5CkMVuqLfFV8iEOun+w0cbLW5rTxghmLhl6mF0D8VaDXax+k4EJ 2v4eXzzH3YkXfs4CWf17kl4gjVrKxqYypdoYR3BDOaz8rqv3dE6jm7LOQ1pTZgZ1MoQf jKDWE3iVO2OrEMZHIwupleJiKoRAcD2kqaskRqeGmDpCIteVxJbv84pXCJWJLKdEbPKJ sOVg== X-Forwarded-Encrypted: i=1; AJvYcCUg+1umYoMXM03rY9ew5e+j8KnBVYi8n/9f9yL0FqQBQdnzDcO47t8hKk2AUZUWeLVSc5Z+W4qHjJ3T3NtkCzCth1bGTSQCpRaY804B+9tlPONGZm0= X-Gm-Message-State: AOJu0YwTqQgjTnzVDxEOWl20LQxbSTld1qyc8/Z5TzUaSohIwrUn3w+A TzYRxrlNmTT9zcuJcQk2qj62hpxr7YoYMykYlMPe5wB7pKg5IY1aawTJdo6mhtg= X-Google-Smtp-Source: AGHT+IGl5Xcj09+EojoDFnxVQ2dpJru5796oMr1E1gs027Gp3zcO1lUHT3o5+u878fcFaZ6Msd17pQ== X-Received: by 2002:a2e:9894:0:b0:2eb:e865:494c with SMTP id 38308e7fff4ca-2ec0e5d1179mr16614831fa.26.1718349589467; Fri, 14 Jun 2024 00:19:49 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.189]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42286eef9eesm87272555e9.9.2024.06.14.00.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 00:19:49 -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, lee@kernel.org, alexandre.belloni@bootlin.com, magnus.damm@gmail.com 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 00/12] Add RTC support for the Renesas RZ/G3S SoC Date: Fri, 14 Jun 2024 10:19:20 +0300 Message-Id: <20240614071932.1014067-1-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240614_001953_190537_AA0FC456 X-CRM114-Status: GOOD ( 13.07 ) 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 Hi, On the Renesas RZ/G3S SoC the RTC clock is provided by the VBATTB IP. A 32 KHz crystall oscillator could be connected to the VBATTB input pins. The logic to control this clock (and pass it to RTC) is inside the VBATTB IP. For this, the clk-vbattb driver was added (patches 01-04/12). Patches 05-06/12 add the RTC driver. Patches 07-10/12 update the device trees with proper nodes to enable RTC. Patches 11-12/12 enable proper config flags for RTC to work on RZ/G3S SoC. Thank you, Claudiu Beznea Claudiu Beznea (12): clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP dt-bindings: clock: renesas,rzg3s-vbattb-clk: Document the VBATTB clock driver dt-bindings: mfd: renesas,rzg3s-vbattb: Document VBATTB clk: renesas: clk-vbattb: Add VBATTB clock driver dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RZ/G3S RTC rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC arm64: dts: renesas: r9a08g045: Add VBATTB node arm64: dts: renesas: r9a08g045: Add RTC node arm64: dts: renesas: rzg3s-smarc-som: Enable VBATTB clock arm64: dts: renesas: rzg3s-smarc-som: Enable RTC arm64: defconfig: Enable VBATTB clock flag arm64: defconfig: Enable Renesas RTCA-3 flag .../clock/renesas,rzg3s-vbattb-clk.yaml | 90 ++ .../bindings/mfd/renesas,rzg3s-vbattb.yaml | 99 ++ .../bindings/rtc/renesas,rzg3s-rtc.yaml | 60 ++ MAINTAINERS | 8 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 44 + .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 17 + arch/arm64/configs/defconfig | 2 + drivers/clk/renesas/Kconfig | 4 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/clk-vbattb.c | 202 ++++ drivers/clk/renesas/r9a08g045-cpg.c | 6 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-renesas-rtca3.c | 891 ++++++++++++++++++ 14 files changed, 1435 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml create mode 100644 Documentation/devicetree/bindings/mfd/renesas,rzg3s-vbattb.yaml create mode 100644 Documentation/devicetree/bindings/rtc/renesas,rzg3s-rtc.yaml create mode 100644 drivers/clk/renesas/clk-vbattb.c create mode 100644 drivers/rtc/rtc-renesas-rtca3.c