Ok, I've updated and installed overlays again. No more errors in dmesg 
while read/write to RTC1, only init messages:

[    4.293079] rtc-ds1307 1-0068: SET TIME!
[    4.295910] rtc-ds1307 1-0068: rtc core: registered mcp7940x as rtc1
[    4.295938] rtc-ds1307 1-0068: 64 bytes nvram

but RTC1 is not accessible:

root@beaglebone:/lib/firmware# date
Thu Nov  9 10:34:42 CET 2017
root@beaglebone:/lib/firmware# hwclock --rtc=/dev/rtc1
hwclock: Timed out waiting for time change.
hwclock: The Hardware Clock registers contain values that are either 
invalid (e.g. 50th day of month) or beyond the range we can handle (e.g. 
Year 2095).
root@beaglebone:/lib/firmware# hwclock --rtc=/dev/rtc1 --systohc
hwclock: Timed out waiting for time change.

Can't read or set valid time.

my boot/uEnv.txt file contains:

uname_r=4.4.96-bone20
cmdline=coherent_pool=1M quiet init=/lib/systemd/systemd
dtb=am335x-boneblack-emmc-overlay.dtb
cape_enable=bone_capemgr.enable_partno=BB-RTC-01,BB-UART1,BB-UART2,BB-UART4,BB-UART5

When old kernel 4.4.39-bone15 is used rtc is registered as below and is 
working fine:
[    1.186751] rtc-ds1307 1-0068: SET TIME!
[    1.189263] rtc-ds1307 1-0068: rtc core: registered ds1338 as rtc1
[    1.189293] rtc-ds1307 1-0068: 56 bytes nvram

but after update and install overlays I got same error:
hwclock: The Hardware Clock registers contain values that are either 
invalid (e.g. 50th day of month) or beyond the range we can handle (e.g. 
Year 2095).

So, I've change file src/arm/BB-RTC-01-00A0.dts section:
mcp7940x@68 {
compatible = "microchip,mcp7940x";
reg = <0x68>;
};
to compatible value from old version:
compatible = "maxim,ds1338";

After this and update/install/reboot, rtc1 is working again! :)
Next step is to check if it will be working with newest kernel aswell. It 
works!

The question is, why compatible "maxim,ds1338" was changed to 
"microchip,mcp7940x"?
Why aliases (rtc1 = "/ocp/rtc@44e3e000") are not equal to kernel values: 
omap_rtc 
44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0? But this maybe 
doesn't matter.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/24c70cdf-ef0a-4955-becf-b751b7402ff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to