Rasclock (PCF2127 ) Hardware Clock FreeBSD 12.0
Stefan Parvu
sparvu at kronometrix.org
Mon Jul 15 09:01:46 UTC 2019
>
> I'd think the nxprtc driver would be much more likely to work.
+1. Many thanks. I do not know all drivers but your advice helped me a lot.
I will need to test to see if this works with PCF2127, PCF2129AT and other variants.
I will post later the results.
Im posting here, maybe somebody else might have same issues like me:
How to enable NXP PCF2127 RTC
1. Load the correct driver
* Manual
# kldload nxprtc
* Automatic, permanent
# vi /boot/loader.conf
add nxprtc_load=“YES"
2. Copy the i2c-rtc file to overlays directory
# cp i2c-rtc.dtbo /boot/msdos/overlays/
Source file: https://github.com/raspberrypi/firmware/tree/master/boot/overlays <https://github.com/raspberrypi/firmware/tree/master/boot/overlays>
3. Enable the driver under config.txt
# vi /boot/msdos/config.txt
add dtoverlay=i2c-rtc,pcf2127
4. Reboot and validate yu can see the driver attached and functional.
After reboot you should see something like this:
$ dmesg | grep nxp
nxprtc0: <NXP PCF2127 RTC> at addr 0xa2 on iicbus0
nxprtc0: WARNING: RTC battery is low
nxprtc0: registered as a time-of-day clock, resolution 0.015625s
$ sysctl -b hw.fdt.dtb | dtc -I dtb -O dts | grep pcf
pcf2127 at 51 {
compatible = "nxp,pcf2127";
Thanks,
Stefan
More information about the freebsd-arm
mailing list