ODROID-C2 with RTC shield gives modprobe errors [SOLVED]

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

ODROID-C2 with RTC shield gives modprobe errors [SOLVED]

Postby graysky » Thu Dec 20, 2018 10:34 pm

I purchased a RTC shield for my ODROID-C2.
When I try to manually load the requisite aml_i2c module, dmesg gets populated with some errors:
$this->bbcode_second_pass_code('', '
% sudo modprobe aml_i2c
% dmesg
...
[ +5.410385] aml_i2c version: 20140813
[ +0.011234] rtc-pcf8563 1-0051: chip found, driver version 0.4.3
[ +0.001690] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
[ +0.005707] aml-i2c c1108500.i2c: add adapter aml_i2c_adap1(ffffffc059c4e0e0)
[ +0.019613] sx865x 2-0049: sx865x_probe()
[ +0.002440] sx865x 2-0049: swap_xy (1)
[ +0.000245] sx865x 2-0049: invert_x (0)
[ +0.003419] sx865x 2-0049: invert_y (1)
[ +0.003794] sx865x 2-0049: gpio pendown (218)
[ +0.004728] sx865x 2-0049: gpio reset (224)
[ +0.003798] sx865x 2-0049: gpio irq (96)
[ +0.003969] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005354] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005667] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005371] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005638] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005402] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005636] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005405] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005626] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005451] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005551] i2c i2c-2: [aml_i2c_xfer] error ret = -5 (-EIO)
[ +0.005476] i2c i2c-2: token 1, master_no(2) 300K addr 0x49
[ +0.005518] sx865x: probe of 2-0049 failed with error -5
[ +0.005291] aml-i2c c11087c0.i2c: add adapter aml_i2c_adap2(ffffffc059c4c0e0)
')

lsmod shows they are loaded despite these errors but I'm thinking this isn't normal.

$this->bbcode_second_pass_code('', '% lsmod | grep -i 'i2c\|rtc'
rtc_pcf8563 4380 0
aml_i2c 17967 0
')

What's worse is that the module is not auto loaded... I created /etc/modprobe.d/99-load.conf which simply contains a single line:
$this->bbcode_second_pass_code('', '% cat /etc/modprobe.d/99-load.conf
aml_i2c')

When I reboot the machine, these modules are not loaded. When I try to manually load them, I get this error:
$this->bbcode_second_pass_code('', '% sudo modprobe aml_i2c
libkmod: kmod_config_parse: /etc/modprobe.d/99-load.conf line 1: ignoring bad line starting with 'aml_i2c'
')

If I include the aml_i2c module in the MODULES array of /etc/mkinitcpio.conf and regenerate the image, it does load on boot but is seemly non-functional. I cannot call hwclock despite it being loaded:
$this->bbcode_second_pass_code('', '
% sudo hwclock --systohc --utc
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
')

Battery is fully charged (also tried another one) and I believe I have it installed correctly. Any thoughts are appreciated.
Image
Last edited by graysky on Fri Dec 21, 2018 4:52 pm, edited 1 time in total.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: ODROID-C2 with RTC shield gives modprobe errors

Postby graysky » Fri Dec 21, 2018 4:52 pm

It seems the problem is with the sx865x... black list it and everything seems to work. Credit to odroid in this thread.

I made a simple Makefile providing a pacman hook for updating the i2c RTC status on kernel updates (credit to cmsigler from this thread), blacklist file, and a simple systemd service to load the time from the RTC to sysclock on boot.

The initial setup shown at this link is automated when the user install the package thanks to a this little pacman scriplet that will run post install.

Upstream code: https://github.com/graysky2/odroid-c2-rtc
AUR package: https://aur.archlinux.org/packages/odroid-c2-rtc

... so why does the sx865x module mess up everything?
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 3 guests