HI:
I was debugging the pcf8563,
[ 2.215985] rtc-pcf8563 2-0051: registered as rtc0[ 2.221124] rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock
It has the error
The log is as follows:
Hi @5454ty!
Since you use external RTC chip, It means there are 2 RTCs in you system, another is RTC in CPU.
Maybe that should be the error message but the RTC should work fine.
Best Regards!
Chavira
root@imx93evk:~# hwclock -rhwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argumentroot@imx93evk:~# sudo hwclock -rhwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argumentroot@imx93evk:~#
It reported the error above
How you are setting the device tree in the board?
The iMX93-EVK has 2 RTC, the internal that is rtc0 and the external pcf2131 that is rtc1.
I am trying with those RTC without errors.
https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/arch/arm64/boot/dts/freescale/imx93.dtsi#L417
https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts...
HI,
My dts is as follows:
I recommend to use the next configuration:
pcf8563: pcf8563@51 { compatible = "nxp,pcf8563"; reg = <0x51>; #clock-cells = <0>;
status = "okay";};
I used the above configuration
But ,it still reported error when the system is bootup
rtc-pcf8563 2-0051: registered as rtc0
rtc-pcf8563 2-0051: hctosys: unable to read the hardware clock