Skip to content

Commit

Permalink
Merge tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "A few drivers got some nice cleanups and a new driver are making the
  bulk of the changes.

  Subsystem:
   - allow rtc_read_alarm without read_alarm callback

  New driver:
   - NXP BBNSM module RTC

  Drivers:
   - use IRQ flags from fwnode when available
   - abx80x: nvmem support
   - brcmstb-waketimer: add non-wake alarm support
   - ingenic: provide CLK32K clock
   - isl12022: cleanups
   - moxart: switch to using gpiod API
   - pcf85363: allow setting quartz load
   - pm8xxx: cleanups and support for setting time
   - rv3028, rv3032: add ACPI support"

* tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (64 commits)
  rtc: pm8xxx: add support for nvmem offset
  dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset
  rtc: abx80x: Add nvmem support
  rtc: rx6110: Remove unused of_gpio,h
  rtc: efi: Avoid spamming the log on RTC read failure
  rtc: isl12022: sort header inclusion alphabetically
  rtc: isl12022: Join string literals back
  rtc: isl12022: Drop unneeded OF guards and of_match_ptr()
  rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L
  rtc: isl12022: Get rid of unneeded private struct isl12022
  rtc: pcf85363: add support for the quartz-load-femtofarads property
  dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding
  rtc: allow rtc_read_alarm without read_alarm callback
  rtc: rv3032: add ACPI support
  rtc: rv3028: add ACPI support
  rtc: bbnsm: Add the bbnsm rtc support
  rtc: jz4740: Register clock provider for the CLK32K pin
  rtc: jz4740: Use dev_err_probe()
  rtc: jz4740: Use readl_poll_timeout
  dt-bindings: rtc: Add #clock-cells property
  ...
  • Loading branch information
Linus Torvalds committed Mar 3, 2023
2 parents 2eb29d5 + 3ca0495 commit 271d893
Show file tree
Hide file tree
Showing 40 changed files with 1,228 additions and 531 deletions.
44 changes: 44 additions & 0 deletions Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/amlogic,meson-vrtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic Virtual RTC (VRTC)

maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>

description: |
This is a Linux interface to an RTC managed by firmware, hence it's
virtual from a Linux perspective. The interface is 1 register where
an alarm time (in seconds) is to be written.
The alarm register is a simple scratch register shared between the
application processors (AP) and the secure co-processor (SCP.) When
the AP suspends, the SCP will use the value of this register to
program an always-on timer before going sleep. When the timer expires,
the SCP will wake up and will then wake the AP.
allOf:
- $ref: rtc.yaml#

properties:
compatible:
enum:
- amlogic,meson-vrtc

reg:
maxItems: 1

required:
- compatible
- reg

additionalProperties: false

examples:
- |
rtc@a8 {
compatible = "amlogic,meson-vrtc";
reg = <0x000a8 0x4>;
};
21 changes: 14 additions & 7 deletions Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ maintainers:

description:
The Broadcom STB wake-up timer provides a 27Mhz resolution timer, with the
ability to wake up the system from low-power suspend/standby modes.
ability to wake up the system from low-power suspend/standby modes and
optionally generate RTC alarm interrupts.

allOf:
- $ref: "rtc.yaml#"
Expand All @@ -24,8 +25,14 @@ properties:
maxItems: 1

interrupts:
description: the TIMER interrupt
maxItems: 1
minItems: 1
items:
- description: the TIMER interrupt
- description: the ALARM interrupt
description:
The TIMER interrupt wakes the system from low-power suspend/standby modes.
An ALARM interrupt may be specified to interrupt the CPU when an RTC alarm
is enabled.

clocks:
description: clock reference in the 27MHz domain
Expand All @@ -35,10 +42,10 @@ additionalProperties: false

examples:
- |
rtc@f0411580 {
rtc@f041a080 {
compatible = "brcm,brcmstb-waketimer";
reg = <0xf0411580 0x14>;
interrupts = <0x3>;
interrupt-parent = <&aon_pm_l2_intc>;
reg = <0xf041a080 0x14>;
interrupts-extended = <&aon_pm_l2_intc 0x04>,
<&upg_aux_aon_intr2_intc 0x08>;
clocks = <&upg_fixed>;
};
29 changes: 29 additions & 0 deletions Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ maintainers:

allOf:
- $ref: rtc.yaml#
- if:
not:
properties:
compatible:
contains:
enum:
- ingenic,jz4770-rtc
- ingenic,jz4780-rtc
then:
properties:
"#clock-cells": false

properties:
compatible:
Expand Down Expand Up @@ -39,6 +50,9 @@ properties:
clock-names:
const: rtc

"#clock-cells":
const: 0

system-power-controller:
description: |
Indicates that the RTC is responsible for powering OFF
Expand Down Expand Up @@ -83,3 +97,18 @@ examples:
clocks = <&cgu JZ4740_CLK_RTC>;
clock-names = "rtc";
};
- |
#include <dt-bindings/clock/ingenic,jz4780-cgu.h>
rtc: rtc@10003000 {
compatible = "ingenic,jz4780-rtc", "ingenic,jz4760-rtc";
reg = <0x10003000 0x4c>;
interrupt-parent = <&intc>;
interrupts = <32>;
clocks = <&cgu JZ4780_CLK_RTCLK>;
clock-names = "rtc";
#clock-cells = <0>;
};
54 changes: 54 additions & 0 deletions Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/microcrystal,rv3028.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip RV-3028 RTC

allOf:
- $ref: rtc.yaml#

maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>

properties:
compatible:
const: microcrystal,rv3028

reg:
maxItems: 1

interrupts:
maxItems: 1

trickle-resistor-ohms:
enum:
- 3000
- 5000
- 9000
- 15000

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@51 {
compatible = "microcrystal,rv3028";
reg = <0x51>;
pinctrl-0 = <&rtc_nint_pins>;
interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>;
trickle-resistor-ohms = <3000>;
};
};
...
12 changes: 6 additions & 6 deletions Documentation/devicetree/bindings/rtc/moxa,moxart-rtc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ MOXA ART real-time clock
Required properties:

- compatible : Should be "moxa,moxart-rtc"
- gpio-rtc-sclk : RTC sclk gpio, with zero flags
- gpio-rtc-data : RTC data gpio, with zero flags
- gpio-rtc-reset : RTC reset gpio, with zero flags
- rtc-sclk-gpios : RTC sclk gpio, with zero flags
- rtc-data-gpios : RTC data gpio, with zero flags
- rtc-reset-gpios : RTC reset gpio, with zero flags

Example:

rtc: rtc {
compatible = "moxa,moxart-rtc";
gpio-rtc-sclk = <&gpio 5 0>;
gpio-rtc-data = <&gpio 6 0>;
gpio-rtc-reset = <&gpio 7 0>;
rtc-sclk-gpios = <&gpio 5 0>;
rtc-data-gpios = <&gpio 6 0>;
rtc-reset-gpios = <&gpio 7 0>;
};
5 changes: 4 additions & 1 deletion Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ maintainers:

properties:
compatible:
const: nxp,pcf2127
enum:
- nxp,pca2129
- nxp,pcf2127
- nxp,pcf2129

reg:
maxItems: 1
Expand Down
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/nxp,pcf85363.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Philips PCF85263/PCF85363 Real Time Clock

maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
enum:
- nxp,pcf85263
- nxp,pcf85363

reg:
maxItems: 1

"#clock-cells":
const: 0

clock-output-names:
maxItems: 1

interrupts:
maxItems: 1

quartz-load-femtofarads:
description:
The capacitive load of the quartz(x-tal).
enum: [6000, 7000, 12500]
default: 7000

start-year: true
wakeup-source: true

required:
- compatible
- reg

additionalProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@51 {
compatible = "nxp,pcf85363";
reg = <0x51>;
#clock-cells = <0>;
quartz-load-femtofarads = <12500>;
};
};
2 changes: 0 additions & 2 deletions Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ properties:
- microcrystal,rv8564
- nxp,pca8565
- nxp,pcf8563
- nxp,pcf85263
- nxp,pcf85363

reg:
maxItems: 1
Expand Down
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ properties:
description:
Indicates that the setting of RTC time is allowed by the host CPU.

nvmem-cells:
items:
- description:
four-byte nvmem cell holding a little-endian offset from the Unix
epoch representing the time when the RTC timer was last reset

nvmem-cell-names:
items:
- const: offset

wakeup-source: true

required:
Expand Down Expand Up @@ -69,6 +79,8 @@ examples:
compatible = "qcom,pm8921-rtc";
reg = <0x11d>;
interrupts = <0x27 0>;
nvmem-cells = <&rtc_offset>;
nvmem-cell-names = "offset";
};
};
};
Expand Down
22 changes: 0 additions & 22 deletions Documentation/devicetree/bindings/rtc/rtc-meson-vrtc.txt

This file was deleted.

6 changes: 2 additions & 4 deletions Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ properties:
- isil,isl1218
# Intersil ISL12022 Real-time Clock
- isil,isl12022
# Real Time Clock Module with I2C-Bus
- microcrystal,rv3028
# Loongson-2K Socs/LS7A bridge Real-time Clock
- loongson,ls2x-rtc
# Real Time Clock Module with I2C-Bus
- microcrystal,rv3029
# Real Time Clock
- microcrystal,rv8523
- nxp,pca2129
- nxp,pcf2129
# Real-time Clock Module
- pericom,pt7c4338
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
Expand Down
14 changes: 13 additions & 1 deletion drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ config RTC_DRV_MPC5121
config RTC_DRV_JZ4740
tristate "Ingenic JZ4740 SoC"
depends on MIPS || COMPILE_TEST
depends on OF
depends on OF && COMMON_CLK
help
If you say yes here you get support for the Ingenic JZ47xx SoCs RTC
controllers.
Expand Down Expand Up @@ -1773,6 +1773,18 @@ config RTC_DRV_SNVS
This driver can also be built as a module, if so, the module
will be called "rtc-snvs".

config RTC_DRV_BBNSM
tristate "NXP BBNSM RTC support"
select REGMAP_MMIO
depends on ARCH_MXC || COMPILE_TEST
depends on HAS_IOMEM
depends on OF
help
If you say yes here you get support for the NXP BBNSM RTC module.

This driver can also be built as a module, if so, the module
will be called "rtc-bbnsm".

config RTC_DRV_IMX_SC
depends on IMX_SCU
depends on HAVE_ARM_SMCCC
Expand Down
1 change: 1 addition & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ obj-$(CONFIG_RTC_DRV_ASPEED) += rtc-aspeed.o
obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o
obj-$(CONFIG_RTC_DRV_AT91SAM9) += rtc-at91sam9.o
obj-$(CONFIG_RTC_DRV_AU1XXX) += rtc-au1xxx.o
obj-$(CONFIG_RTC_DRV_BBNSM) += rtc-nxp-bbnsm.o
obj-$(CONFIG_RTC_DRV_BD70528) += rtc-bd70528.o
obj-$(CONFIG_RTC_DRV_BQ32K) += rtc-bq32k.o
obj-$(CONFIG_RTC_DRV_BQ4802) += rtc-bq4802.o
Expand Down
Loading

0 comments on commit 271d893

Please sign in to comment.