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.
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.
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.