0

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

0andriy
  • 4,183
  • 1
  • 24
  • 37
Marco
  • 79
  • 1
  • 9
  • Great article on a similar issue here https://programmer.group/note-6-reasons-for-not-executing-i2c-driver-probe-function-after-linux-3.0.html – Marco Nov 11 '20 at 14:52
  • Enable `initcall_debug ignore_loglevel` in your kernel command line and see what it says. – 0andriy Nov 12 '20 at 12:00

1 Answers1

0

Everything in the question was OK. The problem was caused by hardware issue.

Marco
  • 79
  • 1
  • 9