> From: Archimedes Gaviola <archimedes.gavi...@gmail.com>
> Date: Mon, 24 Aug 2020 01:18:46 +0800
> 
> On Mon, Aug 24, 2020 at 1:10 AM Mark Kettenis <mark.kette...@xs4all.nl>
> wrote:
> 
>  > From: Archimedes Gaviola <archimedes.gavi...@gmail.com>
>  > Date: Mon, 24 Aug 2020 01:04:23 +0800
>  > 
>  > On Sun, Aug 23, 2020 at 10:50 PM Mark Kettenis
>  <mark.kette...@xs4all.nl>
>  > wrote:
>  > 
>  >  > From: Archimedes Gaviola <archimedes.gavi...@gmail.com>
>  >  > Date: Sun, 23 Aug 2020 22:36:49 +0800
>  >  > 
>  >  > Hi,
>  >  > 
>  >  > Good day!
>  >  > 
>  >  > How to enable DS3231 real-time clock in Raspberry Pi 4B? In
>  Raspberry
>  >  Pi 3B
>  >  > these 2 lines below in the config.txt works.
>  >  > 
>  >  > dtparam=i2c_arm=on
>  >  > dtoverlay=i2c-rtc,ds3231
>  >  > 
>  >  > and resolve the dmesg messages below.
>  >  > 
>  >  > WARNING: clock lost 8 days
>  >  > WARNING: CHECK AND RESET THE DATE!
>  >  > 
>  >  > This system is not always connected to the Internet.
>  > 
>  >  I think only the dtoverlay line is needed.  But yes, this works as
>  >  long as the i2c-rtc overlay file is present in the overlays
>  >  subdirectory of the firmware partition of your boot medium.
>  > 
>  >  Many of the other chip types supported by the i2c-rtc overlay are
>  >  supported by OpenBSD as well.  Feel free to send me any modules with
>  >  unsupported chips, and I'll make them work.
>  > 
>  >  Cheers,
>  > 
>  >  Mark
>  > 
>  >  Hi Mark,
>  > 
>  > Thanks for your prompt response! I tried it now by pulling-out dtbo
>  file here
>  > 
>  >
>  
> https://github.com/raspberrypi/firmware/blob/master/boot/overlays/i2c-rtc.dtbo
>  
>  > 
>  > 
>  > and put it in the overlays directory and then update the system time
>  and date
>  > to current using NTP via $ rdate ntp.pool.org and then reboot. The
>  system
>  > will still show up
>  > 
>  > WARNING: clock lost 8 days
>  > WARNING: CHECK AND RESET THE DATE!
> 
>  Without showing the complete dmesg we can't help you.
> 
> Hi Mark,
> 
> Please see attached dmesg.
> 
> Thanks and best regards,
> Archimedes 
> 
> 
> openbsd67rpi4b# dmesg
> OpenBSD 6.7-current (GENERIC.MP) #775: Wed Aug 19 00:17:01 MDT 2020
>     dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
> real mem  = 1996668928 (1904MB)
> avail mem = 1903022080 (1814MB)
> random: good seed from bootblocks
> mainbus0 at root: ACPI

You have to switch to DT (device tree) mode to be able to use the RTC.

Cheers,

Mark

Reply via email to