]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: dts: stm32: Prefer HW RTC on DHCOM SoM
authorMarek Vasut <marex@denx.de>
Sun, 20 Jun 2021 18:54:21 +0000 (20:54 +0200)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Fri, 30 Jul 2021 13:08:34 +0000 (15:08 +0200)
commit0db3fc7d43b2fec34fe2256a5e1857aeeec5ba9d
tree7f745391a8bbbc29ebcd829815a4bbcda5b7be21
parent01da9c8979f3d24bb75ef7080a8d9915e88dff94
ARM: dts: stm32: Prefer HW RTC on DHCOM SoM

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: 1a7428200448 ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi