linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] rtc: zynqmp: fixes for read and set offset
@ 2025-12-01 12:50 Tomas Melin
  2025-12-01 12:50 ` [PATCH 1/4] rtc: zynqmp: correct frequency value Tomas Melin
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Tomas Melin @ 2025-12-01 12:50 UTC (permalink / raw)
  To: Alexandre Belloni, Michal Simek
  Cc: linux-rtc, linux-arm-kernel, linux-kernel, Tomas Melin

Add improvements for read and set offset functions.
The basic functionality is still the same, but offset correction values
are now updated to match with expected.

The RTC calibration value operates with full ticks,
and fractional ticks which are a 1/16 of a full tick.
The 16 lowest bits in the calibration registers are for the full ticks
and value matches the external oscillator in Hz. Through that,
the maximum and minimum offset values can be calculated dynamically,
as they depend on the input frequency used.

For docs on the calibration register, see
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/CALIB_READ-RTC-Register

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
Tomas Melin (4):
      rtc: zynqmp: correct frequency value
      rtc: zynqmp: rework read_offset
      rtc: zynqmp: rework set_offset
      rtc: zynqmp: use dynamic max and min offset ranges

 drivers/rtc/rtc-zynqmp.c | 65 ++++++++++++++++++++++++------------------------
 1 file changed, 33 insertions(+), 32 deletions(-)
---
base-commit: cd635e33b0113287c94021be53d2a7c61a1614e9
change-id: 20251201-zynqmp-rtc-updates-d260364cc01b

Best regards,
-- 
Tomas Melin <tomas.melin@vaisala.com>



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

end of thread, other threads:[~2025-12-17 19:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 12:50 [PATCH 0/4] rtc: zynqmp: fixes for read and set offset Tomas Melin
2025-12-01 12:50 ` [PATCH 1/4] rtc: zynqmp: correct frequency value Tomas Melin
2025-12-09 16:51   ` T, Harini
2025-12-10 12:29     ` Tomas Melin
2025-12-01 12:50 ` [PATCH 2/4] rtc: zynqmp: rework read_offset Tomas Melin
2025-12-09 17:28   ` T, Harini
2025-12-10 12:04     ` Tomas Melin
2025-12-17 18:14       ` T, Harini
2025-12-17 19:17         ` Alexandre Belloni
2025-12-01 12:50 ` [PATCH 3/4] rtc: zynqmp: rework set_offset Tomas Melin
2025-12-09 19:03   ` T, Harini
2025-12-10 12:18     ` Tomas Melin
2025-12-17 18:33       ` T, Harini
2025-12-01 12:50 ` [PATCH 4/4] rtc: zynqmp: use dynamic max and min offset ranges Tomas Melin
2025-12-09 19:28   ` T, Harini
2025-12-10 12:25     ` Tomas Melin
2025-12-17 19:03       ` T, Harini

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).