Skip to content

Commit d324e9a

Browse files
committed
Merge tag 'rtc-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "Subsystem: - stop setting max_user_freq from the individual drivers as this has not been hardware related for a while New drivers: - Andes ATCRTC100 - Apple SMC - Nvidia VRS Drivers: - renesas-rtca3: add RZ/V2H support - tegra: add ACPI support" * tag 'rtc-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (34 commits) rtc: spacemit: MFD_SPACEMIT_P1 as dependencies rtc: atcrtc100: Fix signedness bug in probe() rtc: max31335: Fix ignored return value in set_alarm rtc: gamecube: Check the return value of ioremap() Documentation: ABI: testing: Fix "upto" typo in rtc-cdev rtc: Add new rtc-macsmc driver for Apple Silicon Macs dt-bindings: rtc: Add Apple SMC RTC MAINTAINERS: drop unneeded file entry in NVIDIA VRS RTC DRIVER rtc: isl12026: Add id_table rtc: renesas-rtca3: Add support for multiple reset lines dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2H support rtc: tegra: Replace deprecated SIMPLE_DEV_PM_OPS rtc: tegra: Add ACPI support rtc: tegra: Use devm_clk_get_enabled() in probe rtc: Kconfig: add MC34708 to mc13xxx help text rtc: s35390a: use u8 instead of char for register buffer rtc: nvvrs: add NVIDIA VRS RTC device driver dt-bindings: rtc: Document NVIDIA VRS RTC rtc: atcrtc100: Add ATCRTC100 RTC driver MAINTAINERS: Add entry for ATCRTC100 RTC driver ...
2 parents a919610 + 16bd954 commit d324e9a

30 files changed

Lines changed: 1352 additions & 100 deletions

Documentation/ABI/testing/rtc-cdev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Description:
1414
for RTCs that support alarms
1515

1616
* RTC_ALM_READ, RTC_ALM_SET: Read or set the alarm time for
17-
RTCs that support alarms. Can be set upto 24 hours in the
17+
RTCs that support alarms. Can be set up to 24 hours in the
1818
future. Requires a separate RTC_AIE_ON call to enable the
1919
alarm interrupt. (Prefer to use RTC_WKALM_*)
2020

Documentation/devicetree/bindings/mfd/apple,smc.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ properties:
4646
reboot:
4747
$ref: /schemas/power/reset/apple,smc-reboot.yaml
4848

49+
rtc:
50+
$ref: /schemas/rtc/apple,smc-rtc.yaml
51+
4952
additionalProperties: false
5053

5154
required:
@@ -80,5 +83,11 @@ examples:
8083
nvmem-cell-names = "shutdown_flag", "boot_stage",
8184
"boot_error_count", "panic_count";
8285
};
86+
87+
rtc {
88+
compatible = "apple,smc-rtc";
89+
nvmem-cells = <&rtc_offset>;
90+
nvmem-cell-names = "rtc_offset";
91+
};
8392
};
8493
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/andestech,atcrtc100.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Andes ATCRTC100 Real-Time Clock
8+
9+
maintainers:
10+
- CL Wang <cl634@andestech.com>
11+
12+
allOf:
13+
- $ref: rtc.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- andestech,atcrtc100
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
items:
25+
- description: Periodic timekeeping interrupt
26+
- description: RTC alarm interrupt
27+
28+
required:
29+
- compatible
30+
- reg
31+
- interrupts
32+
33+
unevaluatedProperties: false
34+
35+
examples:
36+
- |
37+
#include <dt-bindings/interrupt-controller/irq.h>
38+
39+
rtc@f0300000 {
40+
compatible = "andestech,atcrtc100";
41+
reg = <0xf0300000 0x100>;
42+
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>, <2 IRQ_TYPE_LEVEL_HIGH>;
43+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/apple,smc-rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Apple SMC RTC
8+
9+
description:
10+
Apple Silicon Macs (M1, etc.) have an RTC that is part of the PMU IC,
11+
but most of the PMU functionality is abstracted out by the SMC.
12+
An additional RTC offset stored inside NVMEM is required to compute
13+
the current date/time.
14+
15+
maintainers:
16+
- Sven Peter <sven@kernel.org>
17+
18+
properties:
19+
compatible:
20+
const: apple,smc-rtc
21+
22+
nvmem-cells:
23+
items:
24+
- description: 48bit RTC offset, specified in 32768 (2^15) Hz clock ticks
25+
26+
nvmem-cell-names:
27+
items:
28+
- const: rtc_offset
29+
30+
required:
31+
- compatible
32+
- nvmem-cells
33+
- nvmem-cell-names
34+
35+
additionalProperties: false
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/nvidia,vrs-10.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NVIDIA Voltage Regulator Specification Real Time Clock
8+
9+
maintainers:
10+
- Shubhi Garg <shgarg@nvidia.com>
11+
12+
description:
13+
NVIDIA VRS-10 (Voltage Regulator Specification) is a Power Management IC
14+
(PMIC) that implements a power sequencing solution with I2C interface.
15+
The device includes a real-time clock (RTC) with 32kHz clock output and
16+
backup battery support, alarm functionality for system wake-up from
17+
suspend and shutdown states, OTP memory for power sequencing configuration,
18+
and an interrupt controller for managing VRS events.
19+
20+
properties:
21+
compatible:
22+
const: nvidia,vrs-10
23+
24+
reg:
25+
maxItems: 1
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
interrupt-controller: true
31+
32+
'#interrupt-cells':
33+
const: 2
34+
35+
required:
36+
- compatible
37+
- reg
38+
- interrupts
39+
- interrupt-controller
40+
- '#interrupt-cells'
41+
42+
additionalProperties: false
43+
44+
examples:
45+
- |
46+
#include <dt-bindings/interrupt-controller/irq.h>
47+
i2c {
48+
#address-cells = <1>;
49+
#size-cells = <0>;
50+
51+
pmic@3c {
52+
compatible = "nvidia,vrs-10";
53+
reg = <0x3c>;
54+
interrupt-parent = <&pmc>;
55+
interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
56+
interrupt-controller;
57+
#interrupt-cells = <2>;
58+
};
59+
};

Documentation/devicetree/bindings/rtc/renesas,rz-rtca3.yaml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ title: Renesas RTCA-3 Real Time Clock
99
maintainers:
1010
- Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
1111

12-
allOf:
13-
- $ref: rtc.yaml#
14-
1512
properties:
1613
compatible:
1714
items:
1815
- enum:
1916
- renesas,r9a08g045-rtca3 # RZ/G3S
17+
- renesas,r9a09g057-rtca3 # RZ/V2H
2018
- const: renesas,rz-rtca3
2119

2220
reg:
@@ -48,8 +46,12 @@ properties:
4846
maxItems: 1
4947

5048
resets:
51-
items:
52-
- description: VBATTB module reset
49+
minItems: 1
50+
maxItems: 2
51+
52+
reset-names:
53+
minItems: 1
54+
maxItems: 2
5355

5456
required:
5557
- compatible
@@ -61,6 +63,39 @@ required:
6163
- power-domains
6264
- resets
6365

66+
allOf:
67+
- $ref: rtc.yaml#
68+
69+
- if:
70+
properties:
71+
compatible:
72+
contains:
73+
const: renesas,r9a08g045-rtca3
74+
then:
75+
properties:
76+
resets:
77+
items:
78+
- description: VBATTB module reset
79+
reset-names:
80+
const: vbattb
81+
- if:
82+
properties:
83+
compatible:
84+
contains:
85+
const: renesas,r9a09g057-rtca3
86+
then:
87+
properties:
88+
resets:
89+
items:
90+
- description: RTC reset
91+
- description: Reset for the RTEST registers
92+
reset-names:
93+
items:
94+
- const: rtc
95+
- const: rtest
96+
required:
97+
- reset-names
98+
6499
additionalProperties: false
65100

66101
examples:
@@ -81,4 +116,5 @@ examples:
81116
clock-names = "bus", "counter";
82117
power-domains = <&cpg>;
83118
resets = <&cpg R9A08G045_VBAT_BRESETN>;
119+
reset-names = "vbattb";
84120
};

MAINTAINERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,6 +2475,7 @@ F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
24752475
F: Documentation/devicetree/bindings/power/apple*
24762476
F: Documentation/devicetree/bindings/power/reset/apple,smc-reboot.yaml
24772477
F: Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml
2478+
F: Documentation/devicetree/bindings/rtc/apple,smc-rtc.yaml
24782479
F: Documentation/devicetree/bindings/spi/apple,spi.yaml
24792480
F: Documentation/devicetree/bindings/spmi/apple,spmi.yaml
24802481
F: Documentation/devicetree/bindings/usb/apple,dwc3.yaml
@@ -2501,6 +2502,7 @@ F: drivers/nvmem/apple-spmi-nvmem.c
25012502
F: drivers/pinctrl/pinctrl-apple-gpio.c
25022503
F: drivers/power/reset/macsmc-reboot.c
25032504
F: drivers/pwm/pwm-apple.c
2505+
F: drivers/rtc/rtc-macsmc.c
25042506
F: drivers/soc/apple/*
25052507
F: drivers/spi/spi-apple.c
25062508
F: drivers/spmi/spmi-apple-controller.c
@@ -4015,6 +4017,12 @@ F: drivers/power/reset/atc260x-poweroff.c
40154017
F: drivers/regulator/atc260x-regulator.c
40164018
F: include/linux/mfd/atc260x/*
40174019

4020+
ATCRTC100 RTC DRIVER
4021+
M: CL Wang <cl634@andestech.com>
4022+
S: Supported
4023+
F: Documentation/devicetree/bindings/rtc/andestech,atcrtc100.yaml
4024+
F: drivers/rtc/rtc-atcrtc100.c
4025+
40184026
ATHEROS 71XX/9XXX GPIO DRIVER
40194027
M: Alban Bedel <albeu@free.fr>
40204028
S: Maintained
@@ -18692,6 +18700,13 @@ S: Maintained
1869218700
F: drivers/video/fbdev/nvidia/
1869318701
F: drivers/video/fbdev/riva/
1869418702

18703+
NVIDIA VRS RTC DRIVER
18704+
M: Shubhi Garg <shgarg@nvidia.com>
18705+
L: linux-tegra@vger.kernel.org
18706+
S: Maintained
18707+
F: Documentation/devicetree/bindings/rtc/nvidia,vrs-10.yaml
18708+
F: drivers/rtc/rtc-nvidia-vrs10.c
18709+
1869518710
NVIDIA WMI EC BACKLIGHT DRIVER
1869618711
M: Daniel Dadap <ddadap@nvidia.com>
1869718712
L: platform-driver-x86@vger.kernel.org

drivers/rtc/Kconfig

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,22 @@ config RTC_DRV_MAX77686
409409
config RTC_DRV_SPACEMIT_P1
410410
tristate "SpacemiT P1 RTC"
411411
depends on ARCH_SPACEMIT || COMPILE_TEST
412-
select MFD_SPACEMIT_P1
413-
default ARCH_SPACEMIT
412+
depends on MFD_SPACEMIT_P1
413+
default MFD_SPACEMIT_P1
414414
help
415415
Enable support for the RTC function in the SpacemiT P1 PMIC.
416416
This driver can also be built as a module, which will be called
417417
"spacemit-p1-rtc".
418418

419+
config RTC_DRV_NVIDIA_VRS10
420+
tristate "NVIDIA VRS10 RTC device"
421+
help
422+
If you say yes here you will get support for the battery backed RTC device
423+
of NVIDIA VRS (Voltage Regulator Specification). The RTC is connected via
424+
I2C interface and supports alarm functionality.
425+
This driver can also be built as a module. If so, the module will be called
426+
rtc-nvidia-vrs10.
427+
419428
config RTC_DRV_NCT3018Y
420429
tristate "Nuvoton NCT3018Y"
421430
depends on OF
@@ -1063,6 +1072,21 @@ config RTC_DRV_ALPHA
10631072
Direct support for the real-time clock found on every Alpha
10641073
system, specifically MC146818 compatibles. If in doubt, say Y.
10651074

1075+
config RTC_DRV_ATCRTC100
1076+
tristate "Andes ATCRTC100"
1077+
depends on ARCH_ANDES || COMPILE_TEST
1078+
select REGMAP_MMIO
1079+
help
1080+
If you say yes here you will get support for the Andes ATCRTC100
1081+
RTC driver.
1082+
1083+
This driver provides support for the Andes ATCRTC100 real-time clock
1084+
device. It allows setting and retrieving the time and date, as well
1085+
as setting alarms.
1086+
1087+
To compile this driver as a module, choose M here: the module will
1088+
be called rtc-atcrtc100.
1089+
10661090
config RTC_DRV_DS1216
10671091
tristate "Dallas DS1216"
10681092
depends on SNI_RM
@@ -1749,7 +1773,7 @@ config RTC_DRV_MC13XXX
17491773
tristate "Freescale MC13xxx RTC"
17501774
help
17511775
This enables support for the RTCs found on Freescale's PMICs
1752-
MC13783 and MC13892.
1776+
MC13783, MC13892 and MC34708.
17531777

17541778
config RTC_DRV_MPC5121
17551779
tristate "Freescale MPC5121 built-in RTC"
@@ -2074,6 +2098,17 @@ config RTC_DRV_WILCO_EC
20742098
This can also be built as a module. If so, the module will
20752099
be named "rtc_wilco_ec".
20762100

2101+
config RTC_DRV_MACSMC
2102+
tristate "Apple Mac System Management Controller RTC"
2103+
depends on MFD_MACSMC
2104+
help
2105+
If you say yes here you get support for RTC functions
2106+
inside Apple SPMI PMUs accessed through the SoC's
2107+
System Management Controller
2108+
2109+
To compile this driver as a module, choose M here: the
2110+
module will be called rtc-macsmc.
2111+
20772112
config RTC_DRV_MSC313
20782113
tristate "MStar MSC313 RTC"
20792114
depends on ARCH_MSTARV7 || COMPILE_TEST

drivers/rtc/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ obj-$(CONFIG_RTC_DRV_ASM9260) += rtc-asm9260.o
3434
obj-$(CONFIG_RTC_DRV_ASPEED) += rtc-aspeed.o
3535
obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
3636
obj-$(CONFIG_RTC_DRV_AT91SAM9) += rtc-at91sam9.o
37+
obj-$(CONFIG_RTC_DRV_ATCRTC100) += rtc-atcrtc100.o
3738
obj-$(CONFIG_RTC_DRV_AU1XXX) += rtc-au1xxx.o
3839
obj-$(CONFIG_RTC_DRV_BBNSM) += rtc-nxp-bbnsm.o
3940
obj-$(CONFIG_RTC_DRV_BD70528) += rtc-bd70528.o
@@ -93,6 +94,7 @@ obj-$(CONFIG_RTC_DRV_M48T35) += rtc-m48t35.o
9394
obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o
9495
obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o
9596
obj-$(CONFIG_RTC_DRV_MA35D1) += rtc-ma35d1.o
97+
obj-$(CONFIG_RTC_DRV_MACSMC) += rtc-macsmc.o
9698
obj-$(CONFIG_RTC_DRV_MAX31335) += rtc-max31335.o
9799
obj-$(CONFIG_RTC_DRV_MAX6900) += rtc-max6900.o
98100
obj-$(CONFIG_RTC_DRV_MAX6902) += rtc-max6902.o
@@ -121,6 +123,7 @@ obj-$(CONFIG_RTC_DRV_GAMECUBE) += rtc-gamecube.o
121123
obj-$(CONFIG_RTC_DRV_NCT3018Y) += rtc-nct3018y.o
122124
obj-$(CONFIG_RTC_DRV_NCT6694) += rtc-nct6694.o
123125
obj-$(CONFIG_RTC_DRV_NTXEC) += rtc-ntxec.o
126+
obj-$(CONFIG_RTC_DRV_NVIDIA_VRS10)+= rtc-nvidia-vrs10.o
124127
obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
125128
obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
126129
obj-$(CONFIG_RTC_DRV_OPTEE) += rtc-optee.o

0 commit comments

Comments
 (0)