mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
3855c2c3e5
The RTC controls the input source of the main 32kHz oscillator in the system, feeding it to the clock unit too. By default, this is using an internal, very inaccurate (+/- 30%) oscillator with a divider to make it roughly around 32kHz. This is however quite impractical for the RTC, since our time will not be tracked properly. Since this oscillator is an input of the main clock unit, and since that clock unit will be probed using CLK_OF_DECLARE, we have to use it as well, leading to a two stage probe: one to enable the clock, the other one to enable the RTC. There is also a slight change in the binding that is required (and should have been from the beginning), since we'll need a phandle to the external oscillator used on that board. We support the old binding by not allowing to switch to the external oscillator and only using the internal one (which was the previous behaviour) in the case where we're missing that phandle. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
28 lines
801 B
Plaintext
28 lines
801 B
Plaintext
* sun6i Real Time Clock
|
|
|
|
RTC controller for the Allwinner A31
|
|
|
|
Required properties:
|
|
- compatible : Should be "allwinner,sun6i-a31-rtc"
|
|
- reg : physical base address of the controller and length of
|
|
memory mapped region.
|
|
- interrupts : IRQ lines for the RTC alarm 0 and alarm 1, in that order.
|
|
|
|
Required properties for new device trees
|
|
- clocks : phandle to the 32kHz external oscillator
|
|
- clock-output-names : name of the LOSC clock created
|
|
- #clock-cells : must be equals to 1. The RTC provides two clocks: the
|
|
LOSC and its external output, with index 0 and 1
|
|
respectively.
|
|
|
|
Example:
|
|
|
|
rtc: rtc@01f00000 {
|
|
compatible = "allwinner,sun6i-a31-rtc";
|
|
reg = <0x01f00000 0x54>;
|
|
interrupts = <0 40 4>, <0 41 4>;
|
|
clock-output-names = "osc32k";
|
|
clocks = <&ext_osc32k>;
|
|
#clock-cells = <1>;
|
|
};
|