Thread (7 messages) 7 messages, 3 authors, 2025-09-14

Re: [PATCH 2/3] arm64: dts: allwinner: t527: avaota-a1: hook up external 32k crystal

From: Jernej Škrabec <jernej.skrabec@gmail.com>
Date: 2025-09-13 11:31:13
Also in: linux-devicetree, linux-sunxi, lkml

Dne sobota, 13. september 2025 ob 12:24:49 Srednjeevropski poletni čas je Chen-Yu Tsai napisal(a):
From: Chen-Yu Tsai <redacted>

When the board was added, its external 32.768 KHz crystal was described
but not hooked up correctly. This meant the device had to fall back to
the SoC's internal oscillator or divide a 32 KHz clock from the main
oscillator, neither of which are accurate for the RTC. As a result the
RTC clock will drift badly.

Hook the crystal up to the RTC block and request the correct clock rate.

Fixes: dbe54efa32af ("arm64: dts: allwinner: a523: add Avaota-A1 router support")
Signed-off-by: Chen-Yu Tsai <redacted>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej
quoted hunk ↗ jump to hunk
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 535387912d9b..054d0357c139 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -354,6 +354,14 @@ &r_pio {
 	vcc-pm-supply = <&reg_aldo3>;
 };
 
+&rtc {
+	clocks = <&r_ccu CLK_BUS_R_RTC>, <&osc24M>,
+		 <&r_ccu CLK_R_AHB>, <&ext_osc32k>;
+	clock-names = "bus", "hosc", "ahb", "ext-osc32k";
+	assigned-clocks = <&rtc CLK_OSC32K>;
+	assigned-clock-rates = <32768>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;



Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help