Re: [PATCH 4/5] rtc: Add basic support for RTC via Surface System Aggregator Module

From: Emfox Zhou

Date: Mon Nov 23 2026 - 08:12:29 EST


Hi Val,

Tested on a Surface Pro 8 (x86, Tiger Lake): this is not SPX/ARM-only, the
same SAM RTC sits behind the aggregator there. Two things came out of it.

First, as posted the driver cannot bind on the x86 machines: 5/5 adds
ssam_node_rtc only to ssam_node_group_spx[], while the x86 devices come
from the ACPI-matched groups. With one line in ssam_node_group_sp8[],

&ssam_node_rtc,

"ssam:01:01:01:00:00" appears and the driver registers rtc2:

surface_rtc 01:01:01:00:00: registered as rtc2

It would be good to have the node in the other x86 groups as well. Note
that the node name will collide with the SPX one, so whichever lands
first keeps it.

Second, set_time() needs a timezone compensation. The EC keeps UTC in the
SAM timestamp (CID 0x10), but also exposes _GRT (CID 0x1f), the same clock
plus the zone stored in the EC, and the firmware copies _GRT into rtc_cmos
at POST. Right after a cold boot here:

rtc0 read at boot 1795199717
true UTC at boot 1795170940
EC _GRT at boot 1795199714 (zone +28800)

so CMOS came from _GRT, 8 h ahead of UTC. The write side shows the same:
after "hwclock -w -f /dev/rtc2" the SAM timestamp equals system UTC and
_GRT is then UTC + zone, so the next cold boot is off by the zone again.
Either write (UTC - zone), taking the zone from _GRT minus the timestamp,
or state that this RTC is local time and leave the conversion to user
space.

Tested-by: Emfox Zhou <emfox@xxxxxxxxxx> # Surface Pro 8 (x86), with ssam_node_rtc added

Since the same RTC is on the x86 machines, the descriptions are no longer
accurate either: the commit message, the Kconfig help and the MAINTAINERS
entry all name the Pro X:

> + Say yes here if you want to support the RTC functionality of the
> + Surface Aggregator Module (embedded controller) found in the
> + Microsoft Surface Pro X tablet.

> +MICROSOFT SURFACE PRO X RTC DRIVER

Something like "found in Microsoft Surface devices with the Surface
Aggregator Module" for the Kconfig text, and "MICROSOFT SURFACE
AGGREGATOR RTC DRIVER" for the MAINTAINERS entry, would cover the ARM64
Pro X and the x86 machines both. The file header already says
"7th-generation Microsoft Surface devices", so this would make the three
consistent.

Thanks,
Emfox