All of lore.kernel.org
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy
@ 2017-01-23 10:41 ` Maxime Ripard
  0 siblings, 0 replies; 35+ messages in thread
From: Maxime Ripard @ 2017-01-23 10:41 UTC (permalink / raw)
  To: Alexandre Belloni, Alessandro Zummo, Chen-Yu Tsai
  Cc: linux-arm-kernel, rtc-linux, Rob Herring, devicetree, 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

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

 Documentation/devicetree/bindings/rtc/sun6i-rtc.txt |  10 +-
 arch/arm/boot/dts/sun8i-a23-a33.dtsi                |  15 +-
 drivers/rtc/Kconfig                                 |   2 +-
 drivers/rtc/rtc-sun6i.c                             | 182 ++++++++++---
 4 files changed, 174 insertions(+), 35 deletions(-)

base-commit: 99cef370ac9939df2aeb16c96d07e842b2fa8201
-- 
git-series 0.8.11

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2017-01-25 15:36 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 10:41 [rtc-linux] [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy Maxime Ripard
2017-01-23 10:41 ` Maxime Ripard
2017-01-23 10:41 ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 1/7] rtc: sun6i: Disable the build as a module Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 2/7] rtc: sun6i: Add some locking Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 3/7] rtc: sun6i: Switch to the external oscillator Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 4/7] rtc: sun6i: Expose the 32kHz oscillator Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 21:00   ` [rtc-linux] " Rob Herring
2017-01-23 21:00     ` Rob Herring
2017-01-23 21:00     ` Rob Herring
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 5/7] rtc: sun6i: Switch to devm_rtc_device_register Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 6/7] ARM: sun8i: a23/a33: Enable the real LOSC and use it Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41 ` [rtc-linux] [PATCH v2 7/7] ARM: sun8i: a23/a33: Add the oscillators accuracy Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-23 10:41   ` Maxime Ripard
2017-01-24 17:49 ` [rtc-linux] Re: [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy Alexandre Belloni
2017-01-24 17:49   ` Alexandre Belloni
2017-01-24 17:49   ` Alexandre Belloni
2017-01-25 15:36   ` [rtc-linux] " Maxime Ripard
2017-01-25 15:36     ` Maxime Ripard
2017-01-25 15:36     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.