Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0

Ian Lepore ian at freebsd.org
Thu Jul 18 19:16:57 UTC 2019


On Thu, 2019-07-18 at 19:38 +0300, Stefan Parvu wrote:
> It seems the battery is a real pain in this model. I cant figure out
> any vendor. 
> Tried already 3 models. All do not keep the time. 
> 
> root at k1:~ # dmesg | grep nxp
> nxprtc0: <NXP PCF2129 RTC> at addr 0xa2 on iicbus0
> nxprtc0: WARNING: RTC battery failed; time is invalid
> nxprtc0: registered as a time-of-day clock, resolution 0.015625s
> nxprtc0: RTC clock not running
> 
> It seems the battery must be 36mAh. But even so some new model I got
> does not work. Damn. 
> 
> 

It occurred to me: are you sure you're using the fixed driver?  One of
the problems before the fix was that a read would succeed, but return
the wrong values.  So the status register reads might be getting a
wrong value and interpretting that as the "battery failed bit is set".

One thing that comes to mind:  you're using this as a module, but is
the nxprtc driver already built in to the kernel?  I think if it is and
you added nxprtc_load=YES to loader.conf, it'll load the module but
then still use the driver already in the kernel.

-- Ian



More information about the freebsd-arm mailing list