linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] rtc: rzn1: support XTAL clk and SCMP method
@ 2025-05-23 15:05 Wolfram Sang
  2025-05-23 15:05 ` [PATCH v2 1/3] dt-bindings: rtc: rzn1: add optional second clock Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wolfram Sang @ 2025-05-23 15:05 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Alexandre Belloni, Conor Dooley, devicetree,
	Geert Uytterhoeven, Krzysztof Kozlowski, linux-rtc, Magnus Damm,
	Miquel Raynal, Rob Herring

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, upcoming SoCs may have 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/enablement

Looking forward to comments!

Changes since v1:
- renamed variable from 'use_scmp' to 'scmp_val' to make clear it is not
  a bool (patch 3)
- added tags from Geert (Thanks!)
- rebased to linux-next

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-26  7:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 15:05 [PATCH v2 0/3] rtc: rzn1: support XTAL clk and SCMP method Wolfram Sang
2025-05-23 15:05 ` [PATCH v2 1/3] dt-bindings: rtc: rzn1: add optional second clock Wolfram Sang
2025-05-23 15:05 ` [PATCH v2 2/3] rtc: rzn1: Disable controller before initialization Wolfram Sang
2025-05-23 15:05 ` [PATCH v2 3/3] rtc: rzn1: support input frequencies other than 32768Hz Wolfram Sang
2025-05-26  7:22   ` Miquel Raynal
2025-05-26  7:38     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).