imx6ul RTC error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx6ul RTC error

跳至解决方案
1,358 次查看
zhangbin_eos
Contributor III

The RTC time is faster than the system time,

RTC time 120s : system time 100s

#test RTC
root@VS-34FD:~# date -s "2020-09-05 12:06:51"
Sat Sep  5 12:06:51 UTC 2020
root@VS-34FD:~# hwclock -w
root@VS-34FD:~# date '+%a %b %e %H:%M:%S %Y' && hwclock -r
Sat Sep  5 12:06:51 2020
Sat Sep  5 12:06:51 2020  0.000000 seconds
#wait 100s
root@VS-34FD:~# date '+%a %b %e %H:%M:%S %Y' && hwclock -r
Sat Sep  5 12:08:30 2020
Sat Sep  5 12:08:51 2020  0.000000 seconds

 I don't know where to modify this deviation. Please help me

标签 (1)
0 项奖励
回复
1 解答
1,356 次查看
zhangbin_eos
Contributor III

kernel :  imx_4.1.15_2.0.0

dts:

&clks {
	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	assigned-clock-rates = <786432000>;
};
...
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;
	};
};

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,357 次查看
zhangbin_eos
Contributor III

kernel :  imx_4.1.15_2.0.0

dts:

&clks {
	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	assigned-clock-rates = <786432000>;
};
...
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;
	};
};
0 项奖励
回复