Linux RTC
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	linux-rtc@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Rob Herring <robh@kernel.org>
Subject: [PATCH 0/3] rtc: rzn1: support XTAL clk and SCMP method
Date: Wed, 19 Mar 2025 12:03:01 +0100	[thread overview]
Message-ID: <20250319110305.19687-1-wsa+renesas@sang-engineering.com> (raw)

So far, the code and the binding for the RZ/N1D RTC assumed an input
clock of 32768Hz, so it was not explicitly described. It makes sense to
do this, though. For one reason, clocks with other frequencies might be
used. This RTC supports that via the SCMP counting method. The other
reason is, the upcoming R-Car Gen5 has only the SCMP method described,
so we need to use it there later.

This series lets the driver handle the optional "xtal" clock and switch
to the SCMP method if suitable. It has been tested on a Renesas RZ/N1D
board with hacked devicetree values.

A branch with updated DTs can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/n1d/rtc

Looking forward to comments!


Changes since RFC:
* add binding tag from Krzysztof (Thanks!)
* new patch to disable controller before initially modifying CTL0
* cosmetic changes

Wolfram Sang (3):
  dt-bindings: rtc: rzn1: add optional second clock
  rtc: rzn1: Disable controller before initialization
  rtc: rzn1: support input frequencies other than 32768Hz

 .../bindings/rtc/renesas,rzn1-rtc.yaml        |  8 ++-
 drivers/rtc/rtc-rzn1.c                        | 59 +++++++++++++++----
 2 files changed, 53 insertions(+), 14 deletions(-)

-- 
2.47.2


             reply	other threads:[~2025-03-19 11:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 11:03 Wolfram Sang [this message]
2025-03-19 11:03 ` [PATCH 1/3] dt-bindings: rtc: rzn1: add optional second clock Wolfram Sang
2025-04-10 15:08   ` Geert Uytterhoeven
2025-04-10 15:29     ` Geert Uytterhoeven
2025-04-10 20:23       ` Wolfram Sang
2025-04-11  6:20         ` Geert Uytterhoeven
2025-04-11  6:38           ` Wolfram Sang
2025-03-19 11:03 ` [PATCH 2/3] rtc: rzn1: Disable controller before initialization Wolfram Sang
2025-03-19 11:03 ` [PATCH 3/3] rtc: rzn1: support input frequencies other than 32768Hz Wolfram Sang
2025-04-10 15:17   ` Geert Uytterhoeven
2025-04-10 20:09     ` Wolfram Sang
2025-04-11  6:16       ` Geert Uytterhoeven
2025-04-11  6:39         ` Wolfram Sang
2025-05-01 22:11           ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250319110305.19687-1-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox