Skip to content

rtc: sun6i: Fix the RTC accuracy

Alexandre Belloni linux-arm-kernel linux-devicetree linux-rtc stable 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest0 of 7 patches 0 repliesNew
  2. v12 of 6 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

None of the 7 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy

Hi,

Quoted 31 lines · Maxime Ripard

Hi,

The RTC used in the A31 and later SoC has an accuracy issue, which is already significant even after a couple of hours.

This is due to the fact that the oscillator used by default is an internal and very inaccurate one.

A first attempt at fixing that by switching to the external oscillator was done in the patch "rtc: sun6i: Switch to the external oscillator". However, it turned out to be problematic since it was tracked properly in the clock framework, which might lead to some clocks being disabled, even though their devices were not notified.

This is a second attempt, this time by making it part of the CCF. It turned out to be a bit more complicated than one would expect since the mux found inside the RTC also controls one of the input of the main clock unit. Therefore, it needs to be probed before the main clock unit driver.

Let me know what you think,
Maxime

Changes from v1:
- Force the muxing to the external oscillator even for old DT
- Make the patches a bit more stable friendly
- Change the bindings to have a cell of 1, to account for the external output of the oscillator
- Split the driver remove() removal into a separate patch and switched to devm
- Reordered the patches

Quoted 9 lines

Maxime Ripard (7):
rtc: sun6i: Disable the build as a module
rtc: sun6i: Add some locking
rtc: sun6i: Switch to the external oscillator
rtc: sun6i: Expose the 32kHz oscillator
rtc: sun6i: Switch to devm_rtc_device_register
ARM: sun8i: a23/a33: Enable the real LOSC and use it
ARM: sun8i: a23/a33: Add the oscillators accuracy

I've applied 1/7 to 5/7. Thanks!

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com