Hi sndwvs,
I don't wish to sidetrack this thread, but I encountered a previously unknown problem (at least for me).
I have a 4 GB raspberry pi 4, and I would like to use an RTC. I own a number of them, and they all are
this model.
Until now used them happily but I recently switched from a 2 GB to a 4 GB RPi4, and also upgraded to kernel 5.10.0.
The problem is that:
In /boot/config.txt, I have
Code:
dtparam=i2c_arm=on
dtoverlay=disable-vc4,i2c-rtc,ds3231
And the device shows up in i2cdetect's output:
Code:
root@raspberry-pi-4:~# 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
So it seems to be connected to the RPi4 properly.
However when I try to execute the usual commands to activate the RTC,
Code:
lsmod | grep -q i2c-bcm2708 || modprobe i2c-bcm2708
cat <<<"ds1307 0x68" >/sys/class/i2c-adapter/i2c-1/new_device
sleep 1
[ -c /dev/rtc0 ] && hwclock --hctosys
I get this:
Code:
[ 11.711634] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 18.839442] random: crng init done
[ 19.164643] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68
[ 19.174771] rtc-ds1307: probe of 1-0068 failed with error -121
On my second attempt, I'm greeted with this:
Code:
[ 88.940468] i2c /dev entries driver
[ 137.524802] i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16)
Do you happen to have any tips on this?
I already spent a few hours googling around, but wasn't able to fix the problem.