[meta-freescale] Adding support for external RTC (PCF2127/29)

Bas Mevissen abuse at basmevissen.nl
Fri Mar 23 13:59:44 PDT 2018


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 at 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 at gasera.fi> 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 at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20180323/31154b90/attachment.html>


More information about the meta-freescale mailing list