How to set external RTC in kernel

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to set external RTC in kernel

跳至解决方案
5,530 次查看
Mihan
Contributor IV

Hi 

Some days ago,I asked a question about RTC RTC always reset to 19700101

After investigation, I find it can not register the external RTC (BM8563ESA, I2C RTC) if I close all the on-cpu RTC in "menuconfig". And the RTC_VBAT is unused so that the on-cpu RTC which I have been using will be reset after power off.

So could you please give me a hand for adding this I2C RTC into kernel.

now my devices tree for this external RTC:

&i2c3 {
   clock-frequency = <100000>;
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_i2c3>;
   status = "okay";

   rtc@51{
      compatible = "pcf8563";
      reg = <0x51>;
   };

   hdmi: edid@50 {
      compatible = "fsl,imx6-hdmi-i2c";
      reg = <0x50>;
      status = "okay";
   };
};

Regards

Mihan

标签 (1)
1 解答
5,447 次查看
Mihan
Contributor IV

Thanks 

I have solve this problem.

First, I found I used the on-cpu RTC before.

Second, I found the I2C address (get from `i2cdetect` and set in the device tree) was mismatched.

So, now I close all the on-cpu RTC on `make menuconfig-> device drivers-> Real time clock`, and make sure the all about pcf8563 are opened.

it works well for my device.

Regards

Mihan

在原帖中查看解决方案

3 回复数
5,447 次查看
karangajjar
Senior Contributor II

Hi 铭恒 李 ,

It seems like your compatible property is not getting matched with the driver's compatible property name. You can check drivers/rtc/rtc-pcf8563.c at least once and make sure your node's compatible property matches with driver's compatible property. (here compatible = "nxp,pcf8563")

You can refer Documentation/devicetree/bindings/rtc/pcf8563.txt. to add a node of etc.

Also, make sure you have enabled this driver with the help of menuconfig. 

Regards,

Karan Gajjar

0 项奖励
回复
5,448 次查看
Mihan
Contributor IV

Thanks 

I have solve this problem.

First, I found I used the on-cpu RTC before.

Second, I found the I2C address (get from `i2cdetect` and set in the device tree) was mismatched.

So, now I close all the on-cpu RTC on `make menuconfig-> device drivers-> Real time clock`, and make sure the all about pcf8563 are opened.

it works well for my device.

Regards

Mihan

5,447 次查看
karangajjar
Senior Contributor II

Hi 铭恒 李,

We are glad you solved your issue.

Kindly let us know in case of any other concerns.

Regards,

Karan Gajjar

0 项奖励
回复