Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Documentation/devicetree/bindings/rtc/apple,abbey-pmu-rtc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/apple,abbey-pmu-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple Abbey SPMI PMU real-time clock

maintainers:
- Dj <hey@djdev.me>

description: |
The Abbey PMU exposes a 48-bit 65536 Hz counter and a signed 48-bit
wall-clock offset in units of 1/32768 second. Its alarm comparator uses
32-bit counter seconds. NVMEM cells use little-endian byte order.
The one-byte alarm control has event bit 1, monitor bit 0 and enable
bit 6. The one-byte interrupt mask has the alarm mask in bit 0.
This layout is distinct from the Baku PMU RTC.

allOf:
- $ref: rtc.yaml#

properties:
compatible:
const: apple,abbey-pmu-rtc

interrupts:
maxItems: 1
description: Alarm event interrupt from the SPMI controller

nvmem-cells:
minItems: 5
maxItems: 5
description: Counter (6), offset (6), alarm (4), control (1), mask (1) bytes

nvmem-cell-names:
items:
- const: counter
- const: rtc_offset
- const: alarm
- const: alarm_ctrl
- const: irq_mask

wakeup-source: true

required:
- compatible
- nvmem-cells
- nvmem-cell-names

unevaluatedProperties: false
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4359,6 +4359,13 @@ F: rust/helpers/auxiliary.c
F: rust/kernel/auxiliary.rs
F: samples/rust/rust_driver_auxiliary.rs

AURORA APPLE SPMI PMU RTC
M: Dj <hey@djdev.me>
L: linux-rtc@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/rtc/apple,abbey-pmu-rtc.yaml
F: drivers/rtc/rtc-apple-spmi-pmu.c

AURORA PLATFORM MMIO INTERFACE
M: Dj <hey@djdev.me>
S: Maintained
Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/configs/aurora-apif.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ CONFIG_PCIE_APPLE_APIF=y
CONFIG_PM=y
CONFIG_RUST=y
CONFIG_APPLE_PMP=y
CONFIG_SPMI=y
CONFIG_SPMI_APPLE=y
CONFIG_NVMEM=y
CONFIG_NVMEM_APPLE_SPMI=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_APPLE_SPMI_PMU=y
9 changes: 9 additions & 0 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2111,6 +2111,15 @@ config RTC_DRV_APPLE_PMU

This driver can be built as the module rtc-apple-pmu.

config RTC_DRV_APPLE_SPMI_PMU
tristate "Apple Abbey SPMI PMU RTC"
depends on ARCH_APPLE || COMPILE_TEST
depends on NVMEM && OF
help
Access the Abbey PMU counter, signed wall-clock offset and wake alarm
through named NVMEM cells. This uses a different register layout from
the J700 Baku PMU RTC.

config RTC_DRV_MACSMC
tristate "Apple Mac System Management Controller RTC"
depends on MFD_MACSMC
Expand Down
2 changes: 2 additions & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,5 @@ obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o
obj-$(CONFIG_RTC_DRV_XGENE) += rtc-xgene.o
obj-$(CONFIG_RTC_DRV_ZYNQMP) += rtc-zynqmp.o

obj-$(CONFIG_RTC_DRV_APPLE_SPMI_PMU) += rtc-apple-spmi-pmu.o
Loading