On Fri, Feb 5, 2021 at 4:39 AM Johan Ingvast <ingv...@gmail.com> wrote: > > Hi > > I have a RTC rv3028 on my system. It sits on i2c-2 at address 0x52. > I want it to update the system time with a correct time at each start of > system regardless contact to internet time or not. I have no need of the > alarm functions. > > RV3028 is really low power and claim to be accurate. > > I have checked it working using i2cset and i2cget. > > Now I want to have the system use it instead of the one not backed up battery. > > I found out that the most important registers of rv3028 are at the same place > as for the ds3231 that the kernel supports. This made me try > > $ echo ds3231 0x52 > /sys/class/i2c-dev/i2c-2/device/new_device > > and what I hoped happened. The /dev/rtc1 was created and responded with the > set time from > $ hwclock -r -f /dev/rtc1 > > But I still have some steps to take to make everything work. The system > should use the clock as /dev/rtc and use it at startup, correct the time and > so forth. > > I thought of using overlays, there is an overlay for ds3031 which codes for > another i2c address. > > Is it possible/enough to change bus and address of an existing ds3031 overlay > like > https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-I2C2-RTC-DS3231.dts > to make it work for the rv3028?
Correct, just update these 3 lines and it should just work.. https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-I2C2-RTC-DS3231.dts#L81-L84 The rest is more informal that get's reported to userspace for your sanity to see if it loaded.. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjuQi6iMSgydUh-R5bS0W5Z-cFTVFqC%2Bib%3DK1qhEkYGJQ%40mail.gmail.com.