Which system do you use?
Fenix build Linux Kernel 4.9 Ubuntu Focal
Please describe your issue below:
RTC hym8563 seems to not work with linux kernel 4.9 ubuntu while the VIM3 is offline. After several days and reboots, the clock fails to read and the system time gets more and more behind. I believe this may be a similar hardware and firmware issue related to this raspberry pi issue because the same IOCTL error is present:
I would appreciate any additional troubleshooting steps that I could perform, as it looks like I am unable to read the raw data from the chip using i2cget.
Post a console log of your issue below:
Khadas:~$ sudo dmesg | grep rtc
[ 1.077052] rtc-hym8563 4-0051: rtc core: registered hym8563 as rtc0
[ 1.435882] aml_vrtc rtc: rtc core: registered aml_vrtc as rtc1
[ 2.039698] rtc-hym8563 4-0051: hctosys: unable to read the hardware clock
Khadas:~$ sudo hwclock -rv
hwclock from util-linux 2.34
System Time: 1718036866.593629
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
ioctl(4, RTC_UIE_ON, 0): Invalid argument
Waiting in loop for time from /dev/rtc0 to change
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
...synchronization failed
Khadas:~$ i2cdetect -l 4
i2c-3 i2c Meson I2C adapter I2C adapter
i2c-4 i2c Meson I2C adapter I2C adapter
Khadas:~$ i2cdetect -y 4
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- UU --
10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
20: UU -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Khadas:~$ sudo i2cget -y 4 0x51
Error: Could not set address to 0x51: Device or resource busy
Khadas:~$ date
Mon 10 Jun 2024 12:46:34 PM EDT
Khadas:~$