How to enable internal RTC of i.mx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable internal RTC of i.mx6ull

2,833 Views
shaot
Contributor II

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"?

Labels (4)
0 Kudos
3 Replies

1,813 Views
igorpadykov
NXP Employee
NXP Employee

Hi Hirotoshi

one can test with Demo Image unit tests (folder../mxc_rtc)

imx-test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

i.MX 6ULL NXP EVK Linux Binary Demo Files

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_iMX6ULL&appType=license&location=null&Pare... 

Best regards
igor

0 Kudos

1,813 Views
shaot
Contributor II

Thank you for your reply. However I do not use i.mx6ull EVK but I use other board.

So I have to edit my sources. Would you give me the source files not binary?

Or are there any register which should be editted to enable i.mx6ull internal RTC?

0 Kudos

1,813 Views
linda_zhang
Contributor IV

Hello,

Normally, if there is RTC driver, there will have below information when booting:

snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)

We are testing on our MYD-Y6ULX board.

0 Kudos