FalconChristmas / fpp

Falcon Player
http://FalconChristmas.com
Other
571 stars 202 forks source link

Add PCF8563 RTC #2071

Open sslupsky opened 2 days ago

sslupsky commented 2 days ago

Is your feature request related to a problem? Please describe. Add support for the PCF8563 RTC. This is the RTC supplied by Sancloud for use with the BBE. https://sancloud.com/beaglebone-enhanced-real-time-clock-setup-tutorial/

It appears the PCF8563 was included at one time (see #71) but it does not appear in the current (version 8.3.1) list of RTC drivers in FPP or in the directory of kernel drivers. Oddly, the PCF85363 does not appear in the drivers directory either.

I tried the Kulp RTC driver (PCF85363) but it does not appear to be compatible with the PCF8563 and the logs show the driver does not load.

2024-08-07T11:36:18.715335-06:00 FPP-Remote-1 kernel: [   21.864477] pcf85363 2-0051: failed to set xtal load capacitance: -121
2024-08-07T11:36:18.715348-06:00 FPP-Remote-1 kernel: [   21.864626] pcf85363 2-0051: pcf85363_rtc_read_time: error -121
2024-08-07T11:36:18.715361-06:00 FPP-Remote-1 kernel: [   21.935580] pcf85363 2-0051: registered as rtc0
2024-08-07T11:36:18.715409-06:00 FPP-Remote-1 kernel: [   21.935710] pcf85363 2-0051: pcf85363_rtc_read_time: error -121
2024-08-07T11:36:18.715426-06:00 FPP-Remote-1 kernel: [   22.009176] pcf85363 2-0051: hctosys: unable to read the hardware clock
2024-08-07T11:36:18.715440-06:00 FPP-Remote-1 kernel: [   22.091336] i2c i2c-2: new_device: Instantiated device pcf85363 at 0x51
2024-08-07T11:36:18.715453-06:00 FPP-Remote-1 kernel: [   22.235858] pcf85363 2-0051: pcf85363_rtc_read_time: error -121
2024-08-07T11:36:18.715466-06:00 FPP-Remote-1 kernel: [   22.357790] i2c i2c-2: delete_device: Deleting device pcf85363 at 0x51
fpp@FPP-Remote-1:~$ cd /lib/modules/6.11.0-fpp7/kernel/drivers/rtc/
fpp@FPP-Remote-1:/lib/modules/6.11.0-fpp7/kernel/drivers/rtc$ ls -al
total 76
drwxr-xr-x  2 root root 4096 Nov  7 06:42 .
drwxr-xr-x 51 root root 4096 Nov  7 06:42 ..
-rw-r--r--  1 root root 3052 Sep 24 11:49 rtc-ds1286.ko.xz
-rw-r--r--  1 root root 3276 Sep 24 11:49 rtc-ds1511.ko.xz
-rw-r--r--  1 root root 3300 Sep 24 11:49 rtc-ds1553.ko.xz
-rw-r--r--  1 root root 6560 Sep 24 11:49 rtc-ds1685.ko.xz
-rw-r--r--  1 root root 2672 Sep 24 11:49 rtc-ds1742.ko.xz
-rw-r--r--  1 root root 2572 Sep 24 11:49 rtc-ds2404.ko.xz
-rw-r--r--  1 root root 4116 Sep 24 11:49 rtc-fm3130.ko.xz
-rw-r--r--  1 root root 3568 Sep 24 11:49 rtc-hid-sensor-time.ko.xz
-rw-r--r--  1 root root 2264 Sep 24 11:49 rtc-m48t35.ko.xz
-rw-r--r--  1 root root 4156 Sep 24 11:49 rtc-m48t59.ko.xz
-rw-r--r--  1 root root 3140 Sep 24 11:49 rtc-m48t86.ko.xz
-rw-r--r--  1 root root 2308 Sep 24 11:49 rtc-msm6242.ko.xz
-rw-r--r--  1 root root 2472 Sep 24 11:49 rtc-rp5c01.ko.xz
-rw-r--r--  1 root root 3312 Sep 24 11:49 rtc-stk17ta8.ko.xz
sslupsky commented 2 days ago

I checked the datasheets for the PCF8563, PCF85363 and PCF8523 and the register maps are quite different.