Re: Adding support for external RTC (PCF2127/29)


Bas Mevissen
 

Hi Andreas,

I’m not sure whether the rtc driver in the Linux 3.14 kernel already supports device tree. You need to check that.

For the device tree, you need to add something like:

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

rtc: pcf2129t@51 {
compatible = "nxp,pcf2129", "nxp,pcf2127";
reg = <0x51>;
};
};

To the device tree. I don’t know on which bus the RTC is connected on your board, so please check the i2c bus to use.

Feel come back here if you don’t get it working. You are aware of the i2c detect utility to scan the i2c bus for devices? It needs the i2c-dev kmod loaded. You need to run i2cdetect as root.

Is there a reason why you are using such an old kernel and yocto version?

Regards,

Bas Mevissen

On 23 Mar 2018, at 07:14, Andreas Enbacka <andreas.enbacka@...> wrote:

Hello,

 

I am working on adding support for an external real-time clock chip (NXP PCF2127/29) to our custom Kontron SMARC SAMX6i Linux Yocto 1.8 image, however, I am experiencing issues with getting the device to work. I have enabled the PCF2127-compatible I2C driver using menuconfig, and rebuilt the Linux 3.14-based kernel. I assume some modification is required to the device tree as well? Are there some device tree example available, in case anyone else has used the same RTC chip previously? Any information would be greatly appreciated.

 

Best regards,

Andreas Enbacka

Gasera Ltd

 

--
_______________________________________________
meta-freescale mailing list
meta-freescale@...
https://lists.yoctoproject.org/listinfo/meta-freescale

Join {meta-freescale@lists.yoctoproject.org to automatically receive all group messages.