* [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC
@ 2026-09-14 3:21 Joy Zou
2026-09-14 3:21 ` [PATCH 1/2] arm64: dts: imx91-evk/qsb: " Joy Zou
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Joy Zou @ 2026-09-14 3:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Ye Li,
Jacky Bai, Peng Fan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Joy Zou
Only rtc0 was aliased to the internal bbnsm_rtc, while the external
PCF2131 RTC had no fixed index. When both RTC drivers are built as
modules, the pcf2131 may probe first and take rtc0, pushing bbnsm_rtc
to rtc1. Since suspend/resume wakeup relies on the internal bbnsm RTC
being rtc0, this broke wakeup.
Add an rtc1 alias for the PCF2131 on the i.MX91 and i.MX93 EVK/QSB
boards, so the external RTC keeps a fixed index while bbnsm_rtc always
stays rtc0.
Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
---
Joy Zou (2):
arm64: dts: imx91-evk/qsb: add rtc1 alias for external PCF2131 RTC
arm64: dts: imx93-evk/qsb: add rtc1 alias for external PCF2131 RTC
arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts | 1 +
arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts | 1 +
arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 3 ++-
4 files changed, 5 insertions(+), 1 deletion(-)
---
base-commit: c68a982815dcce5464e3bf2a31ac94f5146c04ca
change-id: 20260914-b4_imx91_93_rtc-07d17cf027ab
Best regards,
--
Joy Zou <joy.zou@oss.nxp.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: imx91-evk/qsb: add rtc1 alias for external PCF2131 RTC
2026-09-14 3:21 [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC Joy Zou
@ 2026-09-14 3:21 ` Joy Zou
2026-09-14 3:21 ` [PATCH 2/2] arm64: dts: imx93-evk/qsb: " Joy Zou
2026-09-23 20:24 ` [PATCH 0/2] arm64: dts: imx91/imx93: " Frank.Li
2 siblings, 0 replies; 5+ messages in thread
From: Joy Zou @ 2026-09-14 3:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Ye Li,
Jacky Bai, Peng Fan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Joy Zou
Only rtc0 was aliased to bbnsm_rtc, while the external pcf2131 had
no fixed index. When both drivers are modules, the pcf2131 may register
first and take rtc0, pushing bbnsm_rtc to rtc1. Since suspend/resume
wakeup relies on the internal bbnsm RTC at rtc0, this broke wakeup.
Add rtc1 alias for the pcf2131 on imx91-11x11-evk and imx91-9x9-qsb,
so it keeps a fixed index while bbnsm_rtc stays rtc0.
Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
---
arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts | 1 +
arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
index 5716febb5a50..ea7852da43b9 100644
--- a/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-11x11-evk.dts
@@ -25,6 +25,7 @@ aliases {
mmc1 = &usdhc2;
mmc2 = &usdhc3;
rtc0 = &bbnsm_rtc;
+ rtc1 = &pcf2131;
serial0 = &lpuart1;
serial1 = &lpuart2;
serial2 = &lpuart3;
diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
index f1ed7983226b..b7f0e39b867a 100644
--- a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb.dts
@@ -23,6 +23,7 @@ aliases {
mmc0 = &usdhc1;
mmc1 = &usdhc2;
rtc0 = &bbnsm_rtc;
+ rtc1 = &pcf2131;
serial0 = &lpuart1;
};
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm64: dts: imx93-evk/qsb: add rtc1 alias for external PCF2131 RTC
2026-09-14 3:21 [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC Joy Zou
2026-09-14 3:21 ` [PATCH 1/2] arm64: dts: imx91-evk/qsb: " Joy Zou
@ 2026-09-14 3:21 ` Joy Zou
2026-09-14 3:29 ` sashiko-bot
2026-09-23 20:24 ` [PATCH 0/2] arm64: dts: imx91/imx93: " Frank.Li
2 siblings, 1 reply; 5+ messages in thread
From: Joy Zou @ 2026-09-14 3:21 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Ye Li,
Jacky Bai, Peng Fan
Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Joy Zou
Only rtc0 was aliased to bbnsm_rtc, while the external pcf2131 had
no fixed index. When both drivers are modules, the pcf2131 may register
first and take rtc0, pushing bbnsm_rtc to rtc1. Since suspend/resume
wakeup relies on the internal bbnsm RTC at rtc0, this broke wakeup.
Add rtc1 alias for the pcf2131 on imx93-11x11-evk and imx93-9x9-qsb,
so it keeps a fixed index while bbnsm_rtc stays rtc0.
Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
---
arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi | 1 +
arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi b/arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi
index f48e7947cf64..2f3f9ebd3345 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk-common.dtsi
@@ -18,6 +18,7 @@ aliases {
mmc0 = &usdhc1;
mmc1 = &usdhc2;
rtc0 = &bbnsm_rtc;
+ rtc1 = &pcf2131;
serial0 = &lpuart1;
serial1 = &lpuart2;
serial2 = &lpuart3;
diff --git a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
index 01c11c517986..4e31a78963fe 100644
--- a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
@@ -28,6 +28,7 @@ aliases {
mmc0 = &usdhc1;
mmc1 = &usdhc2;
rtc0 = &bbnsm_rtc;
+ rtc1 = &pcf2131;
serial0 = &lpuart1;
serial1 = &lpuart2;
serial2 = &lpuart3;
@@ -306,7 +307,7 @@ typec1_dr_sw: endpoint {
};
};
- rtc@53 {
+ pcf2131: rtc@53 {
compatible = "nxp,pcf2131";
reg = <0x53>;
interrupt-parent = <&pcal6524>;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] arm64: dts: imx93-evk/qsb: add rtc1 alias for external PCF2131 RTC
2026-09-14 3:21 ` [PATCH 2/2] arm64: dts: imx93-evk/qsb: " Joy Zou
@ 2026-09-14 3:29 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-14 3:29 UTC (permalink / raw)
To: Joy Zou; +Cc: devicetree, Frank.Li, robh, conor+dt, imx
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but several other NXP boards with multiple RTCs lack explicit RTC aliases, leading to the exact same unpredictable /dev/rtcN numbering that this patch fixes.
--
commit 3914a89ee5c45116b8135c7ac05a01b772cb8462
Author: Joy Zou <joy.zou@oss.nxp.com>
arm64: dts: imx93-evk/qsb: add rtc1 alias for external PCF2131 RTC
This commit fixes unpredictable /dev/rtcN numbering for imx93 boards by adding
an explicit rtc1 alias.
> Only rtc0 was aliased to bbnsm_rtc, while the external pcf2131 had
> no fixed index. When both drivers are modules, the pcf2131 may register
> first and take rtc0, pushing bbnsm_rtc to rtc1. Since suspend/resume
> wakeup relies on the internal bbnsm RTC at rtc0, this broke wakeup.
>
> Add rtc1 alias for the pcf2131 on imx93-11x11-evk and imx93-9x9-qsb,
> so it keeps a fixed index while bbnsm_rtc stays rtc0.
[Severity: High]
This isn't a bug introduced by this patch, but several other NXP boards with
multiple RTCs lack explicit RTC aliases, leading to the exact same
unpredictable /dev/rtcN numbering that this patch fixes.
For example, in arch/arm64/boot/dts/freescale/imx8mn-dimonoff-gateway-evk.dts:
rtc@53 {
compatible = "nxp,pcf2131";
This board defines multiple RTCs (pcf2129 and pcf2131) without aliases,
leaving them susceptible to the same index race condition.
In arch/arm64/boot/dts/freescale/imx8mp-navqp.dts:
rtc@53 {
compatible = "nxp,pcf2131";
This board defines an external RTC alongside the SoC's internal snvs_rtc
without any aliases, causing unpredictable index assignment.
In arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts:
rtc@51 {
compatible = "nxp,pcf2129";
This board defines multiple external RTCs without a complete set of aliases,
leading to unpredictable rtc0/rtc2 index assignment.
A race condition between module probes will swap these indices unpredictably,
which can break system time initialization (since CONFIG_RTC_HCTOSYS_DEVICE
defaults to rtc0) or suspend/resume wakeup functionality.
Could these other boards also be updated with explicit RTC aliases to prevent
the same issue?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-b4_imx91_93_rtc-v1-0-daed1cba0714@oss.nxp.com?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC
2026-09-14 3:21 [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC Joy Zou
2026-09-14 3:21 ` [PATCH 1/2] arm64: dts: imx91-evk/qsb: " Joy Zou
2026-09-14 3:21 ` [PATCH 2/2] arm64: dts: imx93-evk/qsb: " Joy Zou
@ 2026-09-23 20:24 ` Frank.Li
2 siblings, 0 replies; 5+ messages in thread
From: Frank.Li @ 2026-09-23 20:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Ye Li, Jacky Bai,
Peng Fan, Joy Zou
Cc: Frank Li, devicetree, imx, linux-arm-kernel, linux-kernel
From: Frank Li <Frank.Li@nxp.com>
On Mon, 14 Sep 2026 11:21:06 +0800, Joy Zou wrote:
> Only rtc0 was aliased to the internal bbnsm_rtc, while the external
> PCF2131 RTC had no fixed index. When both RTC drivers are built as
> modules, the pcf2131 may probe first and take rtc0, pushing bbnsm_rtc
> to rtc1. Since suspend/resume wakeup relies on the internal bbnsm RTC
> being rtc0, this broke wakeup.
>
> Add an rtc1 alias for the PCF2131 on the i.MX91 and i.MX93 EVK/QSB
> boards, so the external RTC keeps a fixed index while bbnsm_rtc always
> stays rtc0.
>
> [...]
Applied, thanks!
[1/2] arm64: dts: imx91-evk/qsb: add rtc1 alias for external PCF2131 RTC
commit: 92fd18d609ff13e27ab9d19c4764633acde593ec
[2/2] arm64: dts: imx93-evk/qsb: add rtc1 alias for external PCF2131 RTC
commit: fa7d47a05b464c5ec3af39ebd06b8b73abaa42ff
Best regards,
--
Frank Li <Frank.Li@nxp.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-23 20:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 3:21 [PATCH 0/2] arm64: dts: imx91/imx93: add rtc1 alias for external PCF2131 RTC Joy Zou
2026-09-14 3:21 ` [PATCH 1/2] arm64: dts: imx91-evk/qsb: " Joy Zou
2026-09-14 3:21 ` [PATCH 2/2] arm64: dts: imx93-evk/qsb: " Joy Zou
2026-09-14 3:29 ` sashiko-bot
2026-09-23 20:24 ` [PATCH 0/2] arm64: dts: imx91/imx93: " Frank.Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox