Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2019 09:03:14 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Stefan Parvu <sparvu@kronometrix.org>, freebsd-arm@freebsd.org
Subject:   Re: Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0
Message-ID:  <fd9991c4e6aaccb812a59ff86c9c8564ebd1d767.camel@freebsd.org>
In-Reply-To: <AB510253-52D9-469C-B06E-5EC73C5F188E@kronometrix.org>
References:  <41A4CA5C-B487-490F-8A19-2D51F43E1004@kronometrix.org> <95616620-bbaf-dbc3-49eb-3e2562638d49@bunyatech.com.au> <AB510253-52D9-469C-B06E-5EC73C5F188E@kronometrix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2019-07-15 at 16:49 +0300, Stefan Parvu wrote:
> > 
> > I'd think the nxprtc driver would be much more likely to work.
> 
> Here latest: 
> https://github.com/raspberrypi/firmware/issues/1190 <
> https://github.com/raspberrypi/firmware/issues/1190>;
> 
> Still for some very strange reasons Im not able to use Raclock on
> FreeBSD 12. 
> Pssoible problems:
> 
>  * driver issue 
> 
>  * battery low, cannot save keep the time 
> 
>  * else, configurations 
> 
> The config is simple: 
> 
> config.txt:
> 
> root@k1:~ # cat /boot/msdos/config.txt 
> arm_control=0x200
> dtparam=audio=on,i2c_arm=on,spi=on
> dtoverlay=mmc
> dtoverlay=pwm
> dtoverlay=pi3-disable-bt
> device_tree_address=0x4000
> kernel=u-boot.bin
> dtoverlay=i2c-rtc,pcf2129
> 
> Any ideas, tips ? 
> 
> Stefan

I'm the one who wrote the nxprtc driver (and pretty much all the i2c
rtc drivers except ds1307).  I have a rasclock here (v4.2) and it works
fine, but it's been over a year since I last hooked it up.

The battery-low flag is set by the chip whenever the battery voltage
drops below 2.5v, but the battery is able to run the chip all the way
down to 1.2v before it stops keeping time.  The PCF2129 chip has a
unique feature where battery usage is disabled when it leaves the
factory, and code in the driver sends a command to the chip to make it
start using the battery the first time the chip is used.  The idea is
to preserve the battery when the chip is just sitting around for months
in a warehouse.  But if the people who make the rasclock do something
like QA-test the boards when they're built, they could end up disabling
that battery-save feature.

It might help to see what's going on with the clock at boot time.  Add
debug.clock_show_io=3 to loader.conf and let's see what it says when it
boots.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fd9991c4e6aaccb812a59ff86c9c8564ebd1d767.camel>