Skip to content

Commit

Permalink
Merge tag 'rtc-5.18' 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:
 "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
  ...
  • Loading branch information
Linus Torvalds committed Apr 1, 2022
2 parents e8b767f + 915593a commit 6a34fdc
Show file tree
Hide file tree
Showing 41 changed files with 1,205 additions and 243 deletions.
84 changes: 72 additions & 12 deletions Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ properties:

compatible:
oneOf:
- const: allwinner,sun6i-a31-rtc
- const: allwinner,sun8i-a23-rtc
- const: allwinner,sun8i-h3-rtc
- const: allwinner,sun8i-r40-rtc
- const: allwinner,sun8i-v3-rtc
- const: allwinner,sun50i-h5-rtc
- enum:
- allwinner,sun6i-a31-rtc
- allwinner,sun8i-a23-rtc
- allwinner,sun8i-h3-rtc
- allwinner,sun8i-r40-rtc
- allwinner,sun8i-v3-rtc
- allwinner,sun50i-h5-rtc
- allwinner,sun50i-h6-rtc
- allwinner,sun50i-h616-rtc
- allwinner,sun50i-r329-rtc
- items:
- const: allwinner,sun50i-a64-rtc
- const: allwinner,sun8i-h3-rtc
- const: allwinner,sun50i-h6-rtc
- items:
- const: allwinner,sun20i-d1-rtc
- const: allwinner,sun50i-r329-rtc

reg:
maxItems: 1
Expand All @@ -37,7 +43,12 @@ properties:
- description: RTC Alarm 1

clocks:
maxItems: 1
minItems: 1
maxItems: 4

clock-names:
minItems: 1
maxItems: 4

clock-output-names:
minItems: 1
Expand Down Expand Up @@ -85,6 +96,7 @@ allOf:
enum:
- allwinner,sun8i-h3-rtc
- allwinner,sun50i-h5-rtc
- allwinner,sun50i-h6-rtc

then:
properties:
Expand All @@ -96,19 +108,68 @@ allOf:
properties:
compatible:
contains:
const: allwinner,sun50i-h6-rtc
const: allwinner,sun50i-h616-rtc

then:
properties:
clock-output-names:
clocks:
minItems: 3
maxItems: 3
items:
- description: Bus clock for register access
- description: 24 MHz oscillator
- description: 32 kHz clock from the CCU

clock-names:
minItems: 3
maxItems: 3
items:
- const: bus
- const: hosc
- const: pll-32k

required:
- clocks
- clock-names

- if:
properties:
compatible:
contains:
const: allwinner,sun8i-r40-rtc
const: allwinner,sun50i-r329-rtc

then:
properties:
clocks:
minItems: 3
maxItems: 4
items:
- description: Bus clock for register access
- description: 24 MHz oscillator
- description: AHB parent for internal SPI clock
- description: External 32768 Hz oscillator

clock-names:
minItems: 3
maxItems: 4
items:
- const: bus
- const: hosc
- const: ahb
- const: ext-osc32k

required:
- clocks
- clock-names

- if:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-r40-rtc
- allwinner,sun50i-h616-rtc
- allwinner,sun50i-r329-rtc

then:
properties:
Expand All @@ -127,7 +188,6 @@ required:
- compatible
- reg
- interrupts
- clock-output-names

additionalProperties: false

Expand Down
25 changes: 0 additions & 25 deletions Documentation/devicetree/bindings/rtc/atmel,at91sam9-rtc.txt

This file was deleted.

69 changes: 69 additions & 0 deletions Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/atmel,at91sam9260-rtt.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel AT91 RTT Device Tree Bindings

allOf:
- $ref: "rtc.yaml#"

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

properties:
compatible:
oneOf:
- items:
- const: atmel,at91sam9260-rtt
- items:
- const: microchip,sam9x60-rtt
- const: atmel,at91sam9260-rtt
- items:
- const: microchip,sama7g5-rtt
- const: microchip,sam9x60-rtt
- const: atmel,at91sam9260-rtt

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
maxItems: 1

atmel,rtt-rtc-time-reg:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: Phandle to the GPBR node.
- description: Offset within the GPBR block.
description:
Should encode the GPBR register used to store the time base when the
RTT is used as an RTC. The first cell should point to the GPBR node
and the second one encodes the offset within the GPBR block (or in
other words, the GPBR register used to store the time base).

required:
- compatible
- reg
- interrupts
- clocks
- atmel,rtt-rtc-time-reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
rtc@fffffd20 {
compatible = "atmel,at91sam9260-rtt";
reg = <0xfffffd20 0x10>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&clk32k>;
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
};
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14622,6 +14622,12 @@ L: op-tee@lists.trustedfirmware.org
S: Maintained
F: drivers/char/hw_random/optee-rng.c

OP-TEE RTC DRIVER
M: Clément Léger <clement.leger@bootlin.com>
L: linux-rtc@vger.kernel.org
S: Maintained
F: drivers/rtc/rtc-optee.c

OPA-VNIC DRIVER
M: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
M: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Expand Down
5 changes: 5 additions & 0 deletions drivers/clk/sunxi-ng/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ config SUN6I_A31_CCU
default MACH_SUN6I
depends on MACH_SUN6I || COMPILE_TEST

config SUN6I_RTC_CCU
tristate "Support for the Allwinner H616/R329 RTC CCU"
default ARCH_SUNXI
depends on ARCH_SUNXI || COMPILE_TEST

config SUN8I_A23_CCU
tristate "Support for the Allwinner A23 CCU"
default MACH_SUN8I
Expand Down
2 changes: 2 additions & 0 deletions drivers/clk/sunxi-ng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ obj-$(CONFIG_SUN50I_H616_CCU) += sun50i-h616-ccu.o
obj-$(CONFIG_SUN4I_A10_CCU) += sun4i-a10-ccu.o
obj-$(CONFIG_SUN5I_CCU) += sun5i-ccu.o
obj-$(CONFIG_SUN6I_A31_CCU) += sun6i-a31-ccu.o
obj-$(CONFIG_SUN6I_RTC_CCU) += sun6i-rtc-ccu.o
obj-$(CONFIG_SUN8I_A23_CCU) += sun8i-a23-ccu.o
obj-$(CONFIG_SUN8I_A33_CCU) += sun8i-a33-ccu.o
obj-$(CONFIG_SUN8I_A83T_CCU) += sun8i-a83t-ccu.o
Expand All @@ -60,6 +61,7 @@ sun50i-h616-ccu-y += ccu-sun50i-h616.o
sun4i-a10-ccu-y += ccu-sun4i-a10.o
sun5i-ccu-y += ccu-sun5i.o
sun6i-a31-ccu-y += ccu-sun6i-a31.o
sun6i-rtc-ccu-y += ccu-sun6i-rtc.o
sun8i-a23-ccu-y += ccu-sun8i-a23.o
sun8i-a33-ccu-y += ccu-sun8i-a33.o
sun8i-a83t-ccu-y += ccu-sun8i-a83t.o
Expand Down
Loading

0 comments on commit 6a34fdc

Please sign in to comment.