IMX93 PCF8563 debug

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMX93 PCF8563 debug

3,628件の閲覧回数
5454ty
Contributor II

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:

 

0 件の賞賛
返信
7 返答(返信)

3,602件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

3,589件の閲覧回数
5454ty
Contributor II

root@imx93evk:~# hwclock -r
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
root@imx93evk:~# sudo hwclock -r
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
root@imx93evk:~#

It reported the error above 

 

 

0 件の賞賛
返信

3,548件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @5454ty!

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...

 

Best Regards!

Chavira

0 件の賞賛
返信

3,534件の閲覧回数
5454ty
Contributor II

HI,

   My dts is as follows:

 

タグ(1)
0 件の賞賛
返信

3,517件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @5454ty!

 

I recommend to use the next configuration:

 

pcf8563: pcf8563@51 {
      compatible = "nxp,pcf8563";
      reg = <0x51>;
     #clock-cells = <0>;

      status = "okay";
};

 

Best Regards!

Chavira

0 件の賞賛
返信

3,385件の閲覧回数
5454ty
Contributor II

HI, 

   I used the above configuration

5454ty_0-1725004793540.png

 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

2,687件の閲覧回数
daihao
Contributor I
Hello, have you solved this problem in the end? What caused it? I also encountered the same problem. 
0 件の賞賛
返信