[linux-odroid-c2] rtc not available since upgrade to 3.16.81

Post Reply
stas-t
Posts: 2
Joined: Sun Jan 19, 2020 1:09 am
languages_spoken: english
ODROIDs: C2, XU4, GO
Has thanked: 0
Been thanked: 0
Contact:

[linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by stas-t » Sun Jan 19, 2020 1:19 am

Arch user here. I've reported the issue here first: https://archlinuxarm.org/forum/viewtopi ... 15&t=14225.
So briefly: DTB file was patched, the box was rebooted, but RTC device was not available after reboot.
What may be the possible cause of this?

User avatar
odroid
Site Admin
Posts: 33398
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 409 times
Been thanked: 464 times
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by odroid » Mon Jan 20, 2020 10:05 am

Could you load the RTC driver module rtc_pcf8563 with aml_i2cmanually?

mdrjr
Site Admin
Posts: 11737
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by mdrjr » Tue Jan 21, 2020 6:35 am

Hello,

I tested here on Ubuntu with the current kernel without any issues.

Code: Select all

root@odroid:~# uname -a
Linux odroid 3.16.81-49 #1 SMP PREEMPT Wed Jan 15 21:38:53 -02 2020 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:~# hwclock -w
root@odroid:~# hwclock -r
2020-01-20 21:33:24.730790+0000
root@odroid:~# date
Mon Jan 20 21:33:28 UTC 2020
root@odroid:~#
make sure as @odroid said that aml_i2c and rtc_pcf8563 are loaded.
These users thanked the author mdrjr for the post:
odroid (Tue Jan 21, 2020 9:39 am)

stas-t
Posts: 2
Joined: Sun Jan 19, 2020 1:09 am
languages_spoken: english
ODROIDs: C2, XU4, GO
Has thanked: 0
Been thanked: 0
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by stas-t » Sat Jan 25, 2020 10:13 pm

Sorry for the delay. Yes, both modules seem to be loaded:

Code: Select all

$ lsmod | grep rtc_pcf8563
rtc_pcf8563             4388  0
$ lsmod | grep aml_i2c
aml_i2c                17911  1
$ uname -a
Linux alarm 3.16.81-1-ARCH #1 SMP PREEMPT Fri Jan 17 18:41:33 MST 2020 aarch64 GNU/Linux
However hwclock is still failing:

Code: Select all

$ sudo hwclock --verbose --hctosys
hwclock from util-linux 2.35
System Time: 1579957920.025394
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
Are there any other checks I can perform?

User avatar
graysky
Posts: 145
Joined: Wed Jul 13, 2016 9:11 am
languages_spoken: english
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by graysky » Sun Jan 26, 2020 5:10 am

I have the same problem. Arch ARM.

Code: Select all

# uname -a
Linux odroid 3.16.81-1-ARCH #1 SMP PREEMPT Fri Jan 17 18:41:33 MST 2020 aarch64 GNU/Linux

# lsmod | grep 'rtc\|aml'
rtc_pcf8563             4388  0
aml_i2c                17911  1

# /usr/bin/hwclock -s --verbose
hwclock from util-linux 2.35
System Time: 1579983104.965645
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
The change that broke it definitely occurred when 3.16.78 --> 3.16.81. If I downgrade my system to the kernel and headers from 3.16.78, everything works as it should:

Code: Select all

# uname -a
Linux odroid 3.16.78-1-ARCH #1 SMP PREEMPT Thu Dec 12 14:50:21 UTC 2019 aarch64 GNU/Linux

# /usr/bin/fdtput -t s /boot/dtbs/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
# /usr/bin/hwclock -s --verbose                                                              
hwclock from util-linux 2.35
System Time: 1579983537.214373
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1545347934 seconds after 1969
Last calibration done at 1545347934 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
ioctl(3, RTC_UIE_ON, 0): Invalid argument
Waiting in loop for time from /dev/rtc0 to change
...got clock tick
Time read from Hardware Clock: 2020/01/25 20:18:57
Hw clock time : 2020/01/25 20:18:57 = 1579983537 seconds since 1969
Time since last adjustment is 34635603 seconds
Calculated Hardware Clock drift is 0.000000 seconds
Calling settimeofday(1579983537.000000, 300)[code]

mdrjr
Site Admin
Posts: 11737
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by mdrjr » Mon Jan 27, 2020 12:09 am

Both have the dtb patched ?

User avatar
graysky
Posts: 145
Joined: Wed Jul 13, 2016 9:11 am
languages_spoken: english
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by graysky » Mon Jan 27, 2020 1:47 am

@mdrjr - I do not see any differences in these versions with respect to any special patches... if there is a difference it lies with upstream (kernel code). Do you agree?

mdrjr
Site Admin
Posts: 11737
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: [linux-odroid-c2] rtc not available since upgrade to 3.16.81

Unread post by mdrjr » Mon Jan 27, 2020 11:19 pm

Nope, if the dtb is patched it should work.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 2 guests