I am using Linux-4.9.67 with an ARM device with a ds1307 compatible RTC controller on the i2c bus. Added in Kernel config
CONFIG_RTC_DRV_DS1307=y
Added the node in the device tree
&i2c4 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
ds1307: rtc@68 {
compatible = "dallas,ds1307";
reg = <0x68>;
};
};
I see it in the device list
root@csb:~# i2cdetect -y 3
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
However the problem is that the device driver is not loaded and the ds1307_probe()
is never called.
Any idea about that's missing? Thanks