Commit 98906f9d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull RTC updates from Alexandre Belloni:
 "This cycle, we have a new RTC driver, for the SpacemiT P1. The optee
  driver gets alarm support. We also get a fix for a race condition that
  was fairly rare unless while stress testing the alarms.

  Subsystem:
   - Fix race when setting alarm
   - Ensure alarm irq is enabled when UIE is enabled
   - remove unneeded 'fast_io' parameter in regmap_config

  New driver:
   - SpacemiT P1 RTC

  Drivers:
   - efi: Remove wakeup functionality
   - optee: add alarms support
   - s3c: Drop support for S3C2410
   - zynqmp: Restore alarm functionality after kexec transition"

* tag 'rtc-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (29 commits)
  rtc: interface: Ensure alarm irq is enabled when UIE is enabled
  rtc: tps6586x: Fix initial enable_irq/disable_irq balance
  rtc: cpcap: Fix initial enable_irq/disable_irq balance
  rtc: isl12022: Fix initial enable_irq/disable_irq balance
  rtc: interface: Fix long-standing race when setting alarm
  rtc: pcf2127: fix watchdog interrupt mask on pcf2131
  rtc: zynqmp: Restore alarm functionality after kexec transition
  rtc: amlogic-a4: Optimize global variables
  rtc: sd2405al: Add I2C address.
  rtc: Kconfig: move symbols to proper section
  rtc: optee: make optee_rtc_pm_ops static
  rtc: optee: Fix error code in optee_rtc_read_alarm()
  rtc: optee: fix error code in probe()
  dt-bindings: rtc: Convert apm,xgene-rtc to DT schema
  rtc: spacemit: support the SpacemiT P1 RTC
  rtc: optee: add alarm related rtc ops to optee rtc driver
  rtc: optee: remove unnecessary memory operations
  rtc: optee: fix memory leak on driver removal
  rtc: x1205: Fix Xicor X1205 vendor prefix
  dt-bindings: rtc: Fix Xicor X1205 vendor prefix
  ...
parents 2a6edd86 9db26d58
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/apm,xgene-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: APM X-Gene Real Time Clock

maintainers:
  - Khuong Dinh <khuong@os.amperecomputing.com>

properties:
  compatible:
    const: apm,xgene-rtc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  '#clock-cells':
    const: 1

  clocks:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts
  - '#clock-cells'
  - clocks

additionalProperties: false

examples:
  - |
    rtc@10510000 {
        compatible = "apm,xgene-rtc";
        reg = <0x10510000 0x400>;
        interrupts = <0x0 0x46 0x4>;
        #clock-cells = <1>;
        clocks = <&rtcclk 0>;
    };
+0 −74
Original line number Diff line number Diff line
Intersil ISL12057 I2C RTC/Alarm chip

ISL12057 is a trivial I2C device (it has simple device tree bindings,
consisting of a compatible field, an address and possibly an interrupt
line).

Nonetheless, it also supports an option boolean property
("wakeup-source") to handle the specific use-case found
on at least three in-tree users of the chip (NETGEAR ReadyNAS 102, 104
and 2120 ARM-based NAS); On those devices, the IRQ#2 pin of the chip
(associated with the alarm supported by the driver) is not connected
to the SoC but to a PMIC. It allows the device to be powered up when
RTC alarm rings. In order to mark the device has a wakeup source and
get access to the 'wakealarm' sysfs entry, this specific property can
be set when the IRQ#2 pin of the chip is not connected to the SoC but
can wake up the device.

Required properties supported by the device:

 - "compatible": must be "isil,isl12057"
 - "reg": I2C bus address of the device

Optional properties:

 - "wakeup-source": mark the chip as a wakeup source, independently of
    the availability of an IRQ line connected to the SoC.


Example isl12057 node without IRQ#2 pin connected (no alarm support):

	isl12057: isl12057@68 {
		compatible = "isil,isl12057";
		reg = <0x68>;
	};


Example isl12057 node with IRQ#2 pin connected to main SoC via MPP6 (note
that the pinctrl-related properties below are given for completeness and
may not be required or may be different depending on your system or
SoC, and the main function of the MPP used as IRQ line, i.e.
"interrupt-parent" and "interrupts" are usually sufficient):

		    pinctrl {
				...

				rtc_alarm_pin: rtc_alarm_pin {
					marvell,pins = "mpp6";
					marvell,function = "gpio";
				};

				...

		    };

	...

	isl12057: isl12057@68 {
		compatible = "isil,isl12057";
		reg = <0x68>;
		pinctrl-0 = <&rtc_alarm_pin>;
		pinctrl-names = "default";
		interrupt-parent = <&gpio0>;
		interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
	};


Example isl12057 node without IRQ#2 pin connected to the SoC but to a
PMIC, allowing the device to be started based on configured alarm:

	isl12057: isl12057@68 {
		compatible = "isil,isl12057";
		reg = <0x68>;
		wakeup-source;
	};
+0 −10
Original line number Diff line number Diff line
@@ -62,16 +62,6 @@ allOf:
    then:
      properties:
        quartz-load-femtofarads: false
  - if:
      properties:
        compatible:
          contains:
            enum:
              - nxp,pcf85063
    then:
      properties:
        quartz-load-femtofarads:
          const: 7000
  - if:
      properties:
        compatible:
+3 −37
Original line number Diff line number Diff line
@@ -13,9 +13,6 @@ properties:
  compatible:
    oneOf:
      - enum:
          - samsung,s3c2410-rtc
          - samsung,s3c2416-rtc
          - samsung,s3c2443-rtc
          - samsung,s3c6410-rtc
      - items:
          - enum:
@@ -29,19 +26,12 @@ properties:
    maxItems: 1

  clocks:
    description:
      Must contain a list of phandle and clock specifier for the rtc
      clock and in the case of a s3c6410 compatible controller, also
      a source clock.
    minItems: 1
    maxItems: 2

  clock-names:
    description:
      Must contain "rtc" and for a s3c6410 compatible controller
      also "rtc_src".
    minItems: 1
    maxItems: 2
    items:
      - const: rtc
      - const: rtc_src

  interrupts:
    description:
@@ -54,30 +44,6 @@ properties:

allOf:
  - $ref: rtc.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,s3c6410-rtc
              - samsung,exynos3250-rtc
    then:
      properties:
        clocks:
          minItems: 2
          maxItems: 2
        clock-names:
          items:
            - const: rtc
            - const: rtc_src
    else:
      properties:
        clocks:
          minItems: 1
          maxItems: 1
        clock-names:
          items:
            - const: rtc

unevaluatedProperties: false

+4 −2
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ properties:
      - dallas,ds1672
      # Extremely Accurate I²C RTC with Integrated Crystal and SRAM
      - dallas,ds3232
      # Dallas m41t00 Real-time Clock
      - dallas,m41t00
      # SD2405AL Real-Time Clock
      - dfrobot,sd2405al
      # EM Microelectronic EM3027 RTC
@@ -83,8 +85,8 @@ properties:
      - via,vt8500-rtc
      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
      - whwave,sd3078
      # Xircom X1205 I2C RTC
      - xircom,x1205
      # Xicor/Intersil X1205 I2C RTC
      - xicor,x1205

  reg:
    maxItems: 1
Loading