Page 1 of 1

Install RTC in RevPi Buster Lite (08/2022) (ID: 6226)

Posted: 13 Jan 2023, 12:42
by RomainB
Hello,

I downloaded the image RevPi Buster Lite (08/2022) (ID: 6226) and installed it on my Revpi. But It is impossible to detect the RTC with i2c-tools:

Code: Select all

pi@Revpi:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I followed this tutorial: https://afterthoughtsoftware.com/products/rasclock
And this thread: https://revolutionpi.com/forum/viewtopic.php?t=133

The RTC should be working because I had result before flashing the RevPi with the new image.

Do you know how to configure the RevPi in order to use the RTC ?

Re: Install RTC in RevPi Buster Lite (08/2022) (ID: 6226)

Posted: 13 Jan 2023, 15:37
by nicolaiB
Hi Romain,

the RTC is configured in our device tree. You can check if the kernel module is running like this:

pi@RevPi6351:~ $ lsmod |grep rtc
rtc_pcf2127 20480 0
regmap_spi 16384 1 rtc_pcf2127

P. S. From your hostname it looks like your device is missing the factory reset (during factory reset the hostname is set to something like RevPi12345). Without the factory reset the dt overlays are not configured and therefore the rtc will not be present.

Nicolai

Re: Install RTC in RevPi Buster Lite (08/2022) (ID: 6226)

Posted: 16 Jan 2023, 11:55
by RomainB
Hello Nicolai,

Thanks for your reply it was really helpful.

I did the factory reset and now it is working. But now i would like to implement the RTC in a custom Buster image (and not the Revpi Buster).

Is it possible to copy the device tree file for the rtc and use it in another image ? Because the dt overlay you are using may contain specification that we don't want to use.

PS : With RevPi Buster (08/2022) (ID: 6224) the command

Code: Select all

lsmod|grep rtc
return anything.

Thank you

Romain

Re: Install RTC in RevPi Buster Lite (08/2022) (ID: 6226)

Posted: 16 Jan 2023, 17:18
by nicolaiB
Yes, this is possible. You will find the dt overlays sources in our kernel repo und github. Just take the parts you need and compile your own overlay.

Nicolai