External RTC IMX8X colibiri evaluation board

In the schematics of colibiri evaluation board you are mentioning that ic is M41T0 . please find image.

But as per colibiri board logs :

dmesg | grep rtc
[ 1.795596] imx-sc-rtc scu:rtc: registered as rtc1
[ 1.980013] rtc-ds1307 16-0068: registered as rtc0
[ 1.994495] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[ 1.995069] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[ 2.082912] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[ 2.083200] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[ 2.145493] rtc-ds1307 16-0068: setting system clock to 2024-01-30T01:29:01 UTC (1706578141)

i’m getting that external RTC is DS-1307.

So please clarify above RTC DS-1307 vs M41T0 confusion.

Hi @NirajS,

Thanks for writing to Toradex community

Regarding your query, it is due to the fact that both rtc uses same driver. Please check below device tree document
https://www.kernel.org/doc/Documentation/devicetree/bindings/rtc/rtc-ds1307.txt

I hope this clears your doubt. Please feel free to write us back if you have any queries.
Best Regards
Ritesh Kumar

How to make external RTC as default RTC ?
should we use ATTR{name} == “m41t0” or “ds1307” ?

To change the default RTC as e.g. used by hwclock create a file called /etc/udev/rules.d/99-rtc1.rules with e.g. the following contents:
KERNEL==“rtc1”, SUBSYSTEM==“rtc”, DRIVER==“”, ATTR{name}==“m41t0”, SYMLINK=“rtc”, MODE=“0666”

Hi @NirajS,

Please check similar post

Best Regards
Ritesh Kumar