SM8750: persist RTC offset in SDAM#3033
Open
andrebraga wants to merge 1 commit into
Open
Conversation
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 16, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 16, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andrebraga
force-pushed
the
pr/sm8750-rtc-persist-offset
branch
2 times, most recently
from
July 17, 2026 10:58
4654181 to
db114b1
Compare
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andrebraga
force-pushed
the
pr/sm8750-rtc-persist-offset
branch
3 times, most recently
from
July 17, 2026 17:27
36422ee to
4174b24
Compare
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aanze
added a commit
to aanze/distribution
that referenced
this pull request
Jul 17, 2026
Upstream PR ROCKNIX#3033 persists the RTC wall-clock offset in pmk8550 SDAM_2 at 0x70-0x73; our panic breadcrumb spanned 0x50..0xb7 and would corrupt the persisted clock whenever it fires. 32 bytes still fits the hung device name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Bit of a rabbit hole with considerable carry, I'm prototyping another approach but this is honestly KISS and good enough. |
andrebraga
force-pushed
the
pr/sm8750-rtc-persist-offset
branch
from
July 19, 2026 18:25
b0a82a4 to
69d81b3
Compare
RTC regs are TZ-locked; rtc-pm8xxx stores wall-clock as an offset. Android maintains that offset in userspace (time_daemon, persisted to /persist), which ROCKNIX does not inherit, so the clock resets to epoch every boot. Back it with an nvmem cell in the always-on PMK8550 SDAM. 0x72 is a free slot just below the ADSP-owned alarm-log at 0x76-0x7b, verified on Odin 3 to survive cold power-off.
andrebraga
force-pushed
the
pr/sm8750-rtc-persist-offset
branch
from
July 19, 2026 18:51
69d81b3 to
2604fc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pmk8550 RTC is a monotonic counter; rtc-pm8xxx stores wall-clock as an offset to it. Android maintains that offset in userspace with time_daemon and a record under /persist.
Mainline driver for pmk8550 supports either UEFI backing (with uefivars) or SDAM nonvolatile memory. 0x72(4 bytes) is a free slot in the scratch window (0x40-0x7f), sitting right below the 6 byte span that the mainline DTSI points out belongs to alarm-log (ADSP). Scrubbed all Android DT's for occupancy of other offsets&ranges and other than the aforementioned comment, only PON turned up.
This is the direction mainline is taking, and Qualcomm reps are visibly involved; see thread in https://lkml.org/lkml/2025/2/19/956
Testing
Verified on Odin 3 to survive cold power-off
AI Usage
While ROCKNIX doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? PARTIALLY