]> git.ipfire.org Git - thirdparty/linux.git/commit
rtc: Add new rtc-macsmc driver for Apple Silicon Macs
authorHector Martin <marcan@marcan.st>
Wed, 12 Nov 2025 11:16:49 +0000 (21:16 +1000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 8 Dec 2025 21:41:59 +0000 (22:41 +0100)
commit49a51df427dbb5bab9b3341a3a59c248bab79d50
tree76405dfd871186499703f7252305e86720cf1384
parent07049187e83072e187d7a9f3386286e59c83e8ee
rtc: Add new rtc-macsmc driver for Apple Silicon Macs

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.
On T600x machines, the RTC counter must be accessed via the SMC to
get full functionality, and it seems likely that future machines
will move towards making SMC handle all RTC functionality.

The SMC RTC counter access is implemented on all current machines
as of the time of this writing, on firmware 12.x. However, the RTC
offset (needed to set the time) is still only accessible via direct
PMU access. To handle this, we expose the RTC offset as an NVMEM
cell from the SPMI PMU device node, and this driver consumes that
cell and uses it to compute/set the current time.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Sven Peter <sven@kernel.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20251112-macsmc-subdevs-v5-3-728e4b91fe81@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
MAINTAINERS
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/rtc/rtc-macsmc.c [new file with mode: 0644]