arahasya
Posts: 98
Joined: Sun Sep 08, 2019 2:48 pm

[SOLVED] How to make the PCF85063AT work with CM4?

Sun Dec 06, 2020 9:19 am

I have checked all the connections in my custom CM4 PCB.

Looks alright. I have also added dtparam=i2c_vc=on to /boot/config.txt

I can detect the RTC at

root@pi:~# i2cdetect -y 10
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: -- -- -- -- -- -- -- --

But how to make it work with hwclock?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13009
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to make the PCF85063AT work with CM4?

Sun Dec 06, 2020 4:15 pm

You've chosen an RTC for which the kernel driver isn't built in the standard Raspberry Pi kernel configs (RTC_DRV_PCF85063 isn't defined). You'll therefore need to build a custom kernel which includes that module.

To actually configure the RTC you need a device tree overlay, along the lines of i2c-rtc-overlay.dts, but as you've added it on GPIOs 44&45 for BSC0 you need to link your DT node to i2c_csi_dsi instead of i2c_arm.
You also need to enable nodes i2c0if and i2c0mux as the parent nodes to the I2C controller so that your overlay enables everything rather than needing dtparam=i2c_vc=on as well.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

arahasya
Posts: 98
Joined: Sun Sep 08, 2019 2:48 pm

Re: How to make the PCF85063AT work with CM4?

Sun Dec 06, 2020 5:22 pm

6by9 wrote:
Sun Dec 06, 2020 4:15 pm
You've chosen an RTC for which the kernel driver isn't built in the standard Raspberry Pi kernel configs (RTC_DRV_PCF85063 isn't defined). You'll therefore need to build a custom kernel which includes that module.

To actually configure the RTC you need a device tree overlay, along the lines of i2c-rtc-overlay.dts, but as you've added it on GPIOs 44&45 for BSC0 you need to link your DT node to i2c_csi_dsi instead of i2c_arm.
You also need to enable nodes i2c0if and i2c0mux as the parent nodes to the I2C controller so that your overlay enables everything rather than needing dtparam=i2c_vc=on as well.
Okay, looks like a task. Why was this RTC chosen in the official CM4 IO board if it's not yet supported officially?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13009
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to make the PCF85063AT work with CM4?

Sun Dec 06, 2020 7:07 pm

arahasya wrote:
Sun Dec 06, 2020 5:22 pm
Okay, looks like a task. Why was this RTC chosen in the official CM4 IO board if it's not yet supported officially?
I hadn't noticed that that was the chip chosen :oops:
Adding it isn't a huge job, and if it's on the CM4IO then we really ought to do it!
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Mon Dec 07, 2020 1:53 pm

The config changes and enhanced i2c-rtc overlay are in rpi-5.4.y and rpi-5.10.y. You can either build the kernel yourself or wait for an rpi-update release (likely to be in a few days, but comes with the usual caveat about installing beta software) or for the raspberrypi-kernel apt package to be updated (which could be weeks away).

To use on a CM4IO board:

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi

svenschuchmann
Posts: 4
Joined: Mon Dec 07, 2020 4:50 pm

Re: How to make the PCF85063AT work with CM4?

Mon Dec 07, 2020 5:36 pm

Hi,
I am also trying to get I2C RTC running on CM4 IO Board but I am failing.
I compiled the latest kernel Linux 5.4.80-v7l which contains this patch:
https://github.com/raspberrypi/linux/co ... e9f6995c6e

Added to my /boot/config.txt:

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
In dmesg I can see

Code: Select all

[    5.193909] i2c i2c-11: Added multiplexed i2c bus 0
[    5.194296] i2c i2c-11: Added multiplexed i2c bus 10
i2detect gives me an error

Code: Select all

$ i2cdetect -y 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory
and hwclock also

Code: Select all

$ hwclock --verbose
hwclock from util-linux 2.33.1
System Time: 1607362359.786835
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.
Can anyone help? Did I forget to load a module?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Tue Dec 08, 2020 9:07 am

The RTC on the CM4IO board is on i2c0/i2c_vc on GPIOs 44/45, and with the kernel I2C multiplexer that ends up being /dev/i2c-11. Try using "i2cdetect -y 11".

The PCF85063A driver isn't very chatty (thank goodness), but is does put a few lines in the kernel log - "dmesg | grep pcf" should give you a clue as to what is happening. If you see nothing, and if i2cdetect shows the device being present on address 0x51, then it's likely that either the kernel configuration hasn't been updated to include the driver module or the new module hasn't been installed correctly.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13009
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to make the PCF85063AT work with CM4?

Tue Dec 08, 2020 11:36 am

PhilE wrote:
Tue Dec 08, 2020 9:07 am
The RTC on the CM4IO board is on i2c0/i2c_vc on GPIOs 44/45, and with the kernel I2C multiplexer that ends up being /dev/i2c-11. Try using "i2cdetect -y 11".

The PCF85063A driver isn't very chatty (thank goodness), but is does put a few lines in the kernel log - "dmesg | grep pcf" should give you a clue as to what is happening. If you see nothing, and if i2cdetect shows the device being present on address 0x51, then it's likely that either the kernel configuration hasn't been updated to include the driver module or the new module hasn't been installed correctly.
/dev/i2c-10.
/dev/i2c-11 is the parent controller node with no pin-ctrl associations, so it will have whatever the last pin-muxing was that was used.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

fanoush
Posts: 904
Joined: Mon Feb 27, 2012 2:37 pm

Re: How to make the PCF85063AT work with CM4?

Sun Feb 07, 2021 2:14 pm

Have same issue, cannot make it detect RTC

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi,addr=0x51
gives

Code: Select all

pi@raspberrypi:~ $ dmesg | grep i2c
[    3.645950] i2c /dev entries driver
[    5.629846] i2c i2c-11: Added multiplexed i2c bus 0
[    5.631077] i2c i2c-11: Added multiplexed i2c bus 10
pi@raspberrypi:~ $ dmesg | grep pcf
pi@raspberrypi:~ $ dmesg | grep rtc
pi@raspberrypi:~ $ i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2f 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
so the RTC is sitting there on 0x51 but the overlay does not find it. Using latest apt repo kernel 5.10.11-v8+

EDIT:
got it working in manual way - as root

Code: Select all

echo pcf85063 0x51 >/sys/class/i2c-adapter/i2c-10/new_device
modprobe rtc-pcf85063
gives

Code: Select all

[  340.866289] i2c i2c-10: new_device: Instantiated device pcf85063 at 0x51
[  363.260444] rtc rtc0: Power loss detected, invalid time
[  363.260745] rtc-pcf85063 10-0051: registered as rtc0

fanoush
Posts: 904
Joined: Mon Feb 27, 2012 2:37 pm

Re: How to make the PCF85063AT work with CM4?

Sun Feb 07, 2021 8:04 pm

oh, it works, the issue was that conditional filter by serial number [0xnnnnnnnn] in config.txt (as per this) does not work and I had first line "dtparam=i2c_vc=on" somewhere else too. When moving the second line "dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi"to [pi4] section it works.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Sun Feb 07, 2021 8:15 pm

I've not tried it myself, but reading the code suggests that you should ignore the fact that bit 60 is set in Pi 4 serial numbers - the value to go in the filter declaration is just the lower 32 bits.

fanoush
Posts: 904
Joined: Mon Feb 27, 2012 2:37 pm

Re: How to make the PCF85063AT work with CM4?

Sun Feb 07, 2021 8:24 pm

yes, that does not work for me too, tried both - [0x10000000nnnnnnnn] and [0xnnnnnnnn]
Oh, it works now, had probably some typo there [0xnnnnnnnn] works now for some reason. So all is good, thank you.

Pakue
Posts: 2
Joined: Mon Mar 15, 2021 5:03 pm

Re: How to make the PCF85063AT work with CM4?

Tue Mar 16, 2021 8:20 am

Is there a way to address the alarm/timer functionality of the PCF85063 through the kernel driver? The proc info doesn't seem to show it.

Code: Select all

pi@raspberrypi:~ $ cat /proc/driver/rtc
rtc_time	: 17:05:13
rtc_date	: 2021-03-15
24hr		: yes

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Tue Mar 16, 2021 4:52 pm

The Linux driver thinks that alarm functionality is pointless without an IRQ line for the RTC, so it isn't enabled. That's actually not the case for the CM4IO because the alarm signal is used to kick GLOBAL_EN and wake the rest of the system. The overlay doesn't extend as far as IRQs, and if it did you would need to choose a sacrificial GPIO line that Linux could claim just to keep it happy.

If you are prepared to build your own kernel you could experiment with hacking the driver to make the following line unconditional:

Code: Select all

			pcf85063->rtc->ops = &pcf85063_rtc_ops_alarm;

Pakue
Posts: 2
Joined: Mon Mar 15, 2021 5:03 pm

Re: How to make the PCF85063AT work with CM4?

Tue Mar 16, 2021 6:34 pm

Thanks for the reply!
I'll have a look into it. Is there a chance this will make it into future releases?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Tue Mar 16, 2021 7:15 pm

If you can confirm that it works then it might. It would be a downstream patch, which we try to avoid, but it would be for a Pi product.

MandalaS2
Posts: 6
Joined: Fri Feb 05, 2021 2:35 pm

Re: How to make the PCF85063AT work with CM4?

Wed Mar 31, 2021 7:46 pm

Hello everyone,

I'm currently facing a similar problem to our friend arahasya.

My question is, for what 6by9 and PhilE said, the raspberry OS kernel doesn't have support for the PCF85063AT, but on the datasheet https://datasheets.raspberrypi.org/cm4i ... asheet.pdf topic 2.13. Real Time Clock (RTC) it says this:
A PCF85063AT RTC is provided on the Raspberry Pi Compute Module 4 IO Board. A battery socket is provided for a
CR2032 battery. On initial setup the CLKOUT of the RTC should be disabled to save power.

The alarm output of the RTC is used to wakeup the CM4 from a previous shutdown. If an alarm goes off during normal
operation the CM4 will be reset, this can be used as a watchdog timer if required.

TIP: To enable the I2C bus to the RTC you will need dtparam=i2c_vc=on set in config.txt . The RTC then will be on i2c-10
address 0x51 ( 7bit address)
So, if the Raspberry Pi Compute Module 4 IO Board, how can the kernel doen't have support for it? Or is it used for other purpose?

By the way, I added to the end of the /boot/config.txt file:

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
If this isn't a kernel thing and might be solved with simple configuration, below are some useful commands outputs that may be useful to find the problem.

dmesg | grep i2c

Code: Select all

pi@raspberrypi:~ $ dmesg | grep i2c
[    3.400362] i2c /dev entries driver
[    4.631827] i2c i2c-11: Added multiplexed i2c bus 0
[    4.632551] i2c i2c-11: Added multiplexed i2c bus 10
dmesg | grep rtc

Code: Select all

pi@raspberrypi:~ $ dmesg | grep rtc
[    5.398967] rtc-pcf85063 10-0051: RTC chip is not present
[    5.399104] rtc-pcf85063: probe of 10-0051 failed with error -121
i2cdetect -y 1

Code: Select all

pi@raspberrypi:~ $ 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: -- -- -- -- -- -- -- --                         
i2cdetect -y 10

Code: Select all

pi@raspberrypi:~ $ i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
i2cdetect -y 11

Code: Select all

pi@raspberrypi:~ $ i2cdetect -y 11
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
hwclock --verbose

Code: Select all

pi@raspberrypi:~ $ hwclock --verbose
hwclock from util-linux 2.33.1
System Time: 1617219672.422013
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.
Many thanks in advance s2

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: How to make the PCF85063AT work with CM4?

Wed Mar 31, 2021 8:03 pm

So, if the Raspberry Pi Compute Module 4 IO Board, how can the kernel doen't have support for it? Or is it used for other purpose?
Put that down to a communication failure - despite all the RTCs supported by the kernel at the time, the hardware designer chose one that wasn't without realising. The kernel configuration was updated as soon as the problem was noticed. What couldn't be changed in software is the choice of I2C bus, but the i2c_csi_dsi parameter was added to the i2c-rtc overlay to support it.

I don't understand why the RTC is appearing on i2c-0 - it ought to be on i2c-10 (both are provided by the I2C0 interface, but using different GPIO pins).
Please run a small test for me:

Code: Select all

$ while true; do i2cdetect -y 1; done > /dev/null &
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
Run the raspi-gpio command a few times because the pin-mux will be changing dynamically and you might catch it between runs of i2cdetect. Once you are satisfied that you've seen all of the answers, report them here. You can then kill the background command using "fg" and Ctrl-C.

MandalaS2
Posts: 6
Joined: Fri Feb 05, 2021 2:35 pm

Re: How to make the PCF85063AT work with CM4?

Thu Apr 01, 2021 7:27 pm

PhilE wrote: Put that down to a communication failure - despite all the RTCs supported by the kernel at the time, the hardware designer chose one that wasn't without realising. The kernel configuration was updated as soon as the problem was noticed. What couldn't be changed in software is the choice of I2C bus, but the i2c_csi_dsi parameter was added to the i2c-rtc overlay to support it.
I see, this happens in small companies so I imagine that it must be an even bigger problem for big ones like Raspberry Fundation. rsrssr
PhilE wrote: I don't understand why the RTC is appearing on i2c-0 - it ought to be on i2c-10 (both are provided by the I2C0 interface, but using different GPIO pins).
Please run a small test for me:

Code: Select all

$ while true; do i2cdetect -y 1; done > /dev/null &
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
$ raspi-gpio get | grep SDA
Run the raspi-gpio command a few times because the pin-mux will be changing dynamically and you might catch it between runs of i2cdetect. Once you are satisfied that you've seen all of the answers, report them here. You can then kill the background command using "fg" and Ctrl-C.
Sure, here is the output:

Code: Select all

pi@raspberrypi:~ $ raspi-gpio get | grep SDA
GPIO 2: level=0 fsel=4 alt=0 func=SDA1 pull=UP
I've realized that as you said before 'i2c_csi_dsi' this is for the SDA0 and SCL0, so for different board this would need to be changed. As I'm using a custom board my I2C RTC showed on the 1 instead of 10, and workd with 'dtoverlay=i2c-rtc,pcf85063a' instead of 'dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi'.

Thank you PhilE. :D

lixiaoxin1989
Posts: 15
Joined: Fri Apr 09, 2021 2:07 pm

Re: [SOLVED] How to make the PCF85063AT work with CM4?

Tue Apr 13, 2021 4:10 am

Is there anybody use Ubuntu Server 20.10

In ubuntu, the address 51 can be detected with i2cdetect -y 10, and i add following to /boot/firmware/config.txt:

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi

But the system can not recognize the RTC. Who knows the reason? :?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4556
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: [SOLVED] How to make the PCF85063AT work with CM4?

Tue Apr 13, 2021 9:02 am

If you have "vcdbg" in Ubuntu, use "sudo vcdbg log msg". If not, there's a static build that should work here: https://drive.google.com/file/d/1HS9E5v ... sp=sharing

You can also upload the version of the overlay you are using somewhere so we can check if it is new enough to support the i2c_csi_dsi parameter.

fanoush
Posts: 904
Joined: Mon Feb 27, 2012 2:37 pm

Re: [SOLVED] How to make the PCF85063AT work with CM4?

Tue Apr 13, 2021 10:20 am

lixiaoxin1989 wrote:
Tue Apr 13, 2021 4:10 am
Is there anybody use Ubuntu Server 20.10

In ubuntu, the address 51 can be detected with i2cdetect -y 10
...
But the system can not recognize the RTC. Who knows the reason? :?
Does it get detected when doing it yourself as root? via

Code: Select all

echo pcf85063 0x51 >/sys/class/i2c-adapter/i2c-10/new_device
modprobe rtc-pcf85063

lixiaoxin1989
Posts: 15
Joined: Fri Apr 09, 2021 2:07 pm

Re: [SOLVED] How to make the PCF85063AT work with CM4?

Tue Apr 13, 2021 1:15 pm

lixiaoxin1989 wrote:
Tue Apr 13, 2021 4:10 am
Is there anybody use Ubuntu Server 20.10

In ubuntu, the address 51 can be detected with i2cdetect -y 10, and i add following to /boot/firmware/config.txt:

Code: Select all

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi

But the system can not recognize the RTC. Who knows the reason? :?
I have solve this problem by updating the i2c-rtc-deoverlay to newest version.
Thanks!

JamesPi123
Posts: 127
Joined: Fri Sep 23, 2016 10:02 pm
Location: Inside my Pi

Re: [SOLVED] How to make the PCF85063AT work with CM4?

Wed Apr 14, 2021 2:09 am

I have got /dev/rtc with

Code: Select all

dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
This is the hwclock --verbose responce

Code: Select all

pi@raspberrypi:~ $ hwclock --verbose
hwclock from util-linux 2.33.1
System Time: 1618365874.610429
Trying to open: /dev/rtc0
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
Somehow, it seems to work perfectly. I shut it down and disconnected it for 5 minutes and disabled my network and the time it restores is good to the second

shenlan
Posts: 11
Joined: Mon Aug 23, 2021 2:17 pm

Re: How to make the PCF85063AT work with CM4?

Tue Aug 24, 2021 2:09 am

fanoush wrote:
Sun Feb 07, 2021 8:04 pm
oh, it works, the issue was that conditional filter by serial number [0xnnnnnnnn] in config.txt (as per this) does not work and I had first line "dtparam=i2c_vc=on" somewhere else too. When moving the second line "dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi"to [pi4] section it works.
Hi, I met with the same issue in CM4 IO board too, and I'm not using the serial number filter.
I created a new topic as the following: viewtopic.php?f=98&t=318295

We can see the key difference is that whether GPIO44 and GPIO45 are working in I2C function mode.
So I guess the pcf85063 driver is ok, but the i2c-rtc.dtbo may have some issue.

Hope somebody can help me with it, great thanks.
Last edited by shenlan on Tue Aug 24, 2021 5:39 am, edited 6 times in total.

Return to “Compute Module”