The external RTC in orin nano's self-designed baseplate cannot be used

According to the documentation, I found that rtc was not working when I suspended pin 235, and the time would be reset to the 1970 date after boot.

It was found that when the 235 pin was connected to the voltage of the button battery, the RTC time did not reset in 1970. Would like to ask whether it is necessary to connect the 235 pin voltage in the circuit design

根據文檔說明我將235引腳懸空時發現rtc無法使用,開機後時間會重置爲1970年的日期。

發現將235引腳連接鈕釦電池的電壓後,RTC時間沒有出現重置1970年的現象。想問一下是電路設計中是否一定要將235引腳連接電壓

Pin 235 should be supplied if you want to implement RTC function.

I didn’t want to use RTC on the baseboard, I designed an RTC circuit myself. There are rtc0 and rtc1 under /dev, and I would like to ask if only using the external RTC does not need to power pin 235, because 235 is to power the internal RTC.

Yes, the power is unneccessary if you don’t want to use internal RTC.

My RTC chip uses PCF8563 and has two devices, rtc0 and rtc1, under /dev/. I found that as long as the 235 pin is not powered, the clock resets to the 1970 date every time it is turned on. To use only external rtc I made the following changes to the device tree file:

&{/rtc@c2a0000} {
status = “disable”;
};

At this time, only the rtc0 device is in /dev, but the hwclock command can still be used to reset the device to 1970. The rtc clock circuit of the PCF8563 is communicated by i2c mode, and the device address can also be found. Later, I removed the PCF8563 chip and found the rtc0 device under /dev/.

Sounds like that i2c RTC you added totally not bring up at all.

Have you checked with the vendor what is needed in the device tree?

PCF8563 is from NXP and I don’t want to use internal RTC, so pin 235 is carried out for suspension. When you run the hwclock command to modify the RTC clock, the RTC clock is reset to the 1970 date each time a power failure occurs, but the reboot restart date does not change.

The reason I modified the device tree was to shut down the internal rtc completely

What I sound here is you disable the internal rtc but your new rtc totally not enabled at all.

If what I understand is wrong, please clarify.

Yes, the internal RTC is disabled, and the external RTC is still unavailable

Yes, that is why I said you need to check with vendor about their RTC bring up…

The problem is solved, just add the PCF8563 device tree description.

&gen2_i2c {
pcf8563@51{
compatible = “nxp,pcf8563”;
reg = <0x51>;
#clock-cells = <0>;
};
};

You also need to add a driver for pcf8563 in menuconfig

image

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.