arm64: dts: allwinner: Mark timer as stopped in suspend
authorSamuel Holland <samuel@sholland.org>
Sun, 9 Aug 2020 02:18:22 +0000 (21:18 -0500)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 18 Aug 2020 09:09:30 +0000 (11:09 +0200)
When possible, system firmware on 64-bit Allwinner platforms disables
OSC24M during system suspend. Since this oscillator is the clock source
for the ARM architectural timer, this causes the timer to stop counting.
Therefore, the ARM architectural timer must not be marked as NONSTOP on
these platforms, or the time will be wrong after system resume.

Adding the arm,no-tick-in-suspend property forces the kernel to ignore
the ARM architectural timer when calculating sleeptime; it falls back to
reading the RTC. Note that this only affects deep suspend, not s2idle.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20200809021822.5285-1-samuel@sholland.org
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

index 73e9b73452579c13e7c68cc3ee0645605ce2cbd8..cf379e38b3a038672291a7bc411c056b6f19406b 100644 (file)
        timer {
                compatible = "arm,armv8-timer";
                allwinner,erratum-unknown1;
+               arm,no-tick-in-suspend;
                interrupts = <GIC_PPI 13
                        (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
                             <GIC_PPI 14
index 6735e316a39c34e0adf740f8c531ae5ea107dd93..6a7b72708d74d8ebb29fa4f7a8116e065d17a758 100644 (file)
@@ -67,6 +67,7 @@
 
        timer {
                compatible = "arm,armv8-timer";
+               arm,no-tick-in-suspend;
                interrupts = <GIC_PPI 13
                                (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
                             <GIC_PPI 14
index 9ce78a7b117d20e26441eda4da6b0987c13975ba..28c77d6872f64c52c90fca9844c592a1c515abb8 100644 (file)
@@ -90,6 +90,7 @@
 
        timer {
                compatible = "arm,armv8-timer";
+               arm,no-tick-in-suspend;
                interrupts = <GIC_PPI 13
                        (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
                             <GIC_PPI 14