A DS1339 RTC is connected to the I2C bus (i2c-cpm in mpc870). The dmesg below shows that the ds1037 driver was registered. But the hctosys.c was not able to open the rtc device rtc0. The rtc doesn't seem to be connected with I2C driver properly.
i2c-core: driver [rtc-ds1307] registered i2c /dev entries driver i2c-core: driver [dev_driver] registered fsl-i2c-cpm fa200860.i2c: cpm_i2c_setup() alloc irq_desc for 21 on node 0 alloc kstat_irqs on node 0 irq: irq 16 on host /s...@fa200000/c...@9c0/interrupt-control...@930 mapped to virtual irq 21 fsl-i2c-cpm fa200860.i2c: i2c_ram 0xfddfbc80, i2c_addr 0x1c80, freq 60000 fsl-i2c-cpm fa200860.i2c: tbase 0x0340, rbase 0x0360 i2c i2c-0: adapter [i2c-cpm] registered i2c-dev: adapter [i2c-cpm] registered as minor 0 fsl-i2c-cpm fa200860.i2c: hw routines for i2c-cpm registered. i2c-core: driver [lm75] registered TCP cubic registered NET: Registered protocol family 17 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) My I2C settings in the dts is as follows, same as the mpc885ads. i...@860 { compatible = "fsl,mpc885-i2c", "fsl,cpm1-i2c"; reg = <0x860 0x20 0x3c80 0x30>; interrupts = <16>; interrupt-parent = <&CPM_PIC>; fsl,cpm-command = <0x10>; #address-cells = <1>; #size-cells = <0>; }; Reading the fsl i2c bindings in the documentation, I found an example as follows. 27 i...@860 { 28 compatible = "fsl,mpc823-i2c", 29 "fsl,cpm1-i2c"; 30 reg = <0x860 0x20 0x3c80 0x30>; 31 interrupts = <16>; 32 interrupt-parent = <&CPM_PIC>; 33 fsl,cpm-command = <0x10>; 34 #address-cells = <1>; 35 #size-cells = <0>; 36 37 r...@68 { 38 compatible = "dallas,ds1307"; 39 reg = <0x68>; 40 }; 41 }; 42 In the above example the rtc was explicitly declared as a subnode of the i2c node. Is this the way to connect (or bind) a RTC to the I2C driver? If not how is an RTC driver (or hwmon driver) bound to the I2C driver? What is the reg (0x68) under rtc node? I set breakpoint at ds1037_probe() and was hoping that it might be hit during the driver registration. But it didn't. Would the ds1037_probe() be called during when the ds1037_driver was registered as an I2C driver? Thanks, -Shawn. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev