EMB-237: build M41T80 RTC driver into kernel#219
Open
bajosoto wants to merge 1 commit intomaster/imx8from
Open
EMB-237: build M41T80 RTC driver into kernel#219bajosoto wants to merge 1 commit intomaster/imx8from
bajosoto wants to merge 1 commit intomaster/imx8from
Conversation
Set CONFIG_RTC_DRV_M41T80=y so the external RTC (rtc1) is available during early boot. When this driver is built as a module, rtc1 is registered later and the system clock is corrected mid-boot, causing a visible time jump. Building it in allows hctosys to use rtc1 earlier and avoids that jump.
bryanfoley
approved these changes
Feb 18, 2026
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.
Description
This PR fixes a bug where initially during boot, the timestamps in the log are incorrect and eventually change to the correct date, creating a chronological discrepancy and making Ruben and everyone else's life difficult when trying to read logs, especially via Grafana et.al.
The problem was that the external RTC (real time clock) M41T80 was being loaded as a module (rtc1), meaning that while booting, the RTC embedded on the SoC (rtc0) was being used until rtc1 was loaded. Since we don't have a proper shutdown routine where rtc0 is written or anything, that one always contains garbage dates.
When this driver is built as a module, rtc1 is registered later and the system clock is corrected mid-boot, causing a visible time jump. Building it in allows hctosys to use rtc1 earlier and avoids that jump.
The fix: Set CONFIG_RTC_DRV_M41T80=y so the external RTC (rtc1) is available during early boot.
How has this been tested
@bajosoto : On an S8, I first booted the printer with 11.2.0 and confirmed the time jump in the logs:
Note: It's easy to find the jump if you search for "
registered as rtc1"After installing the QA build, I verified that the time jump is gone and the correct time is displayed before rtc1 is registered:
QA build:
update-firmware 237.0.5-devReady for Review Checklist
To help with deciding if this PR is RFR, use this checklist.
The author confirms that:
#TODOcomments mention a Jira ticket number