piknew

Members
  • Content Count

    92
  • Joined

  • Last visited

About piknew

  • Rank
    Advanced Member

Recent Profile Visitors

563 profile views
  1. piknew

    OrangePi PC CPU Frequency

    I will change it on one of my platforms to verify. It will be Orange Pi+ 2 - just a moment ago I have changed it back to original package version (with "408") and rebooted: ___ ____ _ / _ \ _ __ __ _ _ __ __ _ ___ | _ \(_) _ | | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | |_| |_ | |_| | | | (_| | | | | (_| | __/ | __/| |_ _| \___/|_| \__,_|_| |_|\__, |\___| |_| |_| |_| |___/ Welcome to ARMBIAN 5.70 stable Debian GNU/Linux 9 (stretch) 4.19.13-sunxi System load: 1.43 0.34 0.11 Up time: 0 min Memory usage: 3 % of 2014MB IP: 192.168.10.230 CPU temp: 61°C Usage of /: 16% of 15G Last login: Mon Jan 14 17:56:01 2019 from 192.168.10.210 [root@PKHELPER ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=408000 MAX_SPEED=1296000 GOVERNOR=ondemand [root@PKHELPER ~]# date && uptime Mon Jan 14 17:58:24 CET 2019 17:58:24 up 0 min, 1 user, load average: 0.73, 0.29, 0.10 [root@PKHELPER ~]# apt list --installed | grep next WARNING: apt does not have a stable CLI interface. Use with caution in scripts. linux-dtb-next-sunxi/stretch,now 5.70 armhf [installed] linux-headers-next-sunxi/stretch,now 5.70 armhf [installed] linux-image-next-sunxi/stretch,now 5.70 armhf [installed] linux-stretch-root-next-orangepiplus/stretch,now 5.70 armhf [installed] linux-u-boot-orangepiplus-next/stretch,now 5.70 armhf [installed] [root@PKHELPER ~]#
  2. piknew

    OrangePi PC CPU Frequency

    @Igor, with latest upgrade the "typo" (408 vs 480) is still in cpufrequtils. Is there a chance (I mean: time to do it) to have it corrected in the source? THe related thread:
  3. Still OK (I can confirm this for all of my "orange" SBCs): [root@PKBACKUP ~]# date Mon Oct 29 20:21:27 CET 2018 [root@PKBACKUP ~]# uptime 20:21:32 up 8 days, 2:32, 1 user, load average: 0.10, 0.03, 0.01 [root@PKBACKUP ~]# ll /etc/default/cpufrequtils -r--r--r-- 1 root root 175 Oct 18 18:01 /etc/default/cpufrequtils [root@PKBACKUP ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=480000 MAX_SPEED=1296000 GOVERNOR=ondemand #GOVERNOR=performance [root@PKBACKUP ~]#
  4. After correcting cpufrequtils file - no issues so far: [root@PKBACKUP ~]# date Fri Oct 26 11:03:47 CEST 2018 [root@PKBACKUP ~]# uptime 11:03:53 up 4 days, 16:14, 1 user, load average: 0.00, 0.00, 0.00 [root@PKBACKUP ~]# ll /etc/default/cpufrequtils -r--r--r-- 1 root root 175 Oct 18 18:01 /etc/default/cpufrequtils [root@PKBACKUP ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=480000 MAX_SPEED=1296000 GOVERNOR=ondemand #GOVERNOR=performance [root@PKBACKUP ~]# Anybody else (who's SBC was impacted by this issue) can verify the same?
  5. I referred to your post in: I guess the other thread is better to analyze this finding.
  6. For now I have modified cpufrequtils as following for my three boards (orangepipc, orangepiplus 2 GB, orangepiplus2e): [root@PKBACKUP ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=480000 MAX_SPEED=1296000 GOVERNOR=ondemand #GOVERNOR=performance For orangepizero as following: [root@PKOTHER ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=240000 MAX_SPEED=1200000 GOVERNOR=ondemand #GOVERNOR=performance Only orangepiplus2e is somehow loaded. With my own backup software, which is run twice a day - but in the past it was enough to freeze the board after a few days. I will update if the change helped or not. Question: I have noticed that orangepizero is using lower "MAX" settings. I understand as this device had an issue with overheating. How about other platforms, why lowest frequency settings is 480 MHz, not 240 MHz (which is also supported by H3)? Some results for my platforms (please note that 816 MHz is common lowest choice for H3): orangepiplu2e: [root@PKBACKUP ~]# armbianmonitor -m Stop monitoring using [ctrl]-[c] Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St. 16:36:53: 1296MHz 0.00 6% 1% 2% 0% 1% 0% 42.5°C 0/9 16:36:58: 816MHz 0.00 0% 0% 0% 0% 0% 0% 43.0°C 0/9 16:37:03: 816MHz 0.00 0% 0% 0% 0% 0% 0% 42.8°C 0/9 16:37:08: 816MHz 0.00 0% 0% 0% 0% 0% 0% 42.8°C 0/9 16:37:14: 816MHz 0.00 0% 0% 0% 0% 0% 0% 40.2°C 0/9 16:37:19: 816MHz 0.00 0% 0% 0% 0% 0% 0% 43.4°C 0/9 16:37:24: 816MHz 0.00 0% 0% 0% 0% 0% 0% 41.7°C 0/9 16:37:29: 816MHz 0.00 0% 0% 0% 0% 0% 0% 41.6°C 0/9 16:37:34: 816MHz 0.00 0% 0% 0% 0% 0% 0% 42.5°C 0/9^C orangepiplus: [root@PKHELPER ~]# armbianmonitor -m Stop monitoring using [ctrl]-[c] Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St. 16:39:34: 816MHz 0.13 0% 0% 0% 0% 0% 0% 44.2°C 0/9 16:39:39: 1296MHz 0.18 0% 0% 0% 0% 0% 0% 43.8°C 0/9 16:39:44: 816MHz 0.17 0% 0% 0% 0% 0% 0% 43.9°C 0/9 16:39:49: 1296MHz 0.16 0% 0% 0% 0% 0% 0% 43.7°C 0/9 16:39:54: 816MHz 0.14 0% 0% 0% 0% 0% 0% 44.0°C 0/9 16:39:59: 1296MHz 0.13 0% 0% 0% 0% 0% 0% 44.3°C 0/9 16:40:04: 816MHz 0.12 0% 0% 0% 0% 0% 0% 44.3°C 0/9 16:40:09: 816MHz 0.11 0% 0% 0% 0% 0% 0% 43.7°C 0/9 16:40:15: 816MHz 0.10 0% 0% 0% 0% 0% 0% 43.1°C 0/9 16:40:20: 816MHz 0.09 0% 0% 0% 0% 0% 0% 43.7°C 0/9^C orangepipc: [root@PKTEST ~]# armbianmonitor -m Stop monitoring using [ctrl]-[c] Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St. 16:41:11: 1296MHz 0.07 0% 0% 0% 0% 0% 0% 35.7°C 0/9 16:41:16: 816MHz 0.06 0% 0% 0% 0% 0% 0% 36.7°C 0/9 16:41:21: 816MHz 0.06 0% 0% 0% 0% 0% 0% 36.8°C 0/9 16:41:26: 816MHz 0.05 0% 0% 0% 0% 0% 0% 35.7°C 0/9 16:41:31: 816MHz 0.05 0% 0% 0% 0% 0% 0% 35.9°C 0/9 16:41:37: 816MHz 0.04 0% 0% 0% 0% 0% 0% 36.5°C 0/9 16:41:42: 816MHz 0.04 0% 0% 0% 0% 0% 0% 35.8°C 0/9 16:41:47: 816MHz 0.04 0% 0% 0% 0% 0% 0% 36.4°C 0/9 16:41:52: 816MHz 0.03 0% 0% 0% 0% 0% 0% 36.2°C 0/9^C orangepizero: [root@PKOTHER ~]# armbianmonitor -m Stop monitoring using [ctrl]-[c] Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St. 16:42:33: 1200MHz 0.00 0% 0% 0% 0% 0% 0% 43.0°C 0/8 16:42:38: 648MHz 0.00 0% 0% 0% 0% 0% 0% 43.1°C 0/8 16:42:43: 648MHz 0.00 0% 0% 0% 0% 0% 0% 43.1°C 0/8 16:42:48: 648MHz 0.00 0% 0% 0% 0% 0% 0% 42.6°C 0/8 16:42:54: 648MHz 0.08 0% 0% 0% 0% 0% 0% 42.5°C 0/8 16:42:59: 648MHz 0.07 0% 0% 0% 0% 0% 0% 43.6°C 0/8 16:43:04: 648MHz 0.06 0% 0% 0% 0% 0% 0% 43.0°C 0/8 16:43:09: 648MHz 0.06 0% 0% 0% 0% 0% 0% 42.6°C 0/8^C
  7. Could you please take a look here: Considering that when running on performance mode - system seems to be stable but once switched to "ondemand" - unstable. May the "mismatch" be the root cause here?
  8. Could you please point out how to achieve this? All my H3 (also H2+) devices suffer from the issue as described. Even with newest kernel. So, after reading I decided to test stability with "constant cpu frequency". EDIT: I've done it by: [root@PKTEST ~]# cat /etc/default/cpufrequtils # WARNING: this file will be replaced on board support package (linux-root-...) upgrade ENABLE=true MIN_SPEED=408000 MAX_SPEED=1296000 #GOVERNOR=ondemand GOVERNOR=performance [root@PKTEST ~]# Question: would it be possible not to overwrite cpufrequtils file once support package is installed/upgraded?
  9. piknew

    RTC 1307 / 3232

    SUCCESS Story: I have used armbian-config to check Hardware (if my I2C bus is enabled). I have noticed very strange behavior of function: grep was outputted in "usage" mode. I revieved all the scripts and it appeared that line which is searching for "overlays=" is throwing this error. My /boot/armbianEnv.txt didn't have any overlay, especially for I2C, enabled. So, I have added as following (+ overlay prefix): [root@PKTEST ~]# cat /boot/armbianEnv.txt rootdev=UUID=f8301761-6756-4f97-aa80-12c05ea037cf extraargs=pty.legacy_count=2 overlays=i2c0 i2c1 i2c2 user_overlays=ds1307 overlay_prefix=sun8i-h3 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x10b8:u [root@PKTEST ~]# Then I have modified my user overlay file to be as following: [root@PKTEST ~]# cat /boot/overlay-user/ds1307.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; /* * Aliases can be used to set the external RTC as rtc0 * Needs supplying the correct path to the I2C controller RTC is connected to, * this example is for I2C1 on H3 * NOTE: setting time at boot by the kernel * may not work in some cases if the external RTC module is loaded too late */ fragment@0 { target-path = "/aliases"; __overlay__ { rtc0 = "/soc/i2c@1c2ac00/ds1307@68"; }; }; fragment@1 { target = <&i2c0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds1307@68 { compatible = "dallas,ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST ~]# The address in fragment@0 is determined by looking where system placed i2c0 bus (I am sure that my RTC is connected to bus 0). It is giving /dev/rtc1,m which I have verified as following: [root@PKTEST ~]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 May 22 2016 /dev/rtc1 [root@PKTEST ~]# hwclock -r -f /dev/rtc0 Sun 22 May 2016 12:38:25 AM CEST -1.593015 seconds [root@PKTEST ~]# hwclock -r -f /dev/rtc1 Fri 05 Oct 2018 11:57:03 AM CEST -0.927469 seconds [root@PKTEST ~]# Unfortunately it seems that line frogment@0 is not making this device available as rtc0 (it is assigning rtc1): [root@PKTEST ~]# dmesg | grep -i rtc [ 3.636229] [drm] Cannot find any crtc or sizes [ 3.756932] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0 [ 3.756939] sun6i-rtc 1f00000.rtc: RTC enabled [ 4.641465] [drm] Cannot find any crtc or sizes [ 9.740172] rtc-ds1307 0-0068: /aliases ID 0 not available [ 9.741555] rtc-ds1307 0-0068: registered as rtc1 [root@PKTEST ~]# Can anybody help and answer if it is possible somehow "override" the device? Of course I have my own systemd script to use it and set correct date at boot time. If "overriding" is not possible then I will use it.
  10. piknew

    RTC 1307 / 3232

    Definitely not (PKTEST is Orange Pi PC) - I also checked on OPI+2 with the same results (FAILED on "dev"). But I will try to downgrade to "next" on OPiPC (PKTEST). I will give an update in matter of minutes. Update: "next" is the same. But then I have downgraded to "Default" and: [root@PKTEST ~]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST ~]# cd /sys/class/i2c-adapter/i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll /dev/rtc* crw------- 1 root root 254, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 254, 1 Oct 4 18:36 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# hwclock -r -f /dev/rtc1 Thu 04 Oct 2018 06:36:46 PM CEST -0.853544 seconds [root@PKTEST /sys/class/i2c-adapter/i2c-0]#
  11. piknew

    RTC 1307 / 3232

    I am not sure if the path is correct - I used the one from dts file (in post above). It seems that "something" is there. However, I2C detect does not see any device under address 0x68. I am also not sure if aliases section of dts file will somehow override visibility of standard rtc0 device from SOC? Below are a few commands. [root@PKTEST /proc/device-tree/soc/i2c@1c2b000]# ll total 0 -r--r--r-- 1 root root 24 Oct 4 17:32 compatible -r--r--r-- 1 root root 8 Oct 4 17:32 clocks -r--r--r-- 1 root root 8 Oct 4 17:32 resets -r--r--r-- 1 root root 9 Oct 4 17:32 status -r--r--r-- 1 root root 4 Oct 4 17:32 #address-cells -r--r--r-- 1 root root 12 Oct 4 17:32 interrupts -r--r--r-- 1 root root 4 Oct 4 17:32 #size-cells drwxr-xr-x 2 root root 0 Oct 4 17:32 ds1307@68 -r--r--r-- 1 root root 4 Oct 4 17:32 phandle -r--r--r-- 1 root root 8 Oct 4 17:32 reg -r--r--r-- 1 root root 4 Oct 4 17:32 pinctrl-0 -r--r--r-- 1 root root 4 Oct 4 17:32 name -r--r--r-- 1 root root 8 Oct 4 17:32 pinctrl-names [root@PKTEST /proc/device-tree/soc/i2c@1c2b000]# cd ds1307@68/ [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# ll total 0 -r--r--r-- 1 root root 14 Oct 4 17:32 compatible -r--r--r-- 1 root root 5 Oct 4 17:32 status -r--r--r-- 1 root root 4 Oct 4 17:32 reg -r--r--r-- 1 root root 7 Oct 4 17:32 name [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# dmesg | grep -i ds1307 [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# dmesg | grep -i rtc [ 3.625735] [drm] Cannot find any crtc or sizes [ 3.746859] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0 [ 3.746865] sun6i-rtc 1f00000.rtc: RTC enabled [ 4.640512] [drm] Cannot find any crtc or sizes [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: 30 -- 32 33 34 35 36 37 -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /proc/device-tree/soc/i2c@1c2b000/ds1307@68]#
  12. piknew

    RTC 1307 / 3232

    Thanks, I have updated device-tree-compiler to "buster" version and I have created symbolic link from modules/... to dtc binary. Script armbian-add-overlay is working. But after compiling new dts - rtc is still not working (not registered as rtc device).
  13. piknew

    RTC 1307 / 3232

    Additionally I have noticed that example file is different slightly than mine: https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/i2c-ds1307.dts Unfortunately I cannot compile new dts file: [root@PKTEST ~]# uname -r 4.18.8-sunxi [root@PKTEST ~]# cd /lib/modules/4.18.8-sunxi/build/scripts/dtc [root@PKTEST /lib/modules/4.18.8-sunxi/build/scripts/dtc]# ll total 304 drwxr-xr-x 2 root root 4096 Oct 2 20:32 libfdt drwxr-xr-x 2 root root 4096 Oct 2 20:32 include-prefixes -rw-r--r-- 1 root root 42 Oct 2 20:32 version_gen.h -rw-r--r-- 1 root root 7888 Oct 2 20:32 util.h -rw-r--r-- 1 root root 9622 Oct 2 20:32 util.c -rwxr-xr-x 1 root root 2552 Oct 2 20:32 update-dtc-source.sh -rw-r--r-- 1 root root 6158 Oct 2 20:32 treesource.c -rw-r--r-- 1 root root 3624 Oct 2 20:32 srcpos.h -rw-r--r-- 1 root root 6859 Oct 2 20:32 srcpos.c -rw-r--r-- 1 root root 372 Oct 2 20:32 Makefile.dtc -rw-r--r-- 1 root root 956 Oct 2 20:32 Makefile -rw-r--r-- 1 root root 21011 Oct 2 20:32 livetree.c -rw-r--r-- 1 root root 4 Oct 2 20:32 .gitignore -rw-r--r-- 1 root root 2283 Oct 2 20:32 fstree.c -rw-r--r-- 1 root root 22682 Oct 2 20:32 flattree.c -rw-r--r-- 1 root root 8546 Oct 2 20:32 fdtput.c -rw-r--r-- 1 root root 8781 Oct 2 20:32 fdtget.c -rw-r--r-- 1 root root 3756 Oct 2 20:32 fdtdump.c -rwxr-xr-x 1 root root 8755 Oct 2 20:32 dtx_diff -rwxr-xr-x 1 root root 41838 Oct 2 20:32 dt_to_config -rw-r--r-- 1 root root 10590 Oct 2 20:32 dtc-parser.y -rw-r--r-- 1 root root 7043 Oct 2 20:32 dtc-lexer.l -rw-r--r-- 1 root root 8736 Oct 2 20:32 dtc.h -rw-r--r-- 1 root root 9477 Oct 2 20:32 dtc.c -rw-r--r-- 1 root root 5253 Oct 2 20:32 data.c -rw-r--r-- 1 root root 45534 Oct 2 20:32 checks.c [root@PKTEST /lib/modules/4.18.8-sunxi/build/scripts/dtc]# cd /boot/overlay-user/ [root@PKTEST /boot/overlay-user]# ll total 8 -rw-r--r-- 1 root root 401 May 13 18:11 ds1307.dtbo -rw-r--r-- 1 root root 770 Oct 4 12:29 ds1307.dts [root@PKTEST /boot/overlay-user]# rm ds1307.dtbo [root@PKTEST /boot/overlay-user]# cat ds1307.dts /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; /* * Aliases can be used to set the external RTC as rtc0 * Needs supplying the correct path to the I2C controller RTC is connected to, * this example is for I2C1 on H3 * NOTE: setting time at boot by the kernel * may not work in some cases if the external RTC module is loaded too late */ fragment@0 { target-path = "/aliases"; __overlay__ { rtc0 = "/soc/i2c@01c2b000/ds1307@68"; }; }; fragment@1 { target = <&i2c1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds1307@68 { compatible = "dallas,ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST /boot/overlay-user]# armbian-add-overlay ds1307.dts Error: kernel headers are not installed properly Can't find dtc that supports compiling overlays Please install the headers package for kernel 4.18.8-sunxi [root@PKTEST /boot/overlay-user]#
  14. piknew

    RTC 1307 / 3232

    Hi, as written above everything is working correctly with "next" (4.14.70) and "default" (3.4.113) kernels. For some of my boards I have upgraded to dev. And unfortunately module stopped working. It seems that overlay method is mot causing that rtc device is registered. Here is my ds1307.dts file: [root@PKTEST /boot/overlay-user]# ll total 8 -rw-r--r-- 1 root root 271 May 13 18:11 ds1307.dts -rw-r--r-- 1 root root 401 May 13 18:11 ds1307.dtbo [root@PKTEST /boot/overlay-user]# cat ds1307.dts /dts-v1/; /plugin/; / { compatible = "brcm,bcm2708"; fragment@0 { target = <&i2c0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; ds1307@68 { compatible = "ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; [root@PKTEST /boot/overlay-user]# After boot it is as folllowing: [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-2 -> ../../devices/platform/soc/1f02400.i2c/i2c-2 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-1 -> ../../devices/platform/soc/1c2ac00.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd i2c-2 [root@PKTEST /sys/class/i2c-adapter/i2c-2]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 4 root root 0 Jan 1 1970 2-0065 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:47 power lrwxrwxrwx 1 root root 0 Oct 4 11:47 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 --w------- 1 root root 4096 Oct 4 11:47 new_device -r--r--r-- 1 root root 4096 Oct 4 11:47 name lrwxrwxrwx 1 root root 0 Oct 4 11:47 device -> ../../1f02400.i2c --w------- 1 root root 4096 Oct 4 11:47 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-2]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 1-0068 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev lrwxrwxrwx 1 root root 0 Oct 4 11:48 device -> ../../1c2ac00.i2c drwxr-xr-x 2 root root 0 Oct 4 11:48 power lrwxrwxrwx 1 root root 0 Oct 4 11:48 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1c2ac00 --w------- 1 root root 4096 Oct 4 11:48 new_device -r--r--r-- 1 root root 4096 Oct 4 11:48 name --w------- 1 root root 4096 Oct 4 11:48 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd 1-0068 [root@PKTEST /sys/class/i2c-adapter/i2c-1/1-0068]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:48 power lrwxrwxrwx 1 root root 0 Oct 4 11:48 of_node -> ../../../../../../firmware/devicetree/base/soc/i2c@1c2ac00/ds1307@68 -r--r--r-- 1 root root 4096 Oct 4 11:48 name -r--r--r-- 1 root root 4096 Oct 4 11:48 modalias [root@PKTEST /sys/class/i2c-adapter/i2c-1/1-0068]# cd ../../i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:48 power --w------- 1 root root 4096 Oct 4 11:48 new_device -r--r--r-- 1 root root 4096 Oct 4 11:48 name lrwxrwxrwx 1 root root 0 Oct 4 11:48 device -> ../../1ee0000.hdmi --w------- 1 root root 4096 Oct 4 11:48 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# Additionally I have verified and swtched off overlay method in armbianEnv.txt file. The used method used for "Default" (echo to new_device). rtc1 is registered but cannot be effectively used: [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-1 -> ../../devices/platform/soc/1f02400.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Jan 1 1970 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd [root@PKTEST ~]# cat /boot/armbianEnv.txt verbosity=0 rootdev=UUID=f8301761-6756-4f97-aa80-12c05ea037cf extraargs=pty.legacy_count=2 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x10b8:u [root@PKTEST ~]# cd /sys/class/i2c-adapter/ [root@PKTEST /sys/class/i2c-adapter]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:40 i2c-1 -> ../../devices/platform/soc/1f02400.i2c/i2c-1 lrwxrwxrwx 1 root root 0 Oct 4 11:40 i2c-0 -> ../../devices/platform/soc/1ee0000.hdmi/i2c-0 [root@PKTEST /sys/class/i2c-adapter]# cd i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev lrwxrwxrwx 1 root root 0 Oct 4 11:40 device -> ../../1ee0000.hdmi drwxr-xr-x 2 root root 0 Oct 4 11:40 power --w------- 1 root root 4096 Oct 4 11:40 new_device -r--r--r-- 1 root root 4096 Oct 4 11:40 name --w------- 1 root root 4096 Oct 4 11:40 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd .. [root@PKTEST /sys/class/i2c-adapter]# cd i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../bus/i2c drwxr-xr-x 4 root root 0 Jan 1 1970 1-0065 drwxr-xr-x 3 root root 0 Jan 1 1970 i2c-dev drwxr-xr-x 2 root root 0 Oct 4 11:41 power lrwxrwxrwx 1 root root 0 Oct 4 11:41 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 --w------- 1 root root 4096 Oct 4 11:41 new_device -r--r--r-- 1 root root 4096 Oct 4 11:41 name lrwxrwxrwx 1 root root 0 Oct 4 11:41 device -> ../../1f02400.i2c --w------- 1 root root 4096 Oct 4 11:41 delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd .. [root@PKTEST /sys/class/i2c-adapter]# i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: 30 31 32 33 34 35 36 37 -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /sys/class/i2c-adapter]# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- [root@PKTEST /sys/class/i2c-adapter]# cd i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# dmesg | tail -10 [ 10.207986] zram0: detected capacity change from 0 to 52428800 [ 10.464198] EXT4-fs (zram0): mounted filesystem without journal. Opts: discard [ 10.560357] thermal thermal_zone0: failed to read out thermal zone (-110) [ 11.600361] thermal thermal_zone0: failed to read out thermal zone (-110) [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:40 device -> ../../1ee0000.hdmi lrwxrwxrwx 1 root root 0 Oct 4 11:40 subsystem -> ../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:40 power --w------- 1 root root 4096 Oct 4 11:40 delete_device drwxr-xr-x 3 root root 0 Oct 4 11:40 i2c-dev -rw-r--r-- 1 root root 4096 Oct 4 11:40 uevent -r--r--r-- 1 root root 4096 Oct 4 11:40 name --w------- 1 root root 4096 Oct 4 11:41 new_device drwxr-xr-x 5 root root 0 Oct 4 11:41 0-0068 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 Oct 4 11:41 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# hwclock -r -f /dev/rtc1 hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 10.560357] thermal thermal_zone0: failed to read out thermal zone (-110) [ 11.600361] thermal thermal_zone0: failed to read out thermal zone (-110) [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 crw------- 1 root root 253, 1 Oct 4 11:41 /dev/rtc1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# hwclock -r -f /dev/rtc1 hwclock: ioctl(RTC_RD_TIME) to /dev/rtc1 to read the time failed: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-1]# cd ../i2c-0 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# echo 0x68 >delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-0]# dmesg | tail -10 [ 13.280939] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 13.280991] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-0]# cd ../i2c-1 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device -bash: echo: write error: Invalid argument [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll total 0 lrwxrwxrwx 1 root root 0 Oct 4 11:41 device -> ../../1f02400.i2c lrwxrwxrwx 1 root root 0 Oct 4 11:41 subsystem -> ../../../../../bus/i2c drwxr-xr-x 2 root root 0 Oct 4 11:41 power drwxr-xr-x 4 root root 0 Oct 4 11:41 1-0065 --w------- 1 root root 4096 Oct 4 11:41 delete_device drwxr-xr-x 3 root root 0 Oct 4 11:41 i2c-dev -rw-r--r-- 1 root root 4096 Oct 4 11:41 uevent -r--r--r-- 1 root root 4096 Oct 4 11:41 name lrwxrwxrwx 1 root root 0 Oct 4 11:41 of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 drwxr-xr-x 3 root root 0 Oct 4 11:42 1-0068 --w------- 1 root root 4096 Oct 4 11:43 new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo 0x68 >delete_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 15.604092] random: crng init done [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [ 226.135079] i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16) [ 237.022019] i2c i2c-1: delete_device: Deleting device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# echo ds1307 0x68 >new_device [root@PKTEST /sys/class/i2c-adapter/i2c-1]# dmesg | tail -10 [ 15.604102] random: 7 urandom warning(s) missed due to ratelimiting [ 109.520532] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68 [ 109.544732] rtc-ds1307 0-0068: registered as rtc1 [ 154.367483] rtc-ds1307 0-0068: read error -5 [ 166.008663] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [ 195.468248] rtc-ds1307 0-0068: read error -5 [ 209.625152] i2c i2c-0: delete_device: Deleting device ds1307 at 0x68 [ 226.135079] i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16) [ 237.022019] i2c i2c-1: delete_device: Deleting device ds1307 at 0x68 [ 247.317683] i2c i2c-1: new_device: Instantiated device ds1307 at 0x68 [root@PKTEST /sys/class/i2c-adapter/i2c-1]# ll /dev/rtc* crw------- 1 root root 253, 0 May 22 2016 /dev/rtc0 lrwxrwxrwx 1 root root 4 May 22 2016 /dev/rtc -> rtc0 [root@PKTEST /sys/class/i2c-adapter/i2c-1]#
  15. My plan is (on Friday - when I get physical access to device): 1. Unplug network cable and plug in into built-in eth0 port if successful then get logs/dmesg etc. 2. Move the device neat to PC (or laptop near to this board), connect by UART and try to login (of course I know that it is without initial login prompt). Fortunately I am using portable UPS, so there should be no issue. Any more suggestions? As topic is basically related to other (unfortunately other users the do not confirmed if connect by ssh is working (without debug option it seems that connection is not done at all).