I just trying to get to run hardkernel RTC module with odroid C4 and dietpi.
There are already some other threads here in forum which asks for support for other odroid versions without any solution.
Are there any news with working overlays to get this fxed?
My problem is not really the RTC module itself but the time which is missing sometimes when I boot on my read only system. Chromium boots to show home assistance panel which also shows google calendar and it is often the wrong date (date of storage freeze).
The work around I am aware of is to wait for NTP sync before starting chromium or even have a working hardware RTC module.
First of all I have tested rtc module with aardvark i2c usb adapter - it responds on address 0x51. So I assume, the module is working.
After I connected the module to odroid I just checked the supply voltage which shows 3.3V.
In dietpi I have done the following:
Created a file with nano /boot/dtb/amlogic/overlay/meson-i2c0.dts Note: i2c2 is the one to use for odroid C4 on pins 17 and 18.
Judging by the picture, this one uses the i2c bus wired to pin 3 and 5, not the ones you noted.
Does the RTC show up when you run meson-sm1-odroid-c4.dtb.txt (49.8 KB)
Remove the .txt extension as it needs to be attached in order to post it on this forum.
Swap it out for your existing one and disable any overlay additions you currently have applied.
It has anything necessary aplied staticly and is wired to control the i2c2 IP at pins 3 and 5 to drive a pcf8563.
The kernel has to have the pcf8563 driver build (CONFIG_RTC_DRV_PCF8563).
dmesg | grep rtc
[ 2.016454] meson-vrtc ff8000a8.rtc: registered as rtc0
[ 2.016489] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:02 UTC (2)
[ 2.016848] rtc-pcf8563 0-0051: /aliases ID 0 not available
[ 2.018160] rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
[ 2.037577] rtc-pcf8563 0-0051: registered as rtc1
Many thanks for your help!
What is the source code of the dtb and how did you create it?
I see the integrated RTC pushing itself forward as rtc0, so I have extended the overlay with an rtc1 alias, so that the battery-powered RTC is registered as rtc0 and the OS acquires a real time. See meson-sm1-odroid-c4.dtb.txt (49.9 KB) for reference.
This is not a real overlay source, but only the disassembly of the overlay, the correct source of which I already gave in my penultimate post.
And since my source code is written in absolute path notation, it can even be applied to a base DTB compiled without symbol bloat (-@).
I have added the source again as an attachment to this post, because the forum software has garbled the tabs in it in the display. meson-sm1-odroid-c4-rtc.dtso.txt (572 Bytes)