AGX Orin: RTC always auto reset every time in reboot

The problem as logs follow.
The Orin develop kit will reset the rtc after reboot.
I am sure, I have inset a RTC battery, which voltage is 3.0 V.

nvidia@orin:~$ cat /etc/nv_tegra_release

R35 (release), REVISION: 1.0, GCID: 31346300, BOARD: t186ref, EABI: aarch64, DATE: Thu Aug 25 18:41:45 UTC 2022

nvidia@orin:~$ sudo dmesg | grep DTB
[sudo] password for nvidia:
[ 0.003912] DTB Build time: Aug 10 2022 20:31:40
nvidia@orin:~$ sudo dmesg | grep DTS
[ 0.003900] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-5.10/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dts
nvidia@orin:~$ uname -a
Linux orin 5.10.104-tegra #1 SMP PREEMPT Wed Aug 10 20:17:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux
nvidia@orin:~$ date
Thu 21 Apr 2022 08:58:36 AM EDT
nvidia@orin:~$ date -s “2022-09-19 17:23:00”
date: cannot set date: Operation not permitted
Mon 19 Sep 2022 05:23:00 PM EDT
nvidia@orin:~$ sudo date -s “2022-09-19 17:23:00”
Mon 19 Sep 2022 05:23:00 PM EDT
nvidia@orin:~$ sudo hwclock -w -f /dev/rtc1
[sudo] password for nvidia:
nvidia@orin:~$ sudo hwclock -r -f /dev/rtc1
2022-09-19 17:23:59.442610-04:00
nvidia@orin:~$ sudo hwclock
hwclock: select() to /dev/rtc0 to wait for clock tick timed out
nvidia@orin:~$ timedatectl **
** Local time: Mon 2022-09-19 17:25:10 EDT **
** Universal time: Mon 2022-09-19 21:25:10 UTC **
** RTC time: Mon 2022-09-19 21:25:10 **
** Time zone: America/New_York (EDT, -0400)

System clock synchronized: no **
** NTP service: inactive **
** RTC in local TZ: no

nvidia@orin:~$ sudo reboot

After reboot. … the RTC time was reset to “Thu 1970-01-01 00:02:04”
How can I fixed it? The develop kit can’t always connet to network.
nvidia@orin:~$ date
Thu 21 Apr 2022 08:55:58 AM EDT
nvidia@orin:~$ timedatectl
** Local time: Thu 2022-04-21 08:56:05 EDT **
** Universal time: Thu 2022-04-21 12:56:05 UTC **
** RTC time: Thu 1970-01-01 00:02:04 **
** Time zone: America/New_York (EDT, -0400)**
System clock synchronized: no **
** NTP service: inactive **
** RTC in local TZ: no

I have the same problem.
Orin 19V power plug in but shutdown,the 3V3_AO power supply is always on. The RTC is still powered whether the battery is connected or not. However, after restarting, the RTC time is reset to 1970-01-01.

I guest, maybe somthing wrong in bootloader. Cause rtc lose its power for serval seconds.

It is a duplicated issue. Please refer to these two posts first.

Following the above configuration, the result seems unuseful.
there is no RTC time



Please share me the result of your

ls -al /dev/rtc*


following the two tops. I get the correct RTC time. Howerver, When I run the command “hwclock -s” , it returns “hwclock: select() to /dev/rtc0 to wait for clock tick timed out”. It seems, can’t set the system datetime from RTC device.

Same issue here, with Xavier NX. (on both 5.0.1 and 5.0.2)
I also noticed that if I prevent the ubuntu to run. meaning, stop the boot and run shell from the bios. then using date and time commands, the hardware time is correct. the ant RTC runs correctly even if the board been powered off.


There are multiple issues and each person’s case is different.

For @972865123 ,
如果你的機器開機之後沒有rtc0, 只有rtc1 代表你的module是舊款的, 那一款沒有pmic RTC所以你要的功能不支援
if your device only has rtc1 after boot up, it means your module is old kind. That one does not have pmic RTC support. So your request in this topic is not supported.

For @shantian.huang ,

Please apply patch.

diff -ur kernel-source.orig/kernel/nvidia/drivers/rtc/nvvrs-pseq-rtc.c kernel-source/kernel/nvidia/drivers/rtc/nvvrs-pseq-rtc.c
--- kernel-source.orig/kernel/nvidia/drivers/rtc/nvvrs-pseq-rtc.c    2022-08-11 11:15:42.000000000 +0800
+++ kernel-source/kernel/nvidia/drivers/rtc/nvvrs-pseq-rtc.c    2022-08-12 16:57:18.426126545 +0800
@@ -194,6 +194,8 @@
     if (ret < 0)
         dev_err(info->dev, "Failed to disable alarm: ret %d\n", ret);
+    rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_UF);
     return IRQ_HANDLED;
1 Like

Old iron, six six six. It works! Thanks very much.

1 Like