Skip to contentSkip to conversation

arm64: dts: imx8mm-beacon-som: Configure RTC aliases

PATCH Applied Adam Ford 2 participants 3 messages Nov 26, 2020 – Dec 1, 2020

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/2 arm64: dts: imx8mm-beacon-som: Configure RTC aliases

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.

---
V2: Remove fixes tag

arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi +6 -1
index 5565775270f9..9bdefbba9e90 100644
@@ -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>;
 	};
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 2/2 arm64: dts: imx8mm-beacon-som: Assign PMIC clock

The PMIC throws an errors because the clock isn't assigned to it. Fix this by assigning the clocks info.

---
V2: Remove fixes tag

arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi +4 -0
index 9bdefbba9e90..d897913537ca 100644
@@ -111,6 +111,10 @@ pmic@4b {
 		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
 		rohm,reset-snvs-powered;
 
+		#clock-cells = <0>;
+		clocks = <&osc_32k 0>;
+		clock-output-names = "clk-32k-out";
+
 		regulators {
 			buck1_reg: BUCK1 {
 				regulator-name = "buck1";
Signature · 1 line
2.25.1
Applied
#2 lore raw
In reply to Adam Ford
Quoted 10 lines · Adam Ford

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.

Applied both, thanks.