From: Josua Mayer <josua@solid-run.com>
To: Russell King <linux@armlinux.org.uk>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>
Cc: Yazan Shhady <yazan.shhady@solid-run.com>,
Jon Nettleton <jon@solid-run.com>,
devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Josua Mayer <josua@solid-run.com>
Subject: [PATCH] ARM: dts: imx6qdl-hummingboard: Add rtc0 and rtc1 aliases to fix hctosys
Date: Thu, 18 Jan 2024 16:01:10 +0100 [thread overview]
Message-ID: <20240118-imx6-hb-primary-rtc-v1-1-81b87935c557@solid-run.com> (raw)
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@solid-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@10000000 {
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@10000000 {
device_type = "memory";
---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20240118-imx6-hb-primary-rtc-047d47fd6eaa
Sincerely,
--
Josua Mayer <josua@solid-run.com>
next reply other threads:[~2024-01-18 15:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 15:01 Josua Mayer [this message]
2024-01-18 15:10 ` [PATCH] ARM: dts: imx6qdl-hummingboard: Add rtc0 and rtc1 aliases to fix hctosys Fabio Estevam
2024-01-18 16:07 ` Russell King (Oracle)
2024-01-19 12:08 ` Josua Mayer
2024-01-19 13:46 ` Josua Mayer
2024-01-19 14:33 ` Russell King (Oracle)
2024-01-29 19:26 ` Josua Mayer
2024-01-29 22:07 ` Russell King (Oracle)
2024-02-05 9:56 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240118-imx6-hb-primary-rtc-v1-1-81b87935c557@solid-run.com \
--to=josua@solid-run.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=jon@solid-run.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=yazan.shhady@solid-run.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).