From: Val Packett <val@packett.cool>
To: Emfox Zhou <emfox@debian.org>,
Maximilian Luz <luzmaximilian@gmail.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: "Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rtc@vger.kernel.org
Subject: Re: [PATCH 4/5] rtc: Add basic support for RTC via Surface System Aggregator Module
Date: Tue, 24 Nov 2026 15:30:04 -0300 [thread overview]
Message-ID: <87735cc2-3759-4b7b-a16d-8aa4911ea7fb@packett.cool> (raw)
In-Reply-To: <1795439501.1366.emfox@debian.org>
On 11/23/26 10:11 AM, Emfox Zhou wrote:
> 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.
Didn't think anyone else would be interested though :) as the SPX is the
only machine with *no other working RTC at all*.
> 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.
Well, I don't have all these machines to test on, so I wasn't very
confident about adding it to other groups. I could do it though, sure.
> 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.
Ack
> Tested-by: Emfox Zhou <emfox@debian.org> # 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: [..]
Sure, I'll change the names!
Thanks,
~val
next prev parent reply other threads:[~2026-11-24 18:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 7:04 [PATCH 0/5] Add support for the Microsoft Surface Pro X Val Packett
2026-11-04 7:04 ` [PATCH 1/5] dt-bindings: arm: qcom: Document " Val Packett
2026-11-15 3:25 ` Haipeng Lin
2026-11-04 7:04 ` [PATCH 2/5] arm64: dts: qcom: sc8180x: Add " Val Packett
2026-11-04 8:36 ` Konrad Dybcio
2026-11-04 9:05 ` Val Packett
2026-11-15 3:16 ` Haipeng Lin
2026-11-15 8:20 ` Val Packett
2026-11-15 16:28 ` Haipeng Lin
2026-11-04 7:04 ` [PATCH 3/5] firmware: qcom: scm: Allow QSEECOM on the " Val Packett
2026-11-04 7:04 ` [PATCH 4/5] rtc: Add basic support for RTC via Surface System Aggregator Module Val Packett
2026-11-04 18:44 ` Alexandre Belloni
2026-11-23 13:11 ` Emfox Zhou
2026-11-24 18:30 ` Val Packett [this message]
2026-11-04 7:04 ` [PATCH 5/5] platform/surface: aggregator_registry: Add support for Surface Pro X Val Packett
2026-11-15 2:53 ` [PATCH 0/5] Add support for the Microsoft " Haipeng Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87735cc2-3759-4b7b-a16d-8aa4911ea7fb@packett.cool \
--to=val@packett.cool \
--cc=alexandre.belloni@bootlin.com \
--cc=andersson@kernel.org \
--cc=emfox@debian.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®