Using external RTC on imx8 with Ixora carrier board

Hi,
we are using an imx8 with an Ixora rev 1.2 carrier board.
We try to use the external RTC of the carrier board to not lose date and time when the board is powered off.
I put a CR1220 battery in the battery slot of the RTC but it is not recognized by the imx8.

I found this page how to use the RTC on the imx8 board.

Using dmesg I get the following output:

n11-em11:~$ dmesg | grep rtc

[    1.160618] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[    1.161183] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[    1.161564] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[    1.161935] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[    2.695359] [drm] Cannot find any crtc or sizes
[    2.862350] imx_sc_rtc rtc: rtc core: registered rtc as rtc0
[    3.712565] [drm] Cannot find any crtc or sizes
[    3.834169] imx_sc_rtc rtc: setting system clock to 1970-01-01 00:00:07 UTC (7)

So it looks like the external RTC is not found by the device.

Did i miss something?
In the datasheet of the ixora boad is written, that the RTC is accessed via I2C. Do we have to write our own driver to use it?
Or is this issue fixed in a newer torizon version? (Mine is TorizonCore 4.0.0-devel-202007+build.17 (zeus))

Thanks for your help,
Thorbjörn

Greetings @ThoMumme,

This issue seems to be fixed in the latest Torizon. Here’s the output on my i.MX8 running Torizon 5.1:

apalis-imx8-06738453:~$ dmesg | grep rtc
[    2.097956] imx-sc-rtc scu:rtc: registered as rtc1
[    2.349771] rtc-ds1307 4-0068: oscillator failed, set time!
[    2.349937] rtc-ds1307 4-0068: registered as rtc0
[    2.677500] rtc-ds1307 4-0068: hctosys: unable to read the hardware clock
[    6.952301] imx-drm display-subsystem: bound imx-dpu-crtc.0 (ops dpu_crtc_ops)
[    6.952459] imx-drm display-subsystem: bound imx-dpu-crtc.1 (ops dpu_crtc_ops)
[    6.952618] imx-drm display-subsystem: bound imx-dpu-crtc.3 (ops dpu_crtc_ops)
[    6.952783] imx-drm display-subsystem: bound imx-dpu-crtc.4 (ops dpu_crtc_ops)
[    7.050433] [drm] Cannot find any crtc or sizes

On this version both the internal and external RTC seem to be recognized by the kernel. Therefore I’d suggest updating Torizon versions if possible. Otherwise please let us know if you find further issues with using RTC.

Best Regards,
Jeremias

Thanks for your response Jeremias.
Indeed, with the latest version of Torizon both RTCs are recognized.

Good to know. Thanks for the support, @jeremias.tx.