您好,我在RK3568上适配PCF5863T RTC芯片出现错误。
console:/ # dmesg | grep rtc
[ 0.764871] rtc-pcf8563 3-0051: low voltage detected, date/time is not reliable.
[ 0.765010] rtc-pcf8563 3-0051: rtc core: registered rtc-pcf8563 as rtc0
[ 0.766194] rtc-pcf8563 3-0051: low voltage detected, date/time is not reliable.
[ 0.766205] rtc-pcf8563 3-0051: hctosys: unable to read the hardware clock
date
Wed Aug 14 13:47:25 CST 2024
hwclock -r
hwclock: /dev/misc/rtc: No such file or directory
下面我提供了原理图跟我设备树的一些配置,目前系统自带的RTC我已经disabled了。
&i2c3 {
status = "okay";
pcf8563: pcf8563@51 {
status = "okay";
pinctrl-names = "default";
compatible = "nxp,pcf8563";
reg = <0x51>;
pinctrl-0=<&rtc_int>;
rtc-irq-gpio = <&gpio1 RK_PB1 IRQ_TYPE_LEVEL_LOW>;
clock-frequency=<32768>;
};
};
&pinctrl {
pcf8563 {
rtc_int: rtc-int {
rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
Hi Zhang,
The first error message reports "low voltage detected," which suggests that the RTC may not be getting the correct supply voltage or that there is an issue with the battery backup circuit.
The error message "unable to read the hardware clock" indicates that the system could not read the RTC.
The VCC_RTC is powered through a diode (D6) that switches between the main power supply (VCC3V3_SYS) and the battery backup (BT1). Check if the VCC_RTC voltage level is correct, typically 3.3V, and whether the diode is correctly oriented.
Ensure that the backup battery (BT1) is installed and provides sufficient voltage to the RTC when the main power is off. Check the battery voltage and connections to confirm that the battery is functional and properly connected.
The schematic shows pull-up resistors (R32, R33) for the I2C lines. Verify that the pull-up resistors are correctly valued (typically 4.7kΩ to 10kΩ) and properly connected.
The external 32.768kHz crystal (Y1) must be working correctly to provide a stable clock to the RTC. Ensure that the crystal is oscillating as expected. You can check this with an oscilloscope.
The interrupt pin is connected to GPIO1_B1. Ensure that the pin configuration and connection are correct and that the interrupt is correctly mapped in the device tree.
If the issue persists, consider replacing the RTC IC or the battery to rule out hardware faults.
I hope it helps.
BRs, Tomas