]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: allwinner: enable h616 timer support
authorMichal Piekos <michal.piekos@mmpsystems.pl>
Sun, 29 Mar 2026 11:43:04 +0000 (13:43 +0200)
committerChen-Yu Tsai <wens@kernel.org>
Sun, 29 Mar 2026 13:20:49 +0000 (21:20 +0800)
Add support for timer by reusing existing sun4i timer driver.

H616 timer is compatible with earlier sunxi timer variants and provides
both clocksource and clockevent functionality. It runs from 24 MHz
oscillator. It can serve as broadcast clockevent for wake up from idle
states.

Tested on Orange Pi Zero 3:
- timer is registered as clocksource:
- switching clocksource at runtime works
- timer operates as a broadcast clockevent device
- no regression observed compared to arch_sys_counter

Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20260329-h616-timer-v1-1-5966d0420a66@mmpsystems.pl
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi

index 8d1110c14bad2fd6142fd950ab7ebefce29068c0..bf054869e78be6c0e18e5441c62814bd423fbbc5 100644 (file)
                        };
                };
 
+               timer0: timer@3009000 {
+                       compatible = "allwinner,sun50i-h616-timer",
+                                    "allwinner,sun8i-a23-timer";
+                       reg = <0x03009000 0xa0>;
+                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
+               };
+
                watchdog: watchdog@30090a0 {
                        compatible = "allwinner,sun50i-h616-wdt",
                                     "allwinner,sun6i-a31-wdt";