Hi,
Currently we are using the colibri imx6dl V1.1 A SOM module and connecting to an external RTC of m41t01 using I2C1 on our custom board.
The device tree files and changes done is as follows:
aliases {
i2c0 = &i2c1;
i2c1 = &i2c3;
}; aliases {
rtc0 = &rtc_i2c;
rtc1 = &snvs_rtc;
}; /&i2c3 {
status = “okay”; / M41T0M6 real time clock on carrier board
rtc_i2c: rtc@68 {
compatible = “st,m41t0”;
reg = <0x68>;
};
}; / &i2c1 {
status = “okay”; / M41T0M6 real time clock on Development board*/
rtc_i2c: rtc@68 {
compatible = “st,m41t0”;
reg = <0x68>;
};
};
pinctrl_i2c1: i2c1grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1 >;
}; &i2c1 {
clock-frequency = <100000>;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_i2c1>;
scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = “okay”;
};
root@b2qt-colibri-imx6:~# dmesg | grep rtc
[ 1.805061] rtc-ds1307 0-0068: registered as rtc0
[ 1.810628] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc1
[ 2.596303] rtc-ds1307 0-0068: hctosys: unable to read the hardware clock
root@b2qt-colibri-imx6:~# hwclock -s
hwclock: ioctl(3, RTC_UIE_ON, 0) to /dev/rtc0 failed: Connection timed out
root@b2qt-colibri-imx6:~# dmesg | grep rtc
[ 1.805061] rtc-ds1307 0-0068: registered as rtc0
[ 1.810628] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc1
[ 2.596303] rtc-ds1307 0-0068: hctosys: unable to read the hardware clock
[ 57.633366] rtc-ds1307 0-0068: read error -110
[ 58.143407] rtc-ds1307 0-0068: read error -110
[ 58.653964] rtc-ds1307 0-0068: read error -110
I was able to register the RTC to rtc0, however I am getting the error when trying to assign the hwclock and also referred
Thanks in advance
Basavanagouda G