2

I'm using a HAT that among other things has a PCF8563 real-time clock on it (fed by a supercap when the Pi is off.)

I can use i2cdetect to see the device on bus 1, but the rtc-pcf8563 module does not see it, and the i2c-rtc dtoverlay does not use it.

pi@crunch:~ $ sudo modprobe rtc-pcf8563
pi@crunch:~ $ lsmod | grep rtc
rtc_pcf8563             7056  0 
pi@crunch:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
pi@crunch:~ $ ls /dev/rtc
ls: cannot access /dev/rtc: No such file or directory
pi@crunch:~ $ grep i2c-rtc /boot/config.txt
dtoverlay=i2c-rtc,param=pcf8563
pi@crunch:~ $ 

I've tried the AdaFruit walkthrough and a few other web searches. From what I can tell, what I'm doing should recognize the chip, and turn it to "UU" (as in, reserved by driver) However, I can't get /dev/rtc to show up.

dmesg | grep 8563

is empty, as is

dmesg | grep -i rtc
2
  • Aaaand just because I asked the question, the answer immediately appeared. That's why I ask questions, they make me find the answer! The answer is that I needed to "echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device"
    – Jon Watte
    Oct 16, 2017 at 1:34
  • Also, "param=" should not be there in the dtoverlay define.
    – Jon Watte
    Oct 16, 2017 at 1:46

1 Answer 1

1

Change to dtoverlay=i2c-rtc,pcf8563 which is the correct syntax for Device Tree overlays.

Don't go fiddling with modprobe - Device Tree should set that up on boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.