Mod-RTC on A13 olinuxino

Started by sandro, January 07, 2013, 10:33:22 AM

Previous topic - Next topic

sandro

hi to all,
I have a A13-OLinuXino.
I connect on it a mod-rtc on the UETX, but i don't know as I must use it to have a RTC.
Can you help me?
Thanks

sandro

Hi, I found this solution.
By i2cdetect I found it have 51 as address in i2c2.
Like here (http://www.susa.net/wordpress/2012/06/raspberry-pi-pcf8563-real-time-clock-rtc/) I try to insert the module by
modprobe rtc-pcf8563
but the module is not present.

So I have recompiled the kernel as in the guide (https://www.olimex.com/wiki/Build_Bootable_SD_Card_with_Debian#Building_the_Kernel)
enabling the module
driver-> rtc-> philips 8563.

With new kernel I can loud the module
modprobe rtc-pcf8563

then I can write the date from system to hwclock by
hwclock --rtc=/dev/rtc1 --systohc

or form hwclock to syst
hwclock --rtc=/dev/rtc1 --hctosys

If you have a better solution comunicate it here please.
Thanks
Ciao

Tele

#2
Maybe a little bit simpler if you modify script.bin

In your script.fex file you can find that somewhere:


[rtc_para]
rtc_used = 1
rtc_name = "pcf8563"
rtc_twi_id = 1
rtc_twi_addr = 81


Now you modify twi_id to 2 :

[rtc_para]
rtc_used = 1
rtc_name = "pcf8563"
rtc_twi_id = 2
rtc_twi_addr = 81

then compile script.fex to script.bin, then overwrite the one on the SD card.

And thats all. From now your kernel will try to use the pcf8563 on the i2c-2 bus at 81(0x51) address.
And thats your UEXT-RTC module.

You dont need to enable Phillips module, because the sun5i-rtc driver is able to handle pcf8563.