arm64: dts: allwinner: a527: cubie-a5e: Drop external 32.768 KHz crystal
Subsystems (2)
Chen-Yu Tsai
maintainerPATCH 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.
--- 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
@@ -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
Chen-Yu Tsai
maintainerPATCH 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.
--- 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
@@ -354,6 +354,14 @@ &r_pio { vcc-pm-supply = <®_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
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")Signed-off-by Chen-Yu Tsai <[email protected]>
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@@ -354,6 +354,14 @@ &r_pio { vcc-pm-supply = <®_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>;
Chen-Yu Tsai
maintainerPATCH 3/3 arm64: dts: allwinner: t527: orangepi-4a: hook up external 32k crystal
In reply to Chen-Yu TsaiFrom: 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.
--- 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
@@ -393,6 +393,14 @@ &r_pio { vcc-pm-supply = <®_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
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")Signed-off-by Chen-Yu Tsai <[email protected]>
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@@ -393,6 +393,14 @@ &r_pio { vcc-pm-supply = <®_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>;
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")Signed-off-by Chen-Yu Tsai <[email protected]>
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@@ -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";
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: bd1ce7ef6aef4ee7349eb3124166e712693650ceBest regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>