From: Akashdeep Kaur <a-kaur@ti.com>
To: <praneeth@ti.com>, <nm@ti.com>, <vigneshr@ti.com>,
<alexandre.belloni@bootlin.com>, <linux-rtc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <sebin.francis@ti.com>
Cc: <s-tripathi1@ti.com>, <vishalm@ti.com>, <k-willis@ti.com>,
<a-kaur@ti.com>
Subject: [PATCH 2/2] rtc: ti-k3: Mark RTC time as invalid without battery backup
Date: Wed, 21 Oct 2026 09:54:35 +0530 [thread overview]
Message-ID: <20261021042435.3895543-3-a-kaur@ti.com> (raw)
In-Reply-To: <20261021042435.3895543-1-a-kaur@ti.com>
TI K3 RTC typically has no battery backup. Prevent HCTOSYS from
overwriting valid system time (established by bootloader or early
NTP sync) with invalid RTC value.
Signed-off-by: Akashdeep Kaur <a-kaur@ti.com>
---
drivers/rtc/rtc-ti-k3.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c
index 8df00319cb6b..99fdf1192675 100644
--- a/drivers/rtc/rtc-ti-k3.c
+++ b/drivers/rtc/rtc-ti-k3.c
@@ -613,6 +613,13 @@ static int ti_k3_rtc_probe(struct platform_device *pdev)
else
device_set_wakeup_capable(dev, true);
+ /*
+ * TI K3 RTC has no battery backup in typical configurations.
+ * Mark time as invalid to prevent hctosys from overwriting
+ * correct system time (from bootloader/NTP) with invalid RTC value.
+ */
+ priv->rtc_dev->time_is_valid = false;
+
ret = devm_rtc_register_device(priv->rtc_dev);
if (ret)
return ret;
--
2.34.1
next prev parent reply other threads:[~2026-10-21 4:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 4:24 [PATCH 0/2] rtc: Prevent hctosys from using invalid RTC time Akashdeep Kaur
2026-10-21 4:24 ` [PATCH 1/2] rtc: Add flag for dynamic hctosys control Akashdeep Kaur
2026-10-21 4:37 ` sashiko-bot
2026-10-21 5:25 ` Akashdeep Kaur
2026-10-21 4:24 ` Akashdeep Kaur [this message]
2026-10-21 4:37 ` [PATCH 2/2] rtc: ti-k3: Mark RTC time as invalid without battery backup sashiko-bot
2026-10-21 7:13 ` [PATCH 0/2] rtc: Prevent hctosys from using invalid RTC time Alexandre Belloni
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=20261021042435.3895543-3-a-kaur@ti.com \
--to=a-kaur@ti.com \
--cc=alexandre.belloni@bootlin.com \
--cc=k-willis@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=nm@ti.com \
--cc=praneeth@ti.com \
--cc=s-tripathi1@ti.com \
--cc=sebin.francis@ti.com \
--cc=vigneshr@ti.com \
--cc=vishalm@ti.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