[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210810173002.144730926@linuxfoundation.org>
Date: Tue, 10 Aug 2021 19:29:04 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Marek Vasut <marex@...x.de>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Patrice Chotard <patrice.chotard@...s.st.com>,
Patrick Delaunay <patrick.delaunay@...s.st.com>,
linux-stm32@...md-mailman.stormreply.com,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.13 036/175] ARM: dts: stm32: Prefer HW RTC on DHCOM SoM
From: Marek Vasut <marex@...x.de>
[ Upstream commit 3a0670824979a986a2314c921aa092e60730eeae ]
The DHCOM SoM has two RTC, one is the STM32 RTC built into the SoC
and another is Microcrystal RV RTC. By default, only the later has
battery backup, the former does not. The order in which the RTCs
are probed on boot is random, which means the kernel might pick up
system time from the STM32 RTC which has no battery backup. This
then leads to incorrect initial system time setup, even though the
HW RTC has correct time configured in it.
Add DT alias entries, so that the RTCs get assigned fixed IDs and
the HW RTC is always picked by the kernel as the default RTC, thus
resulting in correct system time in early userspace.
Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc: Patrice Chotard <patrice.chotard@...s.st.com>
Cc: Patrick Delaunay <patrick.delaunay@...s.st.com>
Cc: linux-stm32@...md-mailman.stormreply.com
To: linux-arm-kernel@...ts.infradead.org
Signed-off-by: Alexandre Torgue <alexandre.torgue@...s.st.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
index 2af0a6752674..8349c9099e30 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi
@@ -12,6 +12,8 @@
aliases {
ethernet0 = ðernet0;
ethernet1 = &ksz8851;
+ rtc0 = &hwrtc;
+ rtc1 = &rtc;
};
memory@...00000 {
@@ -248,7 +250,7 @@
/delete-property/dmas;
/delete-property/dma-names;
- rtc@32 {
+ hwrtc: rtc@32 {
compatible = "microcrystal,rv8803";
reg = <0x32>;
};
--
2.30.2
Powered by blists - more mailing lists