2020-04-15 05:34 AM
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
Solved! Go to Solution.
2020-04-22 01:51 AM
For everyone facing similar problems, I found that the error was due to the external LSE oscillator, that did not work correctly.
Regards
2020-04-15 05:46 AM
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.
2020-04-15 05:50 AM
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
2020-04-22 01:51 AM
For everyone facing similar problems, I found that the error was due to the external LSE oscillator, that did not work correctly.
Regards