Hi Niresh,
On 01.09.20 07:43, Niresh wrote:
I've tested BB-I2C2-RTC-DS3231.dtbo in the new image 4.19.94-ti-r42,
they mount rtc1 in /dev but system time is not updated with rtc1.
Attached dmesg with and without DS3231 overlay in uEnv.txt .
Following message with DS3231 overlay enabled.
root@beaglebone:/dev# hwclock -r -f /dev/rtc1
2000-01-01 00:49:21.771707+00:00
That's OK. The device tree swaps rtc0 and rtc1. Now your DS3231 is
/dev/rtc0 - which is what you need.
The AM335x-s RTC is /dev/rtc1 - it goes back to year 2000 on every boot.
You don't need it.
root@beaglebone:/dev# timedatectl
Local time: Tue 2020-09-01 04:34:29 UTC
Universal time: Tue 2020-09-01 04:34:29 UTC
RTC time: Tue 2020-09-01 04:34:29
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Seems to be correct. "RTC time" is your DS3231.
debian@beaglebone:/dev$ dmesg | grep rtc
[ 1.280996] rtc-ds1307 2-0068: registered as rtc0
[ 1.283636] omap_rtc 44e3e000.rtc: already running
[ 1.284312] omap_rtc 44e3e000.rtc: registered as rtc1
[ 1.574739] [drm] Cannot find any crtc or sizes
[ 1.604280] rtc-ds1307 2-0068: setting system clock to 2020-09-01
04:30:36 UTC (1598934636)
That's your DS3231 being assigned /dev/rtc0 by the kernel and the system
time correctly set from it. Looks good.
The last step is to enable NTP synchronization:
$ sudo timedatectl set-ntp true
Then you're done. When network comes online, systemd-timesyncd will
synchronize both your DS3231 and the system time from NTP. Feel free to
fine-tune ("man timedatectl" and man "timesyncd.conf").
--
Kind regards,
Tarmo
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/a8f8f997-41a5-8032-4c21-e8cc425b49ae%40gmail.com.