Real Time Clock Le Potato

I cant find anything on the clock. Does it have a RTC
fake hwclock service is running so I assume it doesn’t.

SO the question is how to add one. Can you use the instructions here.

They say
Select your modprobe i2c-bmc2708 command based on your Raspberry Pi model.
So what would you use?

There’s no RTC on this board. You have to use an external one (usually I2C) and use an device tree overlay to map it to a driver. There’s two RTC overlays aleady available in the libretech-wiring-tool’s ldto command.

Is there a guide on how to set this up for a RTC.

DS3231 is an I2C based RTC. You can run sudo ldto enable i2c-ao and then sudo ldto enable i2c-ao-ds3231. This will create the device for you to play with and test if the hardware is properly hooked up to the i2c-ao pins.

After testing, merge the overlays using sudo ldto merge command to make it apply on boot.

Ok I have it working. But just so everyone will know. It worked a while then stopped as I was working on it. I found out it unmerged itself.
So the overlays can unmerge themselves if you boot without the RTC swapping cards or something? Requiring you to merge them again. Might be better to use a start up script to enable on every boot and not use merge at all. I know its still beta.

Once merged, it will only be removed if you run reset.

I am trying to add an RTC (DS3231) to the V2 (sweet potato) board. Apparently there is a virtual rtc on the board already?

This messes up the time as the kernel (6.1.57-10561-gaef8ffb7d4b4) uses rtc0 to set the time. How can I get the kernel to use the rtc that I added?

dmesg | grep rtc reports:

[    3.911100] meson-vrtc c81000a8.rtc: registered as rtc0
[    3.911139] meson-vrtc c81000a8.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3)
[    3.940756] rtc-ds1307 0-0068: registered as rtc1

In the environment that it will be used it is very important to have an RTC.
Thank you in advance for your help.

You can blacklist the meson-vrtc module or create an overlay that targets &vtrc and set the status field to disabled and merge it.

https://boot.libre.computer/ci/aml-s905x-cc-v2.dts

Thank you for the quick reply. Can you explain how to blacklist the module? This is new territory for me.

Please use Google for basic questions such as this.