Skip to contentSkip to conversation

arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal

PATCH In review Chen-Yu Tsai 3 participants 7 messages Sep 13, 2025 – Sep 14, 2025

Subsystems (2)
lore
Share & tools
lore

Chen-Yu Tsai

author maintainer
#0 lore raw

PATCH 1/3 arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal

From: Chen-Yu Tsai <[email protected]>

The Radxa Cubie A5E has empty pads for a 32.768 KHz crystal, but it is left unpopulated, as per the schematics and seen on board images. A dead give away is the RTC's LOSC auto switch register showing the external OSC to be abnormal.

Drop the external crystal from the device tree. It was not referenced anyway.

Fixes c2520cd032ae ("arm64: dts: allwinner: a523: add Radxa A5E support")
---
 arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 7 -------
 1 file changed, 7 deletions(-)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +0 -7
index 71074b072184..e333bbaf01d3 100644
@@ -24,13 +24,6 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	ext_osc32k: ext-osc32k-clk {
-		#clock-cells = <0>;
-		compatible = "fixed-clock";
-		clock-frequency = <32768>;
-		clock-output-names = "ext_osc32k";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
Signature · 1 line
2.39.5
author maintainer
#1 lore raw

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

From: Chen-Yu Tsai <[email protected]>

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")
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +8 -0
index 535387912d9b..054d0357c139 100644
@@ -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>;
Signature · 1 line
2.39.5
maintainer Acked-by on v1 2/3
#2 lore raw

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

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

Quoted 8 lines

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 4 lines

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")

Best regards,
Jernej

Quoted 24 lines
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +8 -0
index 535387912d9b..054d0357c139 100644
@@ -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>;
author maintainer
#3 lore raw

PATCH 3/3 arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

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 de713ccb9934 ("arm64: dts: allwinner: t527: Add OrangePi 4A board")
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts +8 -0
index fb5311a46c2e..f71860db83d3 100644
@@ -393,6 +393,14 @@ &r_pio {
 	vcc-pm-supply = <&reg_bldo2>;
 };
 
+&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>;
Signature · 1 line
2.39.5
maintainer Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal

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

Quoted 8 lines

From: Chen-Yu Tsai <[email protected]>

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.

Quoted 4 lines

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

Fixes de713ccb9934 ("arm64: dts: allwinner: t527: Add OrangePi 4A board")

Best regards,
Jernej

Quoted 24 lines
---
 arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts +8 -0
index fb5311a46c2e..f71860db83d3 100644
@@ -393,6 +393,14 @@ &r_pio {
 	vcc-pm-supply = <&reg_bldo2>;
 };
 
+&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>;
maintainer Reviewed-by on v1 1/3
#5 lore raw
In reply to Chen-Yu Tsai

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

Quoted 7 lines

From: Chen-Yu Tsai <[email protected]>

The Radxa Cubie A5E has empty pads for a 32.768 KHz crystal, but it is left unpopulated, as per the schematics and seen on board images. A dead give away is the RTC's LOSC auto switch register showing the external OSC to be abnormal.

Quoted 5 lines

Drop the external crystal from the device tree. It was not referenced anyway.

Fixes c2520cd032ae ("arm64: dts: allwinner: a523: add Radxa A5E support")

Best regards,
Jernej

Quoted 23 lines
---
 arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 7 -------
 1 file changed, 7 deletions(-)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +0 -7
index 71074b072184..e333bbaf01d3 100644
@@ -24,13 +24,6 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
-	ext_osc32k: ext-osc32k-clk {
-		#clock-cells = <0>;
-		compatible = "fixed-clock";
-		clock-frequency = <32768>;
-		clock-output-names = "ext_osc32k";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
#6 lore raw
In reply to Chen-Yu Tsai
Quoted 9 lines · Chen-Yu Tsai

The Radxa Cubie A5E has empty pads for a 32.768 KHz crystal, but it is left unpopulated, as per the schematics and seen on board images. A dead give away is the RTC's LOSC auto switch register showing the external OSC to be abnormal.

Drop the external crystal from the device tree. It was not referenced anyway.

[...]

Applied to sunxi/dt-for-6.18 in local tree, thanks!

[1/3] arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal

      commit: 9f01e1e14e71defefcb4d6823b8476a15f3cf04a
[2/3] arm64: dts: allwinner: t527: avaota-a1: hook up external 32k crystal
      commit: 3d5e1ba00af8dd34ae1e573c2c07e00b5ec65267
[3/3] arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal
      commit: bd1ce7ef6aef4ee7349eb3124166e712693650ce

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>