diff mbox series

[1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases

Message ID 20201125210339.1071419-1-aford173@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] arm64: dts: imx8mm-beacon-som: Fix RTC aliases | expand

Commit Message

Adam Ford Nov. 25, 2020, 9:03 p.m. UTC
On the i.MX8MM Beacon SOM, there is an RTC chip which is fed power
from the baseboard during power off.  The SNVS RTC integrated into
the SoC is not fed power.  Depending on the order the modules are
loaded, this can be a problem if the external RTC isn't rtc0.

Make the alias for rtc0 point to the external RTC all the time and
rtc1 point to the SVNS in order to correctly hold date/time over
a power-cycle.

Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit")

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Krzysztof Kozlowski Nov. 26, 2020, 8:03 a.m. UTC | #1
On Wed, Nov 25, 2020 at 03:03:38PM -0600, Adam Ford wrote:
> On the i.MX8MM Beacon SOM, there is an RTC chip which is fed power
> from the baseboard during power off.  The SNVS RTC integrated into
> the SoC is not fed power.  Depending on the order the modules are
> loaded, this can be a problem if the external RTC isn't rtc0.
> 
> Make the alias for rtc0 point to the external RTC all the time and
> rtc1 point to the SVNS in order to correctly hold date/time over
> a power-cycle.
> 
> Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit")

There is no bug here so this is not a fix. Please remove the "fix" from
the title and "Fixes" tag.

This is purely for making user-space RTC lookup easier, nothing to fix.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
index 5565775270f9..9bdefbba9e90 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
@@ -4,6 +4,11 @@ 
  */
 
 / {
+	aliases {
+		rtc0 = &rtc;
+		rtc1 = &snvs_rtc;
+	};
+
 	usdhc1_pwrseq: usdhc1_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		pinctrl-names = "default";
@@ -219,7 +224,7 @@  eeprom@50 {
 		reg = <0x50>;
 	};
 
-	rtc@51 {
+	rtc: rtc@51 {
 		compatible = "nxp,pcf85263";
 		reg = <0x51>;
 	};