Skip to content

Commit 1b7efaa

Browse files
committed
Merge tag 'timers-v5.9' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clock event/surce driver changes from Daniel Lezcano: - Add sama5d2 support and rework the 32kHz clock handling (Alexandre Belloni) - Add the high resolution support for SMP/SMT on the Ingenic timer (Zhou Yanjie) - Add support for i.MX TPM driver with ARM64 (Anson Huang) - Fix typo by replacing KHz to kHz (Geert Uytterhoeven) - Add 32kHz support by setting the minimum ticks to 5 on Nomadik MTU (Linus Walleij) - Replace HTTP links with HTTPS ones for security reasons (Alexander A. Klimov) - Add support for the Ingenic X1000 OST (Zhou Yanjie)
2 parents 36cd28a + 5ecafc1 commit 1b7efaa

File tree

16 files changed

+990
-172
lines changed

16 files changed

+990
-172
lines changed

Documentation/devicetree/bindings/mfd/atmel-tcb.txt

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: "http://devicetree.org/schemas/soc/microchip/atmel,at91rm9200-tcb.yaml#"
5+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6+
7+
title: Atmel Timer Counter Block
8+
9+
maintainers:
10+
- Alexandre Belloni <[email protected]>
11+
12+
description: |
13+
The Atmel (now Microchip) SoCs have timers named Timer Counter Block. Each
14+
timer has three channels with two counters each.
15+
16+
properties:
17+
compatible:
18+
items:
19+
- enum:
20+
- atmel,at91rm9200-tcb
21+
- atmel,at91sam9x5-tcb
22+
- atmel,sama5d2-tcb
23+
- const: simple-mfd
24+
- const: syscon
25+
26+
reg:
27+
maxItems: 1
28+
29+
interrupts:
30+
description:
31+
List of interrupts. One interrupt per TCB channel if available or one
32+
interrupt for the TC block
33+
minItems: 1
34+
maxItems: 3
35+
36+
clock-names:
37+
description:
38+
List of clock names. Always includes t0_clk and slow clk. Also includes
39+
t1_clk and t2_clk if a clock per channel is available.
40+
minItems: 2
41+
maxItems: 4
42+
43+
clocks:
44+
minItems: 2
45+
maxItems: 4
46+
47+
'#address-cells':
48+
const: 1
49+
50+
'#size-cells':
51+
const: 0
52+
53+
patternProperties:
54+
"^timer@[0-2]$":
55+
description: The timer block channels that are used as timers.
56+
type: object
57+
properties:
58+
compatible:
59+
const: atmel,tcb-timer
60+
reg:
61+
description:
62+
List of channels to use for this particular timer.
63+
minItems: 1
64+
maxItems: 3
65+
66+
required:
67+
- compatible
68+
- reg
69+
70+
allOf:
71+
- if:
72+
properties:
73+
compatible:
74+
contains:
75+
const: atmel,sama5d2-tcb
76+
then:
77+
properties:
78+
clocks:
79+
minItems: 3
80+
maxItems: 3
81+
clock-names:
82+
items:
83+
- const: t0_clk
84+
- const: gclk
85+
- const: slow_clk
86+
else:
87+
properties:
88+
clocks:
89+
minItems: 2
90+
maxItems: 4
91+
clock-names:
92+
oneOf:
93+
- items:
94+
- const: t0_clk
95+
- const: slow_clk
96+
- items:
97+
- const: t0_clk
98+
- const: t1_clk
99+
- const: t2_clk
100+
- const: slow_clk
101+
102+
required:
103+
- compatible
104+
- reg
105+
- interrupts
106+
- clocks
107+
- clock-names
108+
- '#address-cells'
109+
- '#size-cells'
110+
111+
additionalProperties: false
112+
113+
examples:
114+
- |
115+
/* One interrupt per TC block: */
116+
tcb0: timer@fff7c000 {
117+
compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
118+
#address-cells = <1>;
119+
#size-cells = <0>;
120+
reg = <0xfff7c000 0x100>;
121+
interrupts = <18 4>;
122+
clocks = <&tcb0_clk>, <&clk32k>;
123+
clock-names = "t0_clk", "slow_clk";
124+
125+
timer@0 {
126+
compatible = "atmel,tcb-timer";
127+
reg = <0>, <1>;
128+
};
129+
130+
timer@2 {
131+
compatible = "atmel,tcb-timer";
132+
reg = <2>;
133+
};
134+
};
135+
136+
/* One interrupt per TC channel in a TC block: */
137+
tcb1: timer@fffdc000 {
138+
compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
139+
#address-cells = <1>;
140+
#size-cells = <0>;
141+
reg = <0xfffdc000 0x100>;
142+
interrupts = <26 4>, <27 4>, <28 4>;
143+
clocks = <&tcb1_clk>, <&clk32k>;
144+
clock-names = "t0_clk", "slow_clk";
145+
146+
timer@0 {
147+
compatible = "atmel,tcb-timer";
148+
reg = <0>;
149+
};
150+
151+
timer@1 {
152+
compatible = "atmel,tcb-timer";
153+
reg = <1>;
154+
};
155+
};
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/ingenic,sysost.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Bindings for SYSOST in Ingenic XBurst family SoCs
8+
9+
maintainers:
10+
- 周琰杰 (Zhou Yanjie) <[email protected]>
11+
12+
description:
13+
The SYSOST in an Ingenic SoC provides one 64bit timer for clocksource
14+
and one or more 32bit timers for clockevent.
15+
16+
properties:
17+
"#clock-cells":
18+
const: 1
19+
20+
compatible:
21+
enum:
22+
- ingenic,x1000-ost
23+
- ingenic,x2000-ost
24+
25+
reg:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
31+
clock-names:
32+
const: ost
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
required:
38+
- "#clock-cells"
39+
- compatible
40+
- reg
41+
- clocks
42+
- clock-names
43+
- interrupts
44+
45+
additionalProperties: false
46+
47+
examples:
48+
- |
49+
#include <dt-bindings/clock/x1000-cgu.h>
50+
51+
ost: timer@12000000 {
52+
compatible = "ingenic,x1000-ost";
53+
reg = <0x12000000 0x3c>;
54+
55+
#clock-cells = <1>;
56+
57+
clocks = <&cgu X1000_CLK_OST>;
58+
clock-names = "ost";
59+
60+
interrupt-parent = <&cpuintc>;
61+
interrupts = <3>;
62+
};
63+
...

Documentation/devicetree/bindings/timer/ti,keystone-timer.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It is global timer is a free running up-counter and can generate interrupt
1010
when the counter reaches preset counter values.
1111

1212
Documentation:
13-
http://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
13+
https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf
1414

1515
Required properties:
1616

arch/arm/boot/dts/sama5d2.dtsi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,23 +375,23 @@
375375
};
376376

377377
tcb0: timer@f800c000 {
378-
compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
378+
compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon";
379379
#address-cells = <1>;
380380
#size-cells = <0>;
381381
reg = <0xf800c000 0x100>;
382382
interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>;
383-
clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&clk32k>;
384-
clock-names = "t0_clk", "slow_clk";
383+
clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&pmc PMC_TYPE_GCK 35>, <&clk32k>;
384+
clock-names = "t0_clk", "gclk", "slow_clk";
385385
};
386386

387387
tcb1: timer@f8010000 {
388-
compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
388+
compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon";
389389
#address-cells = <1>;
390390
#size-cells = <0>;
391391
reg = <0xf8010000 0x100>;
392392
interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
393-
clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&clk32k>;
394-
clock-names = "t0_clk", "slow_clk";
393+
clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&pmc PMC_TYPE_GCK 36>, <&clk32k>;
394+
clock-names = "t0_clk", "gclk", "slow_clk";
395395
};
396396

397397
hsmc: hsmc@f8014000 {

drivers/clocksource/Kconfig

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,9 @@ config CLKSRC_IMX_GPT
616616

617617
config CLKSRC_IMX_TPM
618618
bool "Clocksource using i.MX TPM" if COMPILE_TEST
619-
depends on ARM && CLKDEV_LOOKUP
619+
depends on (ARM || ARM64) && CLKDEV_LOOKUP
620620
select CLKSRC_MMIO
621+
select TIMER_OF
621622
help
622623
Enable this option to use IMX Timer/PWM Module (TPM) timer as
623624
clocksource.
@@ -696,8 +697,18 @@ config INGENIC_TIMER
696697
help
697698
Support for the timer/counter unit of the Ingenic JZ SoCs.
698699

700+
config INGENIC_SYSOST
701+
bool "Clocksource/timer using the SYSOST in Ingenic X SoCs"
702+
depends on MIPS || COMPILE_TEST
703+
depends on COMMON_CLK
704+
select MFD_SYSCON
705+
select TIMER_OF
706+
select IRQ_DOMAIN
707+
help
708+
Support for the SYSOST of the Ingenic X Series SoCs.
709+
699710
config INGENIC_OST
700-
bool "Clocksource for Ingenic OS Timer"
711+
bool "Clocksource using the OST in Ingenic JZ SoCs"
701712
depends on MIPS || COMPILE_TEST
702713
depends on COMMON_CLK
703714
select MFD_SYSCON

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ obj-$(CONFIG_H8300_TMR8) += h8300_timer8.o
8282
obj-$(CONFIG_H8300_TMR16) += h8300_timer16.o
8383
obj-$(CONFIG_H8300_TPU) += h8300_tpu.o
8484
obj-$(CONFIG_INGENIC_OST) += ingenic-ost.o
85+
obj-$(CONFIG_INGENIC_SYSOST) += ingenic-sysost.o
8586
obj-$(CONFIG_INGENIC_TIMER) += ingenic-timer.o
8687
obj-$(CONFIG_CLKSRC_ST_LPC) += clksrc_st_lpc.o
8788
obj-$(CONFIG_X86_NUMACHIP) += numachip.o

0 commit comments

Comments
 (0)