How to set external RTC in kernel

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

How to set external RTC in kernel

ソリューションへジャンプ
4,390件の閲覧回数
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 解決策
4,307件の閲覧回数
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 返答(返信)
4,307件の閲覧回数
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 件の賞賛
返信
4,308件の閲覧回数
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

4,307件の閲覧回数
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 件の賞賛
返信