AnsweredAssumed Answered

How to enable internal RTC of i.mx6ull

Question asked by Hirotoshi Sato on Aug 7, 2018
Latest reply on Aug 7, 2018 by Hirotoshi Sato

Hi, I would like to use internal real time clock of i.mx6ull.

However I could not enable it and when I use hwclock, then it displays as follows.

hwclock: can't open '/dev/misc/rtc': No such file or directory

In fact, nothing is found by "ls | grep rtc".

 

The device tree is defined as follows.

 

imx6ull.dtsi

snvs: snvs@020cc000 {
compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
reg = <0x020cc000 0x4000>;

snvs_rtc: snvs-rtc-lp {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
regmap = <&snvs>;
offset = <0x34>;
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
};

snvs_poweroff: snvs-poweroff {
compatible = "syscon-poweroff";
regmap = <&snvs>;
offset = <0x38>;
mask = <0x61>;
};

snvs_pwrkey: snvs-powerkey {
compatible = "fsl,sec-v4.0-pwrkey";
regmap = <&snvs>;
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
linux,keycode = <KEY_POWER>;
wakeup;
};
};

 

imx6ul-imx6ull-var-dart-common.dtsi

&snvs_rtc {
status = "enabled";
};

 

How can I use the internal RTC of i.mx6ull and use "hwclock"?

Outcomes