Skip to content

Commit 70de557

Browse files
committed
Merge tag 'timers-clocksource-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull clocksource updates from Thomas Gleixner: - Further preparations for modular clocksource/event drivers - The usual device tree updates to support new chip variants and the related changes to thise drivers - Avoid a 64-bit division in the TEGRA186 driver, which caused a build fail on 32-bit machines. - Small fixes, improvements and cleanups all over the place * tag 'timers-clocksource-2025-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits) dt-bindings: timer: exynos4210-mct: Add compatible for ARTPEC-9 SoC clocksource/drivers/sh_cmt: Split start/stop of clock source and events clocksource/drivers/clps711x: Fix resource leaks in error paths clocksource/drivers/arm_global_timer: Add auto-detection for initial prescaler values clocksource/drivers/ingenic-sysost: Convert from round_rate() to determine_rate() clocksource/drivers/timer-tegra186: Don't print superfluous errors clocksource/drivers/timer-rtl-otto: Simplify documentation clocksource/drivers/timer-rtl-otto: Do not interfere with interrupts clocksource/drivers/timer-rtl-otto: Drop set_counter function clocksource/drivers/timer-rtl-otto: Work around dying timers clocksource/drivers/timer-ti-dm : Capture functionality for OMAP DM timer clocksource/drivers/arm_arch_timer_mmio: Add MMIO clocksource clocksource/drivers/arm_arch_timer_mmio: Switch over to standalone driver clocksource/drivers/arm_arch_timer: Add standalone MMIO driver ACPI: GTDT: Generate platform devices for MMIO timers clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support dt: bindings: fsl,vf610-pit: Add compatible for s32g2 and s32g3 clocksource/drivers/vf-pit: Rename the VF PIT to NXP PIT clocksource/drivers/vf-pit: Unify the function name for irq ack clocksource/drivers/vf-pit: Consolidate calls to pit_*_disable/enable ...
2 parents c5448d4 + 749b61c commit 70de557

32 files changed

+1386
-957
lines changed

Documentation/devicetree/bindings/timer/faraday,fttmr010.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/faraday,fttmr010.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Faraday FTTMR010 timer
8+
9+
maintainers:
10+
- Joel Stanley <[email protected]>
11+
- Linus Walleij <[email protected]>
12+
13+
description:
14+
This timer is a generic IP block from Faraday Technology, embedded in the
15+
Cortina Systems Gemini SoCs and other designs.
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- const: moxa,moxart-timer
22+
- const: faraday,fttmr010
23+
- enum:
24+
- aspeed,ast2400-timer
25+
- aspeed,ast2500-timer
26+
- aspeed,ast2600-timer
27+
- cortina,gemini-timer
28+
- faraday,fttmr010
29+
30+
reg:
31+
maxItems: 1
32+
33+
interrupts:
34+
minItems: 1
35+
maxItems: 8
36+
description: One interrupt per timer
37+
38+
clocks:
39+
minItems: 1
40+
items:
41+
- description: Peripheral clock
42+
- description: External tick clock
43+
44+
clock-names:
45+
minItems: 1
46+
items:
47+
- const: PCLK
48+
- const: EXTCLK
49+
50+
resets:
51+
maxItems: 1
52+
53+
syscon:
54+
description: System controller phandle for Gemini systems
55+
$ref: /schemas/types.yaml#/definitions/phandle
56+
57+
required:
58+
- compatible
59+
- reg
60+
- interrupts
61+
62+
allOf:
63+
- if:
64+
properties:
65+
compatible:
66+
contains:
67+
const: cortina,gemini-timer
68+
then:
69+
required:
70+
- syscon
71+
else:
72+
properties:
73+
syscon: false
74+
75+
additionalProperties: false
76+
77+
examples:
78+
- |
79+
#include <dt-bindings/interrupt-controller/irq.h>
80+
81+
timer@43000000 {
82+
compatible = "faraday,fttmr010";
83+
reg = <0x43000000 0x1000>;
84+
interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
85+
<15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
86+
<16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
87+
clocks = <&pclk>, <&extclk>;
88+
clock-names = "PCLK", "EXTCLK";
89+
};

Documentation/devicetree/bindings/timer/fsl,ftm-timer.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ properties:
1414
const: fsl,ftm-timer
1515

1616
reg:
17-
maxItems: 1
17+
items:
18+
- description: clock event device
19+
- description: clock source device
1820

1921
interrupts:
2022
maxItems: 1
@@ -50,7 +52,8 @@ examples:
5052
5153
ftm@400b8000 {
5254
compatible = "fsl,ftm-timer";
53-
reg = <0x400b8000 0x1000>;
55+
reg = <0x400b8000 0x1000>,
56+
<0x400b9000 0x1000>;
5457
interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
5558
clock-names = "ftm-evt", "ftm-src", "ftm-evt-counter-en", "ftm-src-counter-en";
5659
clocks = <&clks VF610_CLK_FTM2>, <&clks VF610_CLK_FTM3>,
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/fsl,timrot.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale MXS Timer
8+
9+
maintainers:
10+
- Frank Li <[email protected]>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- fsl,imx23-timrot
17+
- fsl,imx28-timrot
18+
- const: fsl,timrot
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
items:
25+
- description: irq for timer0
26+
- description: irq for timer1
27+
- description: irq for timer2
28+
- description: irq for timer3
29+
30+
clocks:
31+
maxItems: 1
32+
33+
required:
34+
- compatible
35+
- reg
36+
- interrupts
37+
- clocks
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
timer: timer@80068000 {
44+
compatible = "fsl,imx28-timrot", "fsl,timrot";
45+
reg = <0x80068000 0x2000>;
46+
interrupts = <48>, <49>, <50>, <51>;
47+
clocks = <&clks 26>;
48+
};

Documentation/devicetree/bindings/timer/fsl,vf610-pit.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ description:
1515

1616
properties:
1717
compatible:
18-
enum:
19-
- fsl,vf610-pit
18+
oneOf:
19+
- enum:
20+
- fsl,vf610-pit
21+
- nxp,s32g2-pit
22+
- items:
23+
- const: nxp,s32g3-pit
24+
- const: nxp,s32g2-pit
2025

2126
reg:
2227
maxItems: 1

Documentation/devicetree/bindings/timer/mediatek,timer.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- items:
2727
- enum:
2828
- mediatek,mt2701-timer
29+
- mediatek,mt6572-timer
2930
- mediatek,mt6580-timer
3031
- mediatek,mt6582-timer
3132
- mediatek,mt6589-timer
@@ -44,6 +45,7 @@ properties:
4445
- mediatek,mt8188-timer
4546
- mediatek,mt8192-timer
4647
- mediatek,mt8195-timer
48+
- mediatek,mt8196-timer
4749
- mediatek,mt8365-systimer
4850
- const: mediatek,mt6765-timer
4951

Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- items:
2727
- enum:
2828
- axis,artpec8-mct
29+
- axis,artpec9-mct
2930
- google,gs101-mct
3031
- samsung,exynos2200-mct-peris
3132
- samsung,exynos3250-mct
@@ -131,6 +132,7 @@ allOf:
131132
contains:
132133
enum:
133134
- axis,artpec8-mct
135+
- axis,artpec9-mct
134136
- google,gs101-mct
135137
- samsung,exynos2200-mct-peris
136138
- samsung,exynos5260-mct

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,7 @@ S: Maintained
19891989
F: arch/arm/include/asm/arch_timer.h
19901990
F: arch/arm64/include/asm/arch_timer.h
19911991
F: drivers/clocksource/arm_arch_timer.c
1992+
F: drivers/clocksource/arm_arch_timer_mmio.c
19921993

19931994
ARM GENERIC INTERRUPT CONTROLLER DRIVERS
19941995
M: Marc Zyngier <[email protected]>

drivers/acpi/arm64/gtdt.c

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
388388
return 0;
389389
}
390390

391-
static int __init gtdt_sbsa_gwdt_init(void)
391+
static int __init gtdt_platform_timer_init(void)
392392
{
393393
void *platform_timer;
394394
struct acpi_table_header *table;
395-
int ret, timer_count, gwdt_count = 0;
395+
int ret, timer_count, gwdt_count = 0, mmio_timer_count = 0;
396396

397397
if (acpi_disabled)
398398
return 0;
@@ -414,20 +414,41 @@ static int __init gtdt_sbsa_gwdt_init(void)
414414
goto out_put_gtdt;
415415

416416
for_each_platform_timer(platform_timer) {
417+
ret = 0;
418+
417419
if (is_non_secure_watchdog(platform_timer)) {
418420
ret = gtdt_import_sbsa_gwdt(platform_timer, gwdt_count);
419421
if (ret)
420-
break;
422+
continue;
421423
gwdt_count++;
424+
} else if (is_timer_block(platform_timer)) {
425+
struct arch_timer_mem atm = {};
426+
struct platform_device *pdev;
427+
428+
ret = gtdt_parse_timer_block(platform_timer, &atm);
429+
if (ret)
430+
continue;
431+
432+
pdev = platform_device_register_data(NULL, "gtdt-arm-mmio-timer",
433+
gwdt_count, &atm,
434+
sizeof(atm));
435+
if (IS_ERR(pdev)) {
436+
pr_err("Can't register timer %d\n", gwdt_count);
437+
continue;
438+
}
439+
440+
mmio_timer_count++;
422441
}
423442
}
424443

425444
if (gwdt_count)
426445
pr_info("found %d SBSA generic Watchdog(s).\n", gwdt_count);
446+
if (mmio_timer_count)
447+
pr_info("found %d Generic MMIO timer(s).\n", mmio_timer_count);
427448

428449
out_put_gtdt:
429450
acpi_put_table(table);
430451
return ret;
431452
}
432453

433-
device_initcall(gtdt_sbsa_gwdt_init);
454+
device_initcall(gtdt_platform_timer_init);

drivers/clocksource/Kconfig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ config ARM_GLOBAL_TIMER
395395

396396
config ARM_GT_INITIAL_PRESCALER_VAL
397397
int "ARM global timer initial prescaler value"
398-
default 2 if ARCH_ZYNQ
399-
default 1
398+
default 0
400399
depends on ARM_GLOBAL_TIMER
401400
help
402401
When the ARM global timer initializes, its current rate is declared
@@ -406,6 +405,7 @@ config ARM_GT_INITIAL_PRESCALER_VAL
406405
bounds about how much the parent clock is allowed to decrease or
407406
increase wrt the initial clock value.
408407
This affects CPU_FREQ max delta from the initial frequency.
408+
Use 0 to use auto-detection in the driver.
409409

410410
config ARM_TIMER_SP804
411411
bool "Support for Dual Timer SP804 module"
@@ -474,11 +474,14 @@ config FSL_FTM_TIMER
474474
help
475475
Support for Freescale FlexTimer Module (FTM) timer.
476476

477-
config VF_PIT_TIMER
478-
bool
477+
config NXP_PIT_TIMER
478+
bool "NXP Periodic Interrupt Timer" if COMPILE_TEST
479479
select CLKSRC_MMIO
480480
help
481-
Support for Periodic Interrupt Timer on Freescale Vybrid Family SoCs.
481+
Support for Periodic Interrupt Timer on Freescale / NXP
482+
SoCs. This periodic timer is found on the Vybrid Family and
483+
the Automotive S32G2/3 platforms. It contains 4 channels
484+
where two can be coupled to form a 64 bits channel.
482485

483486
config SYS_SUPPORTS_SH_CMT
484487
bool

0 commit comments

Comments
 (0)