[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240118-imx6-hb-primary-rtc-v1-1-81b87935c557@solid-run.com>
Date: Thu, 18 Jan 2024 16:01:10 +0100
From: Josua Mayer <josua@...id-run.com>
To: Russell King <linux@...linux.org.uk>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, NXP Linux Team <linux-imx@....com>
Cc: Yazan Shhady <yazan.shhady@...id-run.com>,
Jon Nettleton <jon@...id-run.com>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Josua Mayer <josua@...id-run.com>
Subject: [PATCH] ARM: dts: imx6qdl-hummingboard: Add rtc0 and rtc1 aliases
to fix hctosys
HummingBoard has two RTCs, first integrated within SoC that can be used to
wake up from sleep - and a second on the carrier board including back-up
battery which is intended for keeping time during power-off.
Add aliases for both, ensuring that the battery-backed clock is primary
rtc and used by default during boot for restoring system time.
Fixes keeping time across power-cycle observed on Debian,
which sets RTC_HCTOSYS_DEVICE="rtc0".
Signed-off-by: Josua Mayer <josua@...id-run.com>
---
arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi | 7 ++++++-
arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi | 5 +++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi
index bfade7149080..a955c77cd499 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi
@@ -41,6 +41,11 @@
#include <dt-bindings/sound/fsl-imx-audmux.h>
/ {
+ aliases {
+ rtc0 = &carrier_rtc;
+ rtc1 = &snvs_rtc;
+ };
+
/* Will be filled by the bootloader */
memory@...00000 {
device_type = "memory";
@@ -187,7 +192,7 @@ &i2c1 {
status = "okay";
/* Pro baseboard model */
- rtc@68 {
+ carrier_rtc: rtc@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
};
diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi
index 0883ef99cded..e6017f9bf640 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi
@@ -41,6 +41,11 @@
#include <dt-bindings/sound/fsl-imx-audmux.h>
/ {
+ aliases {
+ rtc0 = &pcf8523;
+ rtc1 = &snvs_rtc;
+ };
+
/* Will be filled by the bootloader */
memory@...00000 {
device_type = "memory";
---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20240118-imx6-hb-primary-rtc-047d47fd6eaa
Sincerely,
--
Josua Mayer <josua@...id-run.com>
Powered by blists - more mailing lists