cancel
Showing results for 
Search instead for 
Did you mean: 

stm32_rtc: Prescaler config failed

MSK
Associate II

Hi all,

I'm developing a custom board based on STM32MP153 SoC, and I need to use the internal RTC. I also need to output its 32.768kHz reference clock from I8 pin.

As stated at https://wiki.st.com/stm32mpu/wiki/RTC_device_tree_configuration, into the Linux dts I enabled the internal RTC using this node:

&rtc {
   st,lsco = <RTC_OUT2_RMP>;
   pinctrl-0 = <&rtc_out2_rmp_pins_a>;
   pinctrl-names = "default";
   status = "okay";
};

but at the boot I get this log message:

stm32_rtc 5c004000.rtc: Can't enter in init mode. Prescaler config failed.
stm32_rtc: probe of 5c004000.rtc failed with error -110

The driver is not loaded, thus I don't have the 32.768kHz clock on I8 pin.

Could you help me to figure out what I'm doing wrong?

Thanks in advance, regards

Mauro

1 ACCEPTED SOLUTION

Accepted Solutions
MSK
Associate II

For everyone facing similar problems, I found that the error was due to the external LSE oscillator, that did not work correctly.

Regards

View solution in original post

3 REPLIES 3
PatrickF
ST Employee

Hi,

I'm not dts specialist, maybe check that RTC settings are present, e.g. https://github.com/STMicroelectronics/linux/blob/v4.19-stm32mp/Documentation/devicetree/bindings/rtc/st,stm32-rtc.txt

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MSK
Associate II

Hi PatrickF,

thank you for your answer. All the required settings listed in bindings are present, they are in the stm32mp157c.dtsi include file that is included by my .dts:

In stm32mp157c.dtsi:

rtc: rtc@5c004000 {
			compatible = "st,stm32mp1-rtc";
			reg = <0x5c004000 0x400>;
			clocks = <&rcc RTCAPB>, <&rcc RTC>;
			clock-names = "pclk", "rtc_ck";
			interrupts-extended = <&intc GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
					      <&exti 19 1>;
			status = "disabled";
		};

In my .dts:

/dts-v1/;
 
#include "stm32mp157c.dtsi"
#include "stm32mp157caa-pinctrl.dtsi"
#include "stm32mp157c-m4-srm.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/rtc/rtc-stm32.h>
 
....
 
 
&rtc {
	st,lsco = <RTC_OUT2_RMP>;
	pinctrl-0 = <&rtc_out2_rmp_pins_a>;
	pinctrl-names = "default";
	status = "okay";
};

Thank you, regards

MSK
Associate II

For everyone facing similar problems, I found that the error was due to the external LSE oscillator, that did not work correctly.

Regards