Skip to content

Commit 378de6d

Browse files
committed
Merge tag 'rtc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "There are three new drivers this cycle. Also the cmos driver is getting fixes for longstanding wakeup issues on AMD. New drivers: - Analog Devices MAX31335 - Nuvoton ma35d1 - Texas Instrument TPS6594 PMIC RTC Drivers: - cmos: use ACPI alarm instead of HPET on recent AMD platforms - nuvoton: add NCT3015Y-R and NCT3018Y-R support - rv8803: proper suspend/resume and wakeup-source support" * tag 'rtc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (26 commits) rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R rtc: da9063: Use dev_err_probe() rtc: da9063: Use device_get_match_data() rtc: da9063: Make IRQ as optional rtc: max31335: Fix comparison in max31335_volatile_reg() rtc: max31335: use regmap_update_bits_check rtc: max31335: remove unecessary locking rtc: max31335: add driver support dt-bindings: rtc: max31335: add max31335 bindings rtc: rv8803: add wakeup-source support rtc: ac100: remove misuses of kernel-doc rtc: class: Remove usage of the deprecated ida_simple_xx() API rtc: MAINTAINERS: drop Alessandro Zummo rtc: ma35d1: remove hardcoded UIE support dt-bindings: rtc: qcom-pm8xxx: fix inconsistent example rtc: rv8803: Add power management support rtc: ds3232: avoid unused-const-variable warning rtc: lpc24xx: add missing dependency rtc: tps6594: Add driver for TPS6594 RTC rtc: Add driver for Nuvoton ma35d1 rtc controller ...
2 parents 0f289bd + 14688f1 commit 378de6d

File tree

23 files changed

+1819
-105
lines changed

23 files changed

+1819
-105
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/adi,max31335.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices MAX31335 RTC
8+
9+
maintainers:
10+
- Antoniu Miclaus <antoniu.miclaus@analog.com>
11+
12+
description:
13+
Analog Devices MAX31335 I2C RTC ±2ppm Automotive Real-Time Clock with
14+
Integrated MEMS Resonator.
15+
16+
allOf:
17+
- $ref: rtc.yaml#
18+
19+
properties:
20+
compatible:
21+
const: adi,max31335
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
"#clock-cells":
30+
description:
31+
RTC can be used as a clock source through its clock output pin.
32+
const: 0
33+
34+
adi,tc-diode:
35+
description:
36+
Select the diode configuration for the trickle charger.
37+
schottky - Schottky diode in series.
38+
standard+schottky - standard diode + Schottky diode in series.
39+
enum: [schottky, standard+schottky]
40+
41+
trickle-resistor-ohms:
42+
description:
43+
Selected resistor for trickle charger. Should be specified if trickle
44+
charger should be enabled.
45+
enum: [3000, 6000, 11000]
46+
47+
required:
48+
- compatible
49+
- reg
50+
51+
unevaluatedProperties: false
52+
53+
examples:
54+
- |
55+
#include <dt-bindings/interrupt-controller/irq.h>
56+
i2c {
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
60+
rtc@68 {
61+
compatible = "adi,max31335";
62+
reg = <0x68>;
63+
pinctrl-0 = <&rtc_nint_pins>;
64+
interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>;
65+
aux-voltage-chargeable = <1>;
66+
trickle-resistor-ohms = <6000>;
67+
adi,tc-diode = "schottky";
68+
};
69+
};
70+
...

Documentation/devicetree/bindings/rtc/epson,rx8900.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ properties:
2929
3030
trickle-diode-disable: true
3131

32+
wakeup-source: true
33+
3234
required:
3335
- compatible
3436
- reg
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/rtc/nuvoton,ma35d1-rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Nuvoton MA35D1 Real Time Clock
8+
9+
maintainers:
10+
- Min-Jen Chen <mjchen@nuvoton.com>
11+
12+
allOf:
13+
- $ref: rtc.yaml#
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- nuvoton,ma35d1-rtc
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
maxItems: 1
25+
26+
clocks:
27+
maxItems: 1
28+
29+
required:
30+
- compatible
31+
- reg
32+
- interrupts
33+
- clocks
34+
35+
unevaluatedProperties: false
36+
37+
examples:
38+
- |
39+
#include <dt-bindings/interrupt-controller/arm-gic.h>
40+
#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
41+
rtc@40410000 {
42+
compatible = "nuvoton,ma35d1-rtc";
43+
reg = <0x40410000 0x200>;
44+
interrupts = <GIC_SPI 5 IRQ_TYPE_EDGE_RISING>;
45+
clocks = <&clk RTC_GATE>;
46+
};
47+
48+
...

Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,27 @@ additionalProperties: false
6161

6262
examples:
6363
- |
64+
#include <dt-bindings/interrupt-controller/irq.h>
6465
#include <dt-bindings/spmi/spmi.h>
65-
spmi_bus: spmi@c440000 {
66-
reg = <0x0c440000 0x1100>;
67-
#address-cells = <2>;
68-
#size-cells = <0>;
69-
pmicintc: pmic@0 {
70-
reg = <0x0 SPMI_USID>;
71-
compatible = "qcom,pm8921";
72-
interrupts = <104 8>;
73-
#interrupt-cells = <2>;
74-
interrupt-controller;
75-
#address-cells = <1>;
66+
67+
spmi {
68+
#address-cells = <2>;
7669
#size-cells = <0>;
7770
78-
pm8921_rtc: rtc@11d {
79-
compatible = "qcom,pm8921-rtc";
80-
reg = <0x11d>;
81-
interrupts = <0x27 0>;
82-
nvmem-cells = <&rtc_offset>;
83-
nvmem-cell-names = "offset";
71+
pmic@0 {
72+
compatible = "qcom,pm8941", "qcom,spmi-pmic";
73+
reg = <0x0 SPMI_USID>;
74+
#address-cells = <1>;
75+
#size-cells = <0>;
76+
77+
rtc@6000 {
78+
compatible = "qcom,pm8941-rtc";
79+
reg = <0x6000>, <0x6100>;
80+
reg-names = "rtc", "alarm";
81+
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
82+
nvmem-cells = <&rtc_offset>;
83+
nvmem-cell-names = "offset";
84+
};
8485
};
85-
};
8686
};
8787
...

MAINTAINERS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13126,6 +13126,14 @@ F: Documentation/devicetree/bindings/hwmon/adi,max31827.yaml
1312613126
F: Documentation/hwmon/max31827.rst
1312713127
F: drivers/hwmon/max31827.c
1312813128

13129+
MAX31335 RTC DRIVER
13130+
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
13131+
L: linux-rtc@vger.kernel.org
13132+
S: Supported
13133+
W: https://ez.analog.com/linux-software-drivers
13134+
F: Documentation/devicetree/bindings/rtc/adi,max31335.yaml
13135+
F: drivers/rtc/rtc-max31335.c
13136+
1312913137
MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
1313013138
L: linux-hwmon@vger.kernel.org
1313113139
S: Orphan
@@ -18451,7 +18459,6 @@ X: include/linux/srcu*.h
1845118459
X: kernel/rcu/srcu*.c
1845218460

1845318461
REAL TIME CLOCK (RTC) SUBSYSTEM
18454-
M: Alessandro Zummo <a.zummo@towertech.it>
1845518462
M: Alexandre Belloni <alexandre.belloni@bootlin.com>
1845618463
L: linux-rtc@vger.kernel.org
1845718464
S: Maintained

arch/alpha/kernel/rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ init_rtc_epoch(void)
8080
static int
8181
alpha_rtc_read_time(struct device *dev, struct rtc_time *tm)
8282
{
83-
int ret = mc146818_get_time(tm);
83+
int ret = mc146818_get_time(tm, 10);
8484

8585
if (ret < 0) {
8686
dev_err_ratelimited(dev, "unable to read current time\n");

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
14381438
memset(&curr_time, 0, sizeof(struct rtc_time));
14391439

14401440
if (hpet_rtc_flags & (RTC_UIE | RTC_AIE)) {
1441-
if (unlikely(mc146818_get_time(&curr_time) < 0)) {
1441+
if (unlikely(mc146818_get_time(&curr_time, 10) < 0)) {
14421442
pr_err_ratelimited("unable to read current time from RTC\n");
14431443
return IRQ_HANDLED;
14441444
}

arch/x86/kernel/rtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void mach_get_cmos_time(struct timespec64 *now)
6767
return;
6868
}
6969

70-
if (mc146818_get_time(&tm)) {
70+
if (mc146818_get_time(&tm, 1000)) {
7171
pr_err("Unable to read current time from RTC\n");
7272
now->tv_sec = now->tv_nsec = 0;
7373
return;

drivers/base/power/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static unsigned int read_magic_time(void)
120120
struct rtc_time time;
121121
unsigned int val;
122122

123-
if (mc146818_get_time(&time) < 0) {
123+
if (mc146818_get_time(&time, 1000) < 0) {
124124
pr_err("Unable to read current time from RTC\n");
125125
return 0;
126126
}

drivers/rtc/Kconfig

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,19 @@ config RTC_DRV_MAX8997
373373
This driver can also be built as a module. If so, the module
374374
will be called rtc-max8997.
375375

376+
config RTC_DRV_MAX31335
377+
tristate "Analog Devices MAX31335"
378+
depends on I2C
379+
depends on COMMON_CLK
380+
depends on HWMON || HWMON=n
381+
select REGMAP_I2C
382+
help
383+
If you say yes here you get support for the Analog Devices
384+
MAX31335.
385+
386+
This driver can also be built as a module. If so, the module
387+
will be called rtc-max31335.
388+
376389
config RTC_DRV_MAX77686
377390
tristate "Maxim MAX77686"
378391
depends on MFD_MAX77686 || MFD_MAX77620 || MFD_MAX77714 || COMPILE_TEST
@@ -578,6 +591,18 @@ config RTC_DRV_TPS6586X
578591
along with alarm. This driver supports the RTC driver for
579592
the TPS6586X RTC module.
580593

594+
config RTC_DRV_TPS6594
595+
tristate "TI TPS6594 RTC driver"
596+
depends on MFD_TPS6594
597+
default MFD_TPS6594
598+
help
599+
TI Power Management IC TPS6594 supports RTC functionality
600+
along with alarm. This driver supports the RTC driver for
601+
the TPS6594 RTC module.
602+
603+
This driver can also be built as a module. If so, the module
604+
will be called rtc-tps6594.
605+
581606
config RTC_DRV_TPS65910
582607
tristate "TI TPS65910 RTC driver"
583608
depends on MFD_TPS65910
@@ -1705,6 +1730,7 @@ config RTC_DRV_LPC24XX
17051730
tristate "NXP RTC for LPC178x/18xx/408x/43xx"
17061731
depends on ARCH_LPC18XX || COMPILE_TEST
17071732
depends on OF && HAS_IOMEM
1733+
depends on COMMON_CLK
17081734
help
17091735
This enables support for the NXP RTC found which can be found on
17101736
NXP LPC178x/18xx/408x/43xx devices.
@@ -1930,6 +1956,17 @@ config RTC_DRV_TI_K3
19301956
This driver can also be built as a module, if so, the module
19311957
will be called "rtc-ti-k3".
19321958

1959+
config RTC_DRV_MA35D1
1960+
tristate "Nuvoton MA35D1 RTC"
1961+
depends on ARCH_MA35 || COMPILE_TEST
1962+
select REGMAP_MMIO
1963+
help
1964+
If you say yes here you get support for the Nuvoton MA35D1
1965+
On-Chip Real Time Clock.
1966+
1967+
This driver can also be built as a module, if so, the module
1968+
will be called "rtc-ma35d1".
1969+
19331970
comment "HID Sensor RTC drivers"
19341971

19351972
config RTC_DRV_HID_SENSOR_TIME

0 commit comments

Comments
 (0)