We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
en:pcf8563rtc [2017/02/28 17:29]
odroid [Estimated life cycle of the battery]
en:pcf8563rtc [2017/04/04 20:25]
mdrjr [Ubuntu]
Line 20: Line 20:
 odroid@odroid:​~$ sudo apt install device-tree-compiler odroid@odroid:​~$ sudo apt install device-tree-compiler
 odroid@odroid:​~$ sudo fdtput -t s /​media/​boot/​meson64_odroidc2.dtb /​i2c@c1108500/​pcf8563@51 status "​okay"​ odroid@odroid:​~$ sudo fdtput -t s /​media/​boot/​meson64_odroidc2.dtb /​i2c@c1108500/​pcf8563@51 status "​okay"​
-odroid@odroid:​~$ echo "​aml_i2c"​|sudo tee -a /​etc/​modules ​+odroid@odroid:​~$ echo "​aml_i2c"|sudo tee -a /​etc/​modules 
 +odroid@odroid:​~$ echo "​rtc_pcf8563"|sudo tee -a /​etc/​modules
 odroid@odroid:​~$ reboot</​code> ​ odroid@odroid:​~$ reboot</​code> ​
   - Check the I2C & RTC module status after reboot: ​  <​code>​odroid@odroid64:​~$ cat /​etc/​modules ​                                               - Check the I2C & RTC module status after reboot: ​  <​code>​odroid@odroid64:​~$ cat /​etc/​modules ​                                            
Line 46: Line 47:
  
 exit 0 exit 0
- 
-^G Get Help  ^O Write Out ^W Where Is  ^K Cut Text  ^J Justify ​  ^C Cur Pos 
-^X Exit      ^R Read File ^\ Replace ​  ^U Uncut Text^T To Linter ^_ Go To Line  
 odroid@odroid:​~$</​code>​ Add the following at the bottom of the page above exit 0. ^x exit and save the file. Reboot your ODROID-C2. <​code>​odroid@odroid:​~$ sudo reboot</​code>​ If everything worked correctly the RTC on ODROID-C2 should be initialised on boot and the current date and time will be loaded into Linux. You need to check the existence of "​rtc-pcf8563"​ in the output of "​lsmod"​ command when the HW RTC doesn'​t work correctly. odroid@odroid:​~$</​code>​ Add the following at the bottom of the page above exit 0. ^x exit and save the file. Reboot your ODROID-C2. <​code>​odroid@odroid:​~$ sudo reboot</​code>​ If everything worked correctly the RTC on ODROID-C2 should be initialised on boot and the current date and time will be loaded into Linux. You need to check the existence of "​rtc-pcf8563"​ in the output of "​lsmod"​ command when the HW RTC doesn'​t work correctly.
   - You can check the current time on the RTC on ODROID-C2 with: <​code>​odroid@odroid:​~$ sudo hwclock -r</​code>​ If this is the first time you have run the RTC on ODROID-C2 it will display a date of APR 20th 2016.   - You can check the current time on the RTC on ODROID-C2 with: <​code>​odroid@odroid:​~$ sudo hwclock -r</​code>​ If this is the first time you have run the RTC on ODROID-C2 it will display a date of APR 20th 2016.
Line 56: Line 54:
 <​WRAP ​ left round important 100%> <​WRAP ​ left round important 100%>
 ** Kernel update will break the RTC functionality **\\ ** Kernel update will break the RTC functionality **\\
-To avoid this problem, you need to change ​the DTB file again after Kernel update ​\\ +To avoid this problem, you can use this workaround that will patch the dtb all the time \\ 
-<​code>​sudo fdtput -t s /media/​boot/​meson64_odroidc2.dtb /​i2c@c1108500/​pcf8563@51 status "​okay"</​code>​+<​code>​sudo ​-s 
 +echo '#​!/​bin/​sh'​ > /​etc/​kernel/​postinst.d/​rtc 
 +echp 'fdtput -t s /​boot/​meson64_odroidc2.dtb /​i2c@c1108500/​pcf8563@51 status "​okay"​' >> /​etc/​kernel/​postinst.d/​rtc 
 +chmod +x /​etc/​kernel/​postinst.d/​rtc</​code>​ 
 </​WRAP>​ \\ </​WRAP>​ \\
 ==== Android ==== ==== Android ====
en/pcf8563rtc.txt · Last modified: 2017/07/28 11:26 by luke.go
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0