I've been struggling with clock accuracy for some time. If I don't put pullup resistors on P8-33 and P8-34 (lcd_data14 and lcd_data15) then I get the wrong OMAP clocksource frequency and my system clock runs way too fast for timesync or ntpd to correct it.
Apparently my actual timer speed is 26mHz, but with the two pins floating the system erroneously picks 24mHz:
debian@beaglebone:~$ dmesg | grep -i timer
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000058] OMAP clocksource: timer1 at 24000000 Hz
[ 0.002420] timer_probe: no matching timers found
[ 0.629322] clocksource: Switched to clocksource timer1
This is with the latest kernel I can find - 4.14.79-ti-r89 (debian 9.6 2019-01-06). I have the same problem with my original kernel, which is 4.4.21-ti-r47.
It doesn't seem right that I should have to use pullup resistors to get the right clock speed. What could be causing this? My board is plugged into a fairly complex custom cape, but the two pins mentioned above are floating.
If there's a simple software fix, that would be lovely. Creating an overlay with the two pins set to pullup doesn't work. I'm assuming that the overlay is not processed until after the pin states have been read in the boot process.
I have checked out the kernel source for 4.18.20, so I can get into the source and make changes if that's the only way.