* [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0
@ 2026-10-17 11:07 Shigeaki Asai
2026-10-19 7:29 ` Neil Armstrong
0 siblings, 1 reply; 4+ messages in thread
From: Shigeaki Asai @ 2026-10-17 11:07 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman
Cc: Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, linux-arm-kernel,
linux-amlogic, linux-kernel, Shigeaki Asai
The ODROID-GO Ultra has two PMICs with an RTC each, RK818 and RK817,
and the SoC has the meson virtual RTC. Only vrtc has an alias, rtc0.
An RTC without an alias takes the lowest free number, and the RK817
RTC registers early, so it usually becomes rtc0, the RTC the system
time is set from at boot. The RK817 RTC seems to run without a 32kHz
crystal on this board: it ran about 1.5% fast while the board was on
and 14-17% slow while it was off. The RK818 RTC keeps time well:
with it as rtc0, the clock was off by less than a second after the
board was off, with no charger connected, for 12 hours 40 minutes.
Use the RK818 RTC as rtc0, and give the other two RTCs an alias as
well, so that the numbering does not depend on probe order.
Fixes: 62e73f000696 ("arm64: dts: amlogic: add initial Odroid Go Ultra DTS")
Assisted-by: claude-opus-5-5
Signed-off-by: Shigeaki Asai <y-asai.0816@docomonet.jp>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
index 348baa4e6d84..86902f68d7d4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
@@ -18,7 +18,9 @@ / {
aliases {
serial0 = &uart_AO;
- rtc0 = &vrtc;
+ rtc0 = &rk818;
+ rtc1 = &vrtc;
+ rtc2 = &rk817;
};
adc-joystick-left {
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0
2026-10-17 11:07 [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0 Shigeaki Asai
@ 2026-10-19 7:29 ` Neil Armstrong
2026-10-19 13:04 ` Asai, Shigeaki
0 siblings, 1 reply; 4+ messages in thread
From: Neil Armstrong @ 2026-10-19 7:29 UTC (permalink / raw)
To: Shigeaki Asai, Kevin Hilman
Cc: Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, linux-arm-kernel,
linux-amlogic, linux-kernel
Hi,
On 10/17/26 13:07, Shigeaki Asai wrote:
> The ODROID-GO Ultra has two PMICs with an RTC each, RK818 and RK817,
> and the SoC has the meson virtual RTC. Only vrtc has an alias, rtc0.
>
> An RTC without an alias takes the lowest free number, and the RK817
> RTC registers early, so it usually becomes rtc0, the RTC the system
> time is set from at boot. The RK817 RTC seems to run without a 32kHz
> crystal on this board: it ran about 1.5% fast while the board was on
> and 14-17% slow while it was off. The RK818 RTC keeps time well:
> with it as rtc0, the clock was off by less than a second after the
> board was off, with no charger connected, for 12 hours 40 minutes.
>
> Use the RK818 RTC as rtc0, and give the other two RTCs an alias as
> well, so that the numbering does not depend on probe order.
>
> Fixes: 62e73f000696 ("arm64: dts: amlogic: add initial Odroid Go Ultra DTS")
> Assisted-by: claude-opus-5-5
> Signed-off-by: Shigeaki Asai <y-asai.0816@docomonet.jp>
> ---
> arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
> index 348baa4e6d84..86902f68d7d4 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
> @@ -18,7 +18,9 @@ / {
>
> aliases {
> serial0 = &uart_AO;
> - rtc0 = &vrtc;
> + rtc0 = &rk818;
> + rtc1 = &vrtc;
> + rtc2 = &rk817;
The vrtc was used as rtc0 because it's the defaut wakeup rtc,
can the rk818 and rk817 wakeup the system when in system suspend ?
Neil
> };
>
> adc-joystick-left {
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0
2026-10-19 7:29 ` Neil Armstrong
@ 2026-10-19 13:04 ` Asai, Shigeaki
0 siblings, 0 replies; 4+ messages in thread
From: Asai, Shigeaki @ 2026-10-19 13:04 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman
Cc: Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, linux-arm-kernel,
linux-amlogic, linux-kernel
Hi Neil,
On 10/19/26, Neil Armstrong wrote:
> The vrtc was used as rtc0 because it's the defaut wakeup rtc,
> can the rk818 and rk817 wakeup the system when in system suspend ?
Thank you for the review. I did not think about wakeup, sorry. I tried
it on my board:
- s2idle: with Igor's "irqchip/meson-gpio: Allow the GPIO interrupts to
wake the system" applied, an alarm on the RK818 RTC woke the board
4/4, and the power key on the RK817 3/3. Without it, neither of them
woke the board.
- deep: an alarm on the vrtc (rtc1 with this patch) woke up BL30, but
the system did not come back to Linux, and I had to disconnect the
battery. An alarm on the RK818 RTC and the power key did not wake it
up at all. So deep suspend does not seem to work on this board for
now, which looks like a separate problem.
On the other hand, the vrtc does not keep the time, and the RK817 RTC
drifts, so only the RK818 RTC gives the correct time at boot. Also,
before this patch, the vrtc was not rtc0 on my board even with the
rtc0 alias: the RK817 and RK818 RTCs registered first and took rtc0
and rtc1, and the vrtc became rtc2.
Would it be OK to keep this patch as it is? If you prefer to keep the
vrtc as rtc0 for deep suspend, I can send a v2 with rtc0 = vrtc,
rtc1 = RK818 and rtc2 = RK817 instead.
(This reply was written with the help of Claude.)
Thanks
Asai, Shigeaki
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0
@ 2026-10-13 22:49 Shigeaki Asai
0 siblings, 0 replies; 4+ messages in thread
From: Shigeaki Asai @ 2026-10-13 22:49 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman
Cc: Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, linux-arm-kernel,
linux-amlogic, linux-kernel, Shigeaki Asai
The ODROID-GO Ultra has two PMICs with an RTC each, RK818 and RK817,
and the SoC has the meson virtual RTC. Only vrtc has an alias, rtc0.
An RTC without an alias takes the lowest free number, and the RK817
RTC registers early, so it usually becomes rtc0, the RTC the system
time is set from at boot. The RK817 RTC seems to run without a 32kHz
crystal on this board: it ran about 1.5% fast while the board was on
and 14-17% slow while it was off. The RK818 RTC keeps time well:
with it as rtc0, the clock was off by less than a second after the
board was off, with no charger connected, for 12 hours 40 minutes.
Use the RK818 RTC as rtc0, and give the other two RTCs an alias as
well, so that the numbering does not depend on probe order.
Fixes: 62e73f000696 ("arm64: dts: amlogic: add initial Odroid Go Ultra DTS")
Assisted-by: claude-opus-5-5
Signed-off-by: Shigeaki Asai <y-asai.0816@docomonet.jp>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
index 348baa4e6d84..86902f68d7d4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-go-ultra.dts
@@ -18,7 +18,9 @@ / {
aliases {
serial0 = &uart_AO;
- rtc0 = &vrtc;
+ rtc0 = &rk818;
+ rtc1 = &vrtc;
+ rtc2 = &rk817;
};
adc-joystick-left {
--
2.43.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-19 13:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-17 11:07 [PATCH] arm64: dts: amlogic: odroid-go-ultra: use the RK818 RTC as rtc0 Shigeaki Asai
2026-10-19 7:29 ` Neil Armstrong
2026-10-19 13:04 ` Asai, Shigeaki
-- strict thread matches above, loose matches on Subject: below --
2026-10-13 22:49 Shigeaki Asai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®