> Date: Tue, 10 Apr 2018 15:57:30 +0300
> From: Artturi Alm <artturi....@gmail.com>
> On Sat, Apr 07, 2018 at 08:39:43PM +0200, Mark Kettenis wrote:
> > I have an RK3399 system that has two RTCs.  One of those is the RTC
> > integrated on the RK808 PMIC that is a companion chip to the RK3399.
> > The second one is an ISL1208 I2C chip.  Only the ISL1208 is battery
> > powered, so obviously we want to use that one.  But rkpmic(4) attaches
> > after islrtc(4) on this board and therefore it wins.  The diff below
> > makes sure the RTC of the RK808 PMIC is only enabled if no other RTC
> > installed itself.
> > 
> Off-topic, but related enough i hope.
> instead of fixing up RTCVDD(lack of battery) on all my sunxi boards,
> i'm going to rather add cheap&separate I2C RTCs for each.
> What do you think about kern.timecounter.{choice,hardware}-type solution?

That wouldn't work.  The clock is set early on, before sysctl(8) runs.

If you modify the hardware like this, you should modify the device
tree as well.  Just disable the original RTC when you add yours.  That
only is a problem for multi-function devices like the RK808.  But that
one is covered now.

Reply via email to