Hi, I am trying to use RTC DS3231 but doesn’t work I use BananaPro under
-Version-
Kernel : Linux 3.4.103 (armv7l)
Compiled : #4 SMP PREEMPT Thu Dec 18 12:55:58 CST 2014
C Library : Unknown
Default C Compiler : GNU C Compiler version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3)
Distribution : Ubuntu 14.04.1 LTS
I attached RTC and did the following:
bananapi@lemaker:~$ i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: 70 -- 72 73 74 75 76 77
I have several I2C-units attached which are working perfectly. 0x68 is the RTC Adress which is resonding under i2cget
Then I did
bananapi@lemaker:~$ echo "ds3231 0x68" | sudo tee /sys/class/i2c-adapter/i2c-2/new_device
ds3231 0x68
bananapi@lemaker:~$ ls /sys/class/i2c-adapter/i2c-2
2-0068 device name power uevent
delete_device i2c-dev new_device subsystem
2-0068 is the newly ceated file
bananapi@lemaker:~$ cat /sys/class/i2c-adapter/i2c-2/2-0068/name
ds3231
bananapi@lemaker:~$ cat /sys/class/i2c-adapter/i2c-2/2-0068/uevent
MODALIAS=i2c:ds3231
bananapi@lemaker:~$ ls /sys/class/i2c-adapter/i2c-2/2-0068
modalias name power subsystem uevent
bananapi@lemaker:~$ cat /sys/class/i2c-adapter/i2c-2/2-0068/modalias
i2c:ds3231
bananapi@lemaker:~$ dmesg|grep ds3231
[ 262.288400] i2c i2c-2: new_device: Instantiated device ds3231 at 0x68
bananapi@lemaker:~$ hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
bananapi@lemaker:~$ hwclock --debug
hwclock von util-linux 2.20.1
hwclock: Konnte /dev/rtc nicht öffnen: Keine Berechtigung
Keine brauchbare Uhrschnittstelle gefunden.
hwclock: Cannot access the Hardware Clock via any known method.
/dev/rtc1 never appears
What iam missing ?