Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: rtc: Add Apple SMC RTC

Apple Silicon Macs (M1, etc.) have an RTC that is part of the PMU IC,
but most of the PMU functionality is abstracted out by the SMC.
An additional RTC offset stored inside NVMEM is required to compute
the current date/time.

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sven Peter <sven@kernel.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewd-by: Mark Kettenis <kettenis@openbsd.org>
Link: https://patch.msgid.link/20251112-macsmc-subdevs-v5-1-728e4b91fe81@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Sven Peter and committed by
Alexandre Belloni
07049187 40d8123f

+45
+9
Documentation/devicetree/bindings/mfd/apple,smc.yaml
··· 46 46 reboot: 47 47 $ref: /schemas/power/reset/apple,smc-reboot.yaml 48 48 49 + rtc: 50 + $ref: /schemas/rtc/apple,smc-rtc.yaml 51 + 49 52 additionalProperties: false 50 53 51 54 required: ··· 83 80 nvmem-cell-names = "shutdown_flag", "boot_stage", 84 81 "boot_error_count", "panic_count"; 85 82 }; 83 + 84 + rtc { 85 + compatible = "apple,smc-rtc"; 86 + nvmem-cells = <&rtc_offset>; 87 + nvmem-cell-names = "rtc_offset"; 88 + }; 86 89 }; 87 90 };
+35
Documentation/devicetree/bindings/rtc/apple,smc-rtc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/rtc/apple,smc-rtc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Apple SMC RTC 8 + 9 + description: 10 + Apple Silicon Macs (M1, etc.) have an RTC that is part of the PMU IC, 11 + but most of the PMU functionality is abstracted out by the SMC. 12 + An additional RTC offset stored inside NVMEM is required to compute 13 + the current date/time. 14 + 15 + maintainers: 16 + - Sven Peter <sven@kernel.org> 17 + 18 + properties: 19 + compatible: 20 + const: apple,smc-rtc 21 + 22 + nvmem-cells: 23 + items: 24 + - description: 48bit RTC offset, specified in 32768 (2^15) Hz clock ticks 25 + 26 + nvmem-cell-names: 27 + items: 28 + - const: rtc_offset 29 + 30 + required: 31 + - compatible 32 + - nvmem-cells 33 + - nvmem-cell-names 34 + 35 + additionalProperties: false
+1
MAINTAINERS
··· 2435 2435 F: Documentation/devicetree/bindings/power/apple* 2436 2436 F: Documentation/devicetree/bindings/power/reset/apple,smc-reboot.yaml 2437 2437 F: Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml 2438 + F: Documentation/devicetree/bindings/rtc/apple,smc-rtc.yaml 2438 2439 F: Documentation/devicetree/bindings/spi/apple,spi.yaml 2439 2440 F: Documentation/devicetree/bindings/spmi/apple,spmi.yaml 2440 2441 F: Documentation/devicetree/bindings/watchdog/apple,wdt.yaml