Skip to content

Commit 6a34fdc

Browse files
committed
Merge tag 'rtc-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "The bulk of the patches are about replacing the uie_unsupported struct rtc_device member by a feature bit. Subsystem: - remove uie_unsupported, all users have been converted to clear RTC_FEATURE_UPDATE_INTERRUPT and provide a reason - RTCs with an alarm with a resolution of a minute are now letting the core handle rounding down the alarm time - fix use-after-free on device removal New driver: - OP-TEE RTC PTA Drivers: - sun6i: Add H616 support - cmos: Fix the AltCentury for AMD platforms - spear: set range" * tag 'rtc-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (56 commits) rtc: check if __rtc_read_time was successful rtc: gamecube: Fix refcount leak in gamecube_rtc_read_offset_from_sram rtc: mc146818-lib: Fix the AltCentury for AMD platforms rtc: optee: add RTC driver for OP-TEE RTC PTA rtc: pm8xxx: Return -ENODEV if set_time disallowed rtc: pm8xxx: Attach wake irq to device clk: sunxi-ng: sun6i-rtc: include clk/sunxi-ng.h rtc: remove uie_unsupported rtc: xgene: stop using uie_unsupported rtc: hym8563: switch to RTC_FEATURE_UPDATE_INTERRUPT rtc: hym8563: let the core handle the alarm resolution rtc: hym8563: switch to devm_rtc_allocate_device rtc: efi: switch to RTC_FEATURE_UPDATE_INTERRUPT rtc: efi: switch to devm_rtc_allocate_device rtc: add new RTC_FEATURE_ALARM_WAKEUP_ONLY feature rtc: spear: fix spear_rtc_read_time rtc: spear: drop uie_unsupported rtc: spear: set range rtc: spear: switch to devm_rtc_allocate_device rtc: pcf8563: switch to RTC_FEATURE_UPDATE_INTERRUPT ...
2 parents e8b767f + 915593a commit 6a34fdc

41 files changed

Lines changed: 1205 additions & 243 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,22 @@ properties:
1616

1717
compatible:
1818
oneOf:
19-
- const: allwinner,sun6i-a31-rtc
20-
- const: allwinner,sun8i-a23-rtc
21-
- const: allwinner,sun8i-h3-rtc
22-
- const: allwinner,sun8i-r40-rtc
23-
- const: allwinner,sun8i-v3-rtc
24-
- const: allwinner,sun50i-h5-rtc
19+
- enum:
20+
- allwinner,sun6i-a31-rtc
21+
- allwinner,sun8i-a23-rtc
22+
- allwinner,sun8i-h3-rtc
23+
- allwinner,sun8i-r40-rtc
24+
- allwinner,sun8i-v3-rtc
25+
- allwinner,sun50i-h5-rtc
26+
- allwinner,sun50i-h6-rtc
27+
- allwinner,sun50i-h616-rtc
28+
- allwinner,sun50i-r329-rtc
2529
- items:
2630
- const: allwinner,sun50i-a64-rtc
2731
- const: allwinner,sun8i-h3-rtc
28-
- const: allwinner,sun50i-h6-rtc
32+
- items:
33+
- const: allwinner,sun20i-d1-rtc
34+
- const: allwinner,sun50i-r329-rtc
2935

3036
reg:
3137
maxItems: 1
@@ -37,7 +43,12 @@ properties:
3743
- description: RTC Alarm 1
3844

3945
clocks:
40-
maxItems: 1
46+
minItems: 1
47+
maxItems: 4
48+
49+
clock-names:
50+
minItems: 1
51+
maxItems: 4
4152

4253
clock-output-names:
4354
minItems: 1
@@ -85,6 +96,7 @@ allOf:
8596
enum:
8697
- allwinner,sun8i-h3-rtc
8798
- allwinner,sun50i-h5-rtc
99+
- allwinner,sun50i-h6-rtc
88100

89101
then:
90102
properties:
@@ -96,19 +108,68 @@ allOf:
96108
properties:
97109
compatible:
98110
contains:
99-
const: allwinner,sun50i-h6-rtc
111+
const: allwinner,sun50i-h616-rtc
100112

101113
then:
102114
properties:
103-
clock-output-names:
115+
clocks:
104116
minItems: 3
105117
maxItems: 3
118+
items:
119+
- description: Bus clock for register access
120+
- description: 24 MHz oscillator
121+
- description: 32 kHz clock from the CCU
122+
123+
clock-names:
124+
minItems: 3
125+
maxItems: 3
126+
items:
127+
- const: bus
128+
- const: hosc
129+
- const: pll-32k
130+
131+
required:
132+
- clocks
133+
- clock-names
106134

107135
- if:
108136
properties:
109137
compatible:
110138
contains:
111-
const: allwinner,sun8i-r40-rtc
139+
const: allwinner,sun50i-r329-rtc
140+
141+
then:
142+
properties:
143+
clocks:
144+
minItems: 3
145+
maxItems: 4
146+
items:
147+
- description: Bus clock for register access
148+
- description: 24 MHz oscillator
149+
- description: AHB parent for internal SPI clock
150+
- description: External 32768 Hz oscillator
151+
152+
clock-names:
153+
minItems: 3
154+
maxItems: 4
155+
items:
156+
- const: bus
157+
- const: hosc
158+
- const: ahb
159+
- const: ext-osc32k
160+
161+
required:
162+
- clocks
163+
- clock-names
164+
165+
- if:
166+
properties:
167+
compatible:
168+
contains:
169+
enum:
170+
- allwinner,sun8i-r40-rtc
171+
- allwinner,sun50i-h616-rtc
172+
- allwinner,sun50i-r329-rtc
112173

113174
then:
114175
properties:
@@ -127,7 +188,6 @@ required:
127188
- compatible
128189
- reg
129190
- interrupts
130-
- clock-output-names
131191

132192
additionalProperties: false
133193

Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/rtc/atmel,at91sam9260-rtt.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Atmel AT91 RTT Device Tree Bindings
9+
10+
allOf:
11+
- $ref: "rtc.yaml#"
12+
13+
maintainers:
14+
- Alexandre Belloni <alexandre.belloni@bootlin.com>
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- items:
20+
- const: atmel,at91sam9260-rtt
21+
- items:
22+
- const: microchip,sam9x60-rtt
23+
- const: atmel,at91sam9260-rtt
24+
- items:
25+
- const: microchip,sama7g5-rtt
26+
- const: microchip,sam9x60-rtt
27+
- const: atmel,at91sam9260-rtt
28+
29+
reg:
30+
maxItems: 1
31+
32+
interrupts:
33+
maxItems: 1
34+
35+
clocks:
36+
maxItems: 1
37+
38+
atmel,rtt-rtc-time-reg:
39+
$ref: /schemas/types.yaml#/definitions/phandle-array
40+
items:
41+
- items:
42+
- description: Phandle to the GPBR node.
43+
- description: Offset within the GPBR block.
44+
description:
45+
Should encode the GPBR register used to store the time base when the
46+
RTT is used as an RTC. The first cell should point to the GPBR node
47+
and the second one encodes the offset within the GPBR block (or in
48+
other words, the GPBR register used to store the time base).
49+
50+
required:
51+
- compatible
52+
- reg
53+
- interrupts
54+
- clocks
55+
- atmel,rtt-rtc-time-reg
56+
57+
unevaluatedProperties: false
58+
59+
examples:
60+
- |
61+
#include <dt-bindings/interrupt-controller/irq.h>
62+
63+
rtc@fffffd20 {
64+
compatible = "atmel,at91sam9260-rtt";
65+
reg = <0xfffffd20 0x10>;
66+
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
67+
clocks = <&clk32k>;
68+
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
69+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14622,6 +14622,12 @@ L: op-tee@lists.trustedfirmware.org
1462214622
S: Maintained
1462314623
F: drivers/char/hw_random/optee-rng.c
1462414624

14625+
OP-TEE RTC DRIVER
14626+
M: Clément Léger <clement.leger@bootlin.com>
14627+
L: linux-rtc@vger.kernel.org
14628+
S: Maintained
14629+
F: drivers/rtc/rtc-optee.c
14630+
1462514631
OPA-VNIC DRIVER
1462614632
M: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
1462714633
M: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>

drivers/clk/sunxi-ng/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ config SUN6I_A31_CCU
6969
default MACH_SUN6I
7070
depends on MACH_SUN6I || COMPILE_TEST
7171

72+
config SUN6I_RTC_CCU
73+
tristate "Support for the Allwinner H616/R329 RTC CCU"
74+
default ARCH_SUNXI
75+
depends on ARCH_SUNXI || COMPILE_TEST
76+
7277
config SUN8I_A23_CCU
7378
tristate "Support for the Allwinner A23 CCU"
7479
default MACH_SUN8I

drivers/clk/sunxi-ng/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ obj-$(CONFIG_SUN50I_H616_CCU) += sun50i-h616-ccu.o
3636
obj-$(CONFIG_SUN4I_A10_CCU) += sun4i-a10-ccu.o
3737
obj-$(CONFIG_SUN5I_CCU) += sun5i-ccu.o
3838
obj-$(CONFIG_SUN6I_A31_CCU) += sun6i-a31-ccu.o
39+
obj-$(CONFIG_SUN6I_RTC_CCU) += sun6i-rtc-ccu.o
3940
obj-$(CONFIG_SUN8I_A23_CCU) += sun8i-a23-ccu.o
4041
obj-$(CONFIG_SUN8I_A33_CCU) += sun8i-a33-ccu.o
4142
obj-$(CONFIG_SUN8I_A83T_CCU) += sun8i-a83t-ccu.o
@@ -60,6 +61,7 @@ sun50i-h616-ccu-y += ccu-sun50i-h616.o
6061
sun4i-a10-ccu-y += ccu-sun4i-a10.o
6162
sun5i-ccu-y += ccu-sun5i.o
6263
sun6i-a31-ccu-y += ccu-sun6i-a31.o
64+
sun6i-rtc-ccu-y += ccu-sun6i-rtc.o
6365
sun8i-a23-ccu-y += ccu-sun8i-a23.o
6466
sun8i-a33-ccu-y += ccu-sun8i-a33.o
6567
sun8i-a83t-ccu-y += ccu-sun8i-a83t.o

0 commit comments

Comments
 (0)