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

Problems with packages? Post here, using [tags] of the package name.

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

Postby stast » Sat Jan 18, 2020 3:53 pm

After upgrading linux-odroid-c2 from 3.16.78-1 to 3.16.81-1, applying the usual patch to /boot/dtbs/meson64_odroidc2.dtb and rebooting the box I discover that RTC cannot be accessed anymore:
$this->bbcode_second_pass_code('', '$ sudo hwclock --verbose --hctosys
[sudo] password for alarm:
hwclock from util-linux 2.34
System Time: 1579362460.672981
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 patch I use all the time after upgrading linux-odroid-c2 is this one (as described on https://wiki.odroid.com/accessory/add-on_boards/rtc_shield):
$this->bbcode_second_pass_code('', 'sudo fdtput -t s /boot/dtbs/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"')

And it seems to be applied successfully:
$this->bbcode_second_pass_code('', '$ cat /proc/device-tree/i2c@c1108500/pcf8563@51/status
okay')

Should it be reported upstream or is it a packaging issue? Pls let me know about directions.
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

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

Postby graysky » Sat Jan 18, 2020 3:54 pm

Same. You probably want to post this to the odroid forums: https://forum.odroid.com/viewforum.php?f=134

As an aside: https://github.com/graysky2/odroid-c2-rtc
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

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

Postby stast » Sat Jan 18, 2020 4:06 pm

graysky: thank you for the quick reaction! I'll report the issue on odroid forum.

UPD: reported here: https://forum.odroid.com/viewtopic.php?f=141&t=37444
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm

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

Postby blaeberries » Sun Jan 19, 2020 12:04 pm

Upgrade to 3.16.81-1 also breaks HIFIShield 2.

Fixed by downgrade to 78

Cheers
blaeberries
 
Posts: 1
Joined: Sun Jan 19, 2020 12:00 pm

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

Postby graysky » Sun Jan 19, 2020 1:57 pm

As an aside, I am using a RPi4 in place of the C2 due to reliability issues. Network on the RPi4 is much faster too.
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

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

Postby graysky » Sat Jan 25, 2020 8:25 pm

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]# 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]
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

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

Postby stast » Wed Mar 18, 2020 7:15 pm

Upgraded to 3.16.82-1 and the issue is the same: the chip was found but kernel logs the alignment fault:
$this->bbcode_second_pass_code('', 'Feb 13 21:01:09 alarm kernel: aml_i2c version: 20140813
Feb 13 21:01:09 alarm kernel: rtc-pcf8563 1-0051: chip found, driver version 0.4.3
Feb 13 21:01:09 alarm kernel: Unhandled fault: alignment fault (0x96000021) at 0xffffff80005f6501
Feb 13 21:01:09 alarm kernel: Internal error: : 96000021 [#1] PREEMPT SMP
Feb 13 21:01:09 alarm kernel: Modules linked in: rtc_pcf8563 aml_i2c(+)
Feb 13 21:01:09 alarm kernel: CPU: 1 PID: 114 Comm: modprobe Not tainted 3.16.82-1-ARCH #1
Feb 13 21:01:09 alarm kernel: task: ffffffc07387a580 ti: ffffffc073be4000 task.ti: ffffffc073be4000
Feb 13 21:01:09 alarm kernel: pc : aml_i2c_xfer_prepare+0x7c/0x120 [aml_i2c]
Feb 13 21:01:09 alarm kernel: lr : aml_i2c_xfer_prepare+0x44/0x120 [aml_i2c]
Feb 13 21:01:09 alarm kernel: sp : ffffffc073be7450 pstate : 80000145
Feb 13 21:01:09 alarm kernel: x29: ffffffc073be7450 x28: ffffffc073b79b04
Feb 13 21:01:09 alarm kernel: x27: 0000000000000001 x26: ffffffc0020dd000
Feb 13 21:01:09 alarm kernel: x25: 00000000ffff8cae x24: 0000000000000000
Feb 13 21:01:09 alarm kernel: x23: 0000000000000002 x22: ffffffc073be75a0
Feb 13 21:01:09 alarm kernel: x21: 00000000000493e0 x20: ffffffc073b79800
Feb 13 21:01:09 alarm kernel: x19: 000000000000008a x18: 0000000000000000
Feb 13 21:01:09 alarm kernel: x17: 0000000000000000 x16: 0000000000000068
Feb 13 21:01:09 alarm kernel: x15: 0000000000000060 x14: dead000000000200
Feb 13 21:01:09 alarm kernel: x13: 00000000ffffff80 x12: ffffffbc01378c60
Feb 13 21:01:09 alarm kernel: x11: ffffffbc01378c40 x10: 0101010101010101
Feb 13 21:01:09 alarm kernel: x9 : 0000000000000000 x8 : ffffffc073976c00
Feb 13 21:01:09 alarm kernel: x7 : 0000000000000000 x6 : 0000000000000001
Feb 13 21:01:09 alarm kernel: x5 : ffffffc073be73e0 x4 : ffffffc073be73c0
Feb 13 21:01:09 alarm kernel: x3 : 00000000f9ffc00f x2 : ffffff80005f6500
Feb 13 21:01:09 alarm kernel: x1 : 0000000000001150 x0 : 0000000000001150
Feb 13 21:01:09 alarm kernel:
Feb 13 21:01:09 alarm kernel: Process modprobe (pid: 114, stack limit = 0xffffffc073be4058)
Feb 13 21:01:09 alarm kernel: Call trace:
Feb 13 21:01:09 alarm kernel: aml_i2c_xfer_prepare+0x7c/0x120 [aml_i2c]
Feb 13 21:01:09 alarm kernel: $x+0x78/0x3b0 [aml_i2c]
Feb 13 21:01:09 alarm kernel: __i2c_transfer+0x94/0x3a8
Feb 13 21:01:09 alarm kernel: i2c_transfer+0x6c/0xb0
Feb 13 21:01:09 alarm kernel: pcf8563_get_datetime+0x80/0x1c0 [rtc_pcf8563]
Feb 13 21:01:09 alarm kernel: $x+0x28/0x38 [rtc_pcf8563]
Feb 13 21:01:09 alarm kernel: __rtc_read_time.isra.0+0x54/0x78
Feb 13 21:01:09 alarm kernel: rtc_read_time+0x44/0x68
Feb 13 21:01:09 alarm kernel: __rtc_read_alarm+0x2c/0x390
Feb 13 21:01:09 alarm kernel: rtc_device_register+0x174/0x2f0
Feb 13 21:01:09 alarm kernel: devm_rtc_device_register+0x5c/0xb8
Feb 13 21:01:09 alarm kernel: $x+0x74/0xc0 [rtc_pcf8563]
Feb 13 21:01:09 alarm kernel: i2c_device_probe+0x8c/0xf0
Feb 13 21:01:09 alarm kernel: really_probe+0x7c/0x218
Feb 13 21:01:09 alarm kernel: __device_attach+0x4c/0x60
Feb 13 21:01:09 alarm kernel: bus_for_each_drv+0x74/0xb0
Feb 13 21:01:09 alarm kernel: device_attach+0xa8/0xf0
Feb 13 21:01:09 alarm kernel: bus_probe_device+0x9c/0xc0
Feb 13 21:01:09 alarm kernel: device_add+0x378/0x528
Feb 13 21:01:09 alarm kernel: device_register+0x28/0x38
Feb 13 21:01:09 alarm kernel: i2c_new_device+0x10c/0x190
Feb 13 21:01:09 alarm kernel: i2c_register_adapter+0x208/0x488
Feb 13 21:01:09 alarm kernel: __i2c_add_numbered_adapter+0x68/0xa0
Feb 13 21:01:09 alarm kernel: i2c_add_numbered_adapter+0x2c/0x48
Feb 13 21:01:09 alarm kernel: $x+0x2a0/0x688 [aml_i2c]
Feb 13 21:01:09 alarm kernel: platform_drv_probe+0x2c/0x68
Feb 13 21:01:09 alarm kernel: really_probe+0x7c/0x218
Feb 13 21:01:09 alarm kernel: __driver_attach+0xb4/0xb8
Feb 13 21:01:09 alarm kernel: bus_for_each_dev+0x78/0xb8
Feb 13 21:01:09 alarm kernel: driver_attach+0x30/0x40
Feb 13 21:01:09 alarm kernel: bus_add_driver+0x154/0x1e8
Feb 13 21:01:09 alarm kernel: driver_register+0x68/0x128
Feb 13 21:01:09 alarm kernel: __platform_driver_register+0x70/0x80
Feb 13 21:01:09 alarm kernel: $x+0x20/0x40 [aml_i2c]
Feb 13 21:01:09 alarm kernel: do_one_initcall+0x9c/0x1a0
Feb 13 21:01:09 alarm kernel: load_module+0x1800/0x1f10
Feb 13 21:01:09 alarm kernel: SyS_finit_module+0x98/0xb0
Feb 13 21:01:09 alarm kernel: Code: 530a7e60 531c2661 53017e73 2a006420 (b8401041)
Feb 13 21:01:09 alarm kernel: ---[ end trace 6d4e2897649177b8 ]---
')
stast
 
Posts: 34
Joined: Thu May 04, 2017 2:45 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 3 guests